@paroicms/site-generator-plugin 0.21.0 → 0.22.0

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.
@@ -1,4 +1,4 @@
1
- var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;var w=(t,n,i)=>uN(t,typeof n!="symbol"?n+"":n,i);function Zv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pf={exports:{}},ls={};/**
1
+ var k0=Object.defineProperty;var L0=(i,n,r)=>n in i?k0(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r;var Oe=(i,n,r)=>L0(i,typeof n!="symbol"?n+"":n,r);function rm(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var wo={exports:{}},ii={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,config
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ey;function cN(){if(ey)return ls;ey=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(a,l,u){var f=null;if(u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:t,type:a,key:f,ref:l!==void 0?l:null,props:u}}return ls.Fragment=n,ls.jsx=i,ls.jsxs=i,ls}var ty;function fN(){return ty||(ty=1,pf.exports=cN()),pf.exports}var S=fN();const ce=t=>typeof t=="string",os=()=>{let t,n;const i=new Promise((a,l)=>{t=a,n=l});return i.resolve=t,i.reject=n,i},ny=t=>t==null?"":""+t,dN=(t,n,i)=>{t.forEach(a=>{n[a]&&(i[a]=n[a])})},hN=/###/g,iy=t=>t&&t.indexOf("###")>-1?t.replace(hN,"."):t,ry=t=>!t||ce(t),gs=(t,n,i)=>{const a=ce(n)?n.split("."):n;let l=0;for(;l<a.length-1;){if(ry(t))return{};const u=iy(a[l]);!t[u]&&i&&(t[u]=new i),Object.prototype.hasOwnProperty.call(t,u)?t=t[u]:t={},++l}return ry(t)?{}:{obj:t,k:iy(a[l])}},ay=(t,n,i)=>{const{obj:a,k:l}=gs(t,n,Object);if(a!==void 0||n.length===1){a[l]=i;return}let u=n[n.length-1],f=n.slice(0,n.length-1),d=gs(t,f,Object);for(;d.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),d=gs(t,f,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=i},pN=(t,n,i,a)=>{const{obj:l,k:u}=gs(t,n,Object);l[u]=l[u]||[],l[u].push(i)},bo=(t,n)=>{const{obj:i,k:a}=gs(t,n);if(i&&Object.prototype.hasOwnProperty.call(i,a))return i[a]},mN=(t,n,i)=>{const a=bo(t,i);return a!==void 0?a:bo(n,i)},Qv=(t,n,i)=>{for(const a in n)a!=="__proto__"&&a!=="constructor"&&(a in t?ce(t[a])||t[a]instanceof String||ce(n[a])||n[a]instanceof String?i&&(t[a]=n[a]):Qv(t[a],n[a],i):t[a]=n[a]);return t},Gr=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const yN=t=>ce(t)?t.replace(/[&<>"'\/]/g,n=>gN[n]):t;class vN{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const i=this.regExpMap.get(n);if(i!==void 0)return i;const a=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,a),this.regExpQueue.push(n),a}}const bN=[" ",",","?","!",";"],xN=new vN(20),SN=(t,n,i)=>{n=n||"",i=i||"";const a=bN.filter(f=>n.indexOf(f)<0&&i.indexOf(f)<0);if(a.length===0)return!0;const l=xN.getRegExp(`(${a.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!l.test(t);if(!u){const f=t.indexOf(i);f>0&&!l.test(t.substring(0,f))&&(u=!0)}return u},Uf=(t,n,i=".")=>{if(!t)return;if(t[n])return Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0;const a=n.split(i);let l=t;for(let u=0;u<a.length;){if(!l||typeof l!="object")return;let f,d="";for(let m=u;m<a.length;++m)if(m!==u&&(d+=i),d+=a[m],f=l[d],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&m<a.length-1)continue;u+=m-u+1;break}l=f}return l},bs=t=>t==null?void 0:t.replace("_","-"),wN={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,n){var i,a;(a=(i=console==null?void 0:console[t])==null?void 0:i.apply)==null||a.call(i,console,n)}};class xo{constructor(n,i={}){this.init(n,i)}init(n,i={}){this.prefix=i.prefix||"i18next:",this.logger=n||wN,this.options=i,this.debug=i.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,i,a,l){return l&&!this.debug?null:(ce(n[0])&&(n[0]=`${a}${this.prefix} ${n[0]}`),this.logger[i](n))}create(n){return new xo(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new xo(this.logger,n)}}var wn=new xo;class zo{constructor(){this.observers={}}on(n,i){return n.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const l=this.observers[a].get(i)||0;this.observers[a].set(i,l+1)}),this}off(n,i){if(this.observers[n]){if(!i){delete this.observers[n];return}this.observers[n].delete(i)}}emit(n,...i){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([l,u])=>{for(let f=0;f<u;f++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([l,u])=>{for(let f=0;f<u;f++)l.apply(l,[n,...i])})}}class sy extends zo{constructor(n,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const i=this.options.ns.indexOf(n);i>-1&&this.options.ns.splice(i,1)}getResource(n,i,a,l={}){var p,g;const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.indexOf(".")>-1?d=n.split("."):(d=[n,i],a&&(Array.isArray(a)?d.push(...a):ce(a)&&u?d.push(...a.split(u)):d.push(a)));const m=bo(this.data,d);return!m&&!i&&!a&&n.indexOf(".")>-1&&(n=d[0],i=d[1],a=d.slice(2).join(".")),m||!f||!ce(a)?m:Uf((g=(p=this.data)==null?void 0:p[n])==null?void 0:g[i],a,u)}addResource(n,i,a,l,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,i];a&&(d=d.concat(f?a.split(f):a)),n.indexOf(".")>-1&&(d=n.split("."),l=i,i=d[1]),this.addNamespaces(i),ay(this.data,d,l),u.silent||this.emit("added",n,i,a,l)}addResources(n,i,a,l={silent:!1}){for(const u in a)(ce(a[u])||Array.isArray(a[u]))&&this.addResource(n,i,u,a[u],{silent:!0});l.silent||this.emit("added",n,i,a)}addResourceBundle(n,i,a,l,u,f={silent:!1,skipCopy:!1}){let d=[n,i];n.indexOf(".")>-1&&(d=n.split("."),l=a,a=i,i=d[1]),this.addNamespaces(i);let m=bo(this.data,d)||{};f.skipCopy||(a=JSON.parse(JSON.stringify(a))),l?Qv(m,a,u):m={...m,...a},ay(this.data,d,m),f.silent||this.emit("added",n,i,a)}removeResourceBundle(n,i){this.hasResourceBundle(n,i)&&delete this.data[n][i],this.removeNamespaces(i),this.emit("removed",n,i)}hasResourceBundle(n,i){return this.getResource(n,i)!==void 0}getResourceBundle(n,i){return i||(i=this.options.defaultNS),this.getResource(n,i)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const i=this.getDataByLanguage(n);return!!(i&&Object.keys(i)||[]).find(l=>i[l]&&Object.keys(i[l]).length>0)}toJSON(){return this.data}}var Fv={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,n,i,a,l){return t.forEach(u=>{var f;n=((f=this.processors[u])==null?void 0:f.process(n,i,a,l))??n}),n}};const ly={},oy=t=>!ce(t)&&typeof t!="boolean"&&typeof t!="number";class So extends zo{constructor(n,i={}){super(),dN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wn.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,i={interpolation:{}}){const a={...i};if(n==null)return!1;const l=this.resolve(n,a);return(l==null?void 0:l.res)!==void 0}extractFromKey(n,i){let a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let u=i.ns||this.options.defaultNS||[];const f=a&&n.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!SN(n,a,l);if(f&&!d){const m=n.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:n,namespaces:ce(u)?[u]:u};const p=n.split(a);(a!==l||a===l&&this.options.ns.indexOf(p[0])>-1)&&(u=p.shift()),n=p.join(l)}return{key:n,namespaces:ce(u)?[u]:u}}translate(n,i,a){let l=typeof i=="object"?{...i}:i;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(l={...l}),l||(l={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const u=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:d,namespaces:m}=this.extractFromKey(n[n.length-1],l),p=m[m.length-1];let g=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const v=l.lng||this.language,b=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((v==null?void 0:v.toLowerCase())==="cimode")return b?u?{res:`${p}${g}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:`${p}${g}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:d;const k=this.resolve(n,l);let N=k==null?void 0:k.res;const T=(k==null?void 0:k.usedKey)||d,U=(k==null?void 0:k.exactUsedKey)||d,M=["[object Number]","[object Function]","[object RegExp]"],z=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,X=l.count!==void 0&&!ce(l.count),F=So.hasDefaultValue(l),he=X?this.pluralResolver.getSuffix(v,l.count,l):"",fe=l.ordinal&&X?this.pluralResolver.getSuffix(v,l.count,{ordinal:!1}):"",re=X&&!l.ordinal&&l.count===0,ee=re&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${he}`]||l[`defaultValue${fe}`]||l.defaultValue;let oe=N;G&&!N&&F&&(oe=ee);const xe=oy(oe),ot=Object.prototype.toString.apply(oe);if(G&&oe&&xe&&M.indexOf(ot)<0&&!(ce(z)&&Array.isArray(oe))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ut=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,oe,{...l,ns:m}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(k.res=ut,k.usedParams=this.getUsedParamsDetails(l),k):ut}if(f){const ut=Array.isArray(oe),it=ut?[]:{},rt=ut?U:T;for(const B in oe)if(Object.prototype.hasOwnProperty.call(oe,B)){const Y=`${rt}${f}${B}`;F&&!N?it[B]=this.translate(Y,{...l,defaultValue:oy(ee)?ee[B]:void 0,joinArrays:!1,ns:m}):it[B]=this.translate(Y,{...l,joinArrays:!1,ns:m}),it[B]===Y&&(it[B]=oe[B])}N=it}}else if(G&&ce(z)&&Array.isArray(N))N=N.join(z),N&&(N=this.extendTranslation(N,n,l,a));else{let ut=!1,it=!1;!this.isValidLookup(N)&&F&&(ut=!0,N=ee),this.isValidLookup(N)||(it=!0,N=d);const B=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&it?void 0:N,Y=F&&ee!==N&&this.options.updateMissing;if(it||ut||Y){if(this.logger.log(Y?"updateKey":"missingKey",v,p,d,Y?ee:N),f){const V=this.resolve(d,{...l,keySeparator:!1});V&&V.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 ne=[];const ke=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ke&&ke[0])for(let V=0;V<ke.length;V++)ne.push(ke[V]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(l.lng||this.language):ne.push(l.lng||this.language);const E=(V,Q,I)=>{var Se;const ie=F&&I!==N?I:B;this.options.missingKeyHandler?this.options.missingKeyHandler(V,p,Q,ie,Y,l):(Se=this.backendConnector)!=null&&Se.saveMissing&&this.backendConnector.saveMissing(V,p,Q,ie,Y,l),this.emit("missingKey",V,p,Q,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?ne.forEach(V=>{const Q=this.pluralResolver.getSuffixes(V,l);re&&l[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(I=>{E([V],d+I,l[`defaultValue${I}`]||ee)})}):E(ne,d,ee))}N=this.extendTranslation(N,n,l,k,a),it&&N===d&&this.options.appendNamespaceToMissingKey&&(N=`${p}${g}${d}`),(it||ut)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${g}${d}`:d,ut?N:void 0,l))}return u?(k.res=N,k.usedParams=this.getUsedParamsDetails(l),k):N}extendTranslation(n,i,a,l,u){var m,p;if((m=this.i18nFormat)!=null&&m.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const g=ce(n)&&(((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(g){const k=n.match(this.interpolator.nestingRegexp);v=k&&k.length}let b=a.replace&&!ce(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),n=this.interpolator.interpolate(n,b,a.lng||this.language||l.usedLng,a),g){const k=n.match(this.interpolator.nestingRegexp),N=k&&k.length;v<N&&(a.nest=!1)}!a.lng&&l&&l.res&&(a.lng=this.language||l.usedLng),a.nest!==!1&&(n=this.interpolator.nest(n,(...k)=>(u==null?void 0:u[0])===k[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${k[0]} in key: ${i[0]}`),null):this.translate(...k,i),a)),a.interpolation&&this.interpolator.reset()}const f=a.postProcess||this.options.postProcess,d=ce(f)?[f]:f;return n!=null&&(d!=null&&d.length)&&a.applyPostProcessor!==!1&&(n=Fv.handle(d,n,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),n}resolve(n,i={}){let a,l,u,f,d;return ce(n)&&(n=[n]),n.forEach(m=>{if(this.isValidLookup(a))return;const p=this.extractFromKey(m,i),g=p.key;l=g;let v=p.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const b=i.count!==void 0&&!ce(i.count),k=b&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(ce(i.context)||typeof i.context=="number")&&i.context!=="",T=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);v.forEach(U=>{var M,z;this.isValidLookup(a)||(d=U,!ly[`${T[0]}-${U}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((z=this.utils)!=null&&z.hasLoadedNamespace(d))&&(ly[`${T[0]}-${U}`]=!0,this.logger.warn(`key "${l}" for languages "${T.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),T.forEach(G=>{var he;if(this.isValidLookup(a))return;f=G;const X=[g];if((he=this.i18nFormat)!=null&&he.addLookupKeys)this.i18nFormat.addLookupKeys(X,g,G,U,i);else{let fe;b&&(fe=this.pluralResolver.getSuffix(G,i.count,i));const re=`${this.options.pluralSeparator}zero`,ee=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(X.push(g+fe),i.ordinal&&fe.indexOf(ee)===0&&X.push(g+fe.replace(ee,this.options.pluralSeparator)),k&&X.push(g+re)),N){const oe=`${g}${this.options.contextSeparator}${i.context}`;X.push(oe),b&&(X.push(oe+fe),i.ordinal&&fe.indexOf(ee)===0&&X.push(oe+fe.replace(ee,this.options.pluralSeparator)),k&&X.push(oe+re))}}let F;for(;F=X.pop();)this.isValidLookup(a)||(u=F,a=this.getResource(G,U,F,i))}))})}),{res:a,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,i,a,l={}){var u;return(u=this.i18nFormat)!=null&&u.getResource?this.i18nFormat.getResource(n,i,a,l):this.resourceStore.getResource(n,i,a,l)}getUsedParamsDetails(n={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=n.replace&&!ce(n.replace);let l=a?n.replace:n;if(a&&typeof n.count<"u"&&(l.count=n.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!a){l={...l};for(const u of i)delete l[u]}return l}static hasDefaultValue(n){const i="defaultValue";for(const a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&i===a.substring(0,i.length)&&n[a]!==void 0)return!0;return!1}}class uy{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wn.create("languageUtils")}getScriptPartFromCode(n){if(n=bs(n),!n||n.indexOf("-")<0)return null;const i=n.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(n){if(n=bs(n),!n||n.indexOf("-")<0)return n;const i=n.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(n){if(ce(n)&&n.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(n)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let i;return n.forEach(a=>{if(i)return;const l=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(l))&&(i=l)}),!i&&this.options.supportedLngs&&n.forEach(a=>{if(i)return;const l=this.getScriptPartFromCode(a);if(this.isSupportedCode(l))return i=l;const u=this.getLanguagePartFromCode(a);if(this.isSupportedCode(u))return i=u;i=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(n,i){if(!n)return[];if(typeof n=="function"&&(n=n(i)),ce(n)&&(n=[n]),Array.isArray(n))return n;if(!i)return n.default||[];let a=n[i];return a||(a=n[this.getScriptPartFromCode(i)]),a||(a=n[this.formatLanguageCode(i)]),a||(a=n[this.getLanguagePartFromCode(i)]),a||(a=n.default),a||[]}toResolveHierarchy(n,i){const a=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],n),l=[],u=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return ce(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(n))):ce(n)&&u(this.formatLanguageCode(n)),a.forEach(f=>{l.indexOf(f)<0&&u(this.formatLanguageCode(f))}),l}}const cy={zero:0,one:1,two:2,few:3,many:4,other:5},fy={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class NN{constructor(n,i={}){this.languageUtils=n,this.options=i,this.logger=wn.create("pluralResolver"),this.pluralRulesCache={}}addRule(n,i){this.rules[n]=i}clearCache(){this.pluralRulesCache={}}getRule(n,i={}){const a=bs(n==="dev"?"en":n),l=i.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:a,type:l});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(a,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),fy;if(!n.match(/-|_/))return fy;const m=this.languageUtils.getLanguagePartFromCode(n);f=this.getRule(m,i)}return this.pluralRulesCache[u]=f,f}needsPlural(n,i={}){let a=this.getRule(n,i);return a||(a=this.getRule("dev",i)),(a==null?void 0:a.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,i,a={}){return this.getSuffixes(n,a).map(l=>`${i}${l}`)}getSuffixes(n,i={}){let a=this.getRule(n,i);return a||(a=this.getRule("dev",i)),a?a.resolvedOptions().pluralCategories.sort((l,u)=>cy[l]-cy[u]).map(l=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(n,i,a={}){const l=this.getRule(n,a);return l?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l.select(i)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",i,a))}}const dy=(t,n,i,a=".",l=!0)=>{let u=mN(t,n,i);return!u&&l&&ce(i)&&(u=Uf(t,i,a),u===void 0&&(u=Uf(n,i,a))),u},mf=t=>t.replace(/\$/g,"$$$$");class kN{constructor(n={}){var i;this.logger=wn.create("interpolator"),this.options=n,this.format=((i=n==null?void 0:n.interpolation)==null?void 0:i.format)||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:i,escapeValue:a,useRawValueToEscape:l,prefix:u,prefixEscaped:f,suffix:d,suffixEscaped:m,formatSeparator:p,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:b,nestingPrefixEscaped:k,nestingSuffix:N,nestingSuffixEscaped:T,nestingOptionsSeparator:U,maxReplaces:M,alwaysFormat:z}=n.interpolation;this.escape=i!==void 0?i:yN,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=u?Gr(u):f||"{{",this.suffix=d?Gr(d):m||"}}",this.formatSeparator=p||",",this.unescapePrefix=g?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=b?Gr(b):k||Gr("$t("),this.nestingSuffix=N?Gr(N):T||Gr(")"),this.nestingOptionsSeparator=U||",",this.maxReplaces=M||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(i,a)=>(i==null?void 0:i.source)===a?(i.lastIndex=0,i):new RegExp(a,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,i,a,l){var k;let u,f,d;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=N=>{if(N.indexOf(this.formatSeparator)<0){const z=dy(i,m,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(z,void 0,a,{...l,...i,interpolationkey:N}):z}const T=N.split(this.formatSeparator),U=T.shift().trim(),M=T.join(this.formatSeparator).trim();return this.format(dy(i,m,U,this.options.keySeparator,this.options.ignoreJSONStructure),M,a,{...l,...i,interpolationkey:U})};this.resetRegExp();const g=(l==null?void 0:l.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((k=l==null?void 0:l.interpolation)==null?void 0:k.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>mf(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?mf(this.escape(N)):mf(N)}].forEach(N=>{for(d=0;u=N.regex.exec(n);){const T=u[1].trim();if(f=p(T),f===void 0)if(typeof g=="function"){const M=g(n,u,l);f=ce(M)?M:""}else if(l&&Object.prototype.hasOwnProperty.call(l,T))f="";else if(v){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${n}`),f="";else!ce(f)&&!this.useRawValueToEscape&&(f=ny(f));const U=N.safeValue(f);if(n=n.replace(u[0],U),v?(N.regex.lastIndex+=f.length,N.regex.lastIndex-=u[0].length):N.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,i,a={}){let l,u,f;const d=(m,p)=>{const g=this.nestingOptionsSeparator;if(m.indexOf(g)<0)return m;const v=m.split(new RegExp(`${g}[ ]*{`));let b=`{${v[1]}`;m=v[0],b=this.interpolate(b,f);const k=b.match(/'/g),N=b.match(/"/g);(((k==null?void 0:k.length)??0)%2===0&&!N||N.length%2!==0)&&(b=b.replace(/'/g,'"'));try{f=JSON.parse(b),p&&(f={...p,...f})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,T),`${m}${g}${b}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,m};for(;l=this.nestingRegexp.exec(n);){let m=[];f={...a},f=f.replace&&!ce(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;let p=!1;if(l[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(l[1])){const g=l[1].split(this.formatSeparator).map(v=>v.trim());l[1]=g.shift(),m=g,p=!0}if(u=i(d.call(this,l[1].trim(),f),f),u&&l[0]===n&&!ce(u))return u;ce(u)||(u=ny(u)),u||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${n}`),u=""),p&&(u=m.reduce((g,v)=>this.format(g,v,a.lng,{...a,interpolationkey:l[1].trim()}),u.trim())),n=n.replace(l[0],u),this.regexp.lastIndex=0}return n}}const RN=t=>{let n=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const a=t.split("(");n=a[0].toLowerCase().trim();const l=a[1].substring(0,a[1].length-1);n==="currency"&&l.indexOf(":")<0?i.currency||(i.currency=l.trim()):n==="relativetime"&&l.indexOf(":")<0?i.range||(i.range=l.trim()):l.split(";").forEach(f=>{if(f){const[d,...m]=f.split(":"),p=m.join(":").trim().replace(/^'+|'+$/g,""),g=d.trim();i[g]||(i[g]=p),p==="false"&&(i[g]=!1),p==="true"&&(i[g]=!0),isNaN(p)||(i[g]=parseInt(p,10))}})}return{formatName:n,formatOptions:i}},hy=t=>{const n={};return(i,a,l)=>{let u=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(u={...u,[l.interpolationkey]:void 0});const f=a+JSON.stringify(u);let d=n[f];return d||(d=t(bs(a),l),n[f]=d),d(i)}},EN=t=>(n,i,a)=>t(bs(i),a)(n);class AN{constructor(n={}){this.logger=wn.create("formatter"),this.options=n,this.init(n)}init(n,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const a=i.cacheInBuiltFormats?hy:EN;this.formats={number:a((l,u)=>{const f=new Intl.NumberFormat(l,{...u});return d=>f.format(d)}),currency:a((l,u)=>{const f=new Intl.NumberFormat(l,{...u,style:"currency"});return d=>f.format(d)}),datetime:a((l,u)=>{const f=new Intl.DateTimeFormat(l,{...u});return d=>f.format(d)}),relativetime:a((l,u)=>{const f=new Intl.RelativeTimeFormat(l,{...u});return d=>f.format(d,u.range||"day")}),list:a((l,u)=>{const f=new Intl.ListFormat(l,{...u});return d=>f.format(d)})}}add(n,i){this.formats[n.toLowerCase().trim()]=i}addCached(n,i){this.formats[n.toLowerCase().trim()]=hy(i)}format(n,i,a,l={}){const u=i.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(m=>m.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,m)=>{var v;const{formatName:p,formatOptions:g}=RN(m);if(this.formats[p]){let b=d;try{const k=((v=l==null?void 0:l.formatParams)==null?void 0:v[l.interpolationkey])||{},N=k.locale||k.lng||l.locale||l.lng||a;b=this.formats[p](d,N,{...g,...l,...k})}catch(k){this.logger.warn(k)}return b}else this.logger.warn(`there was no format function for ${p}`);return d},n)}}const $N=(t,n)=>{t.pending[n]!==void 0&&(delete t.pending[n],t.pendingCount--)};class CN extends zo{constructor(n,i,a,l={}){var u,f;super(),this.backend=n,this.store=i,this.services=a,this.languageUtils=a.languageUtils,this.options=l,this.logger=wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],(f=(u=this.backend)==null?void 0:u.init)==null||f.call(u,a,l.backend,l)}queueLoad(n,i,a,l){const u={},f={},d={},m={};return n.forEach(p=>{let g=!0;i.forEach(v=>{const b=`${p}|${v}`;!a.reload&&this.store.hasResourceBundle(p,v)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?f[b]===void 0&&(f[b]=!0):(this.state[b]=1,g=!1,f[b]===void 0&&(f[b]=!0),u[b]===void 0&&(u[b]=!0),m[v]===void 0&&(m[v]=!0)))}),g||(d[p]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(m)}}loaded(n,i,a){const l=n.split("|"),u=l[0],f=l[1];i&&this.emit("failedLoading",u,f,i),!i&&a&&this.store.addResourceBundle(u,f,a,void 0,void 0,{skipCopy:!0}),this.state[n]=i?-1:2,i&&a&&(this.state[n]=0);const d={};this.queue.forEach(m=>{pN(m.loaded,[u],f),$N(m,n),i&&m.errors.push(i),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(p=>{d[p]||(d[p]={});const g=m.loaded[p];g.length&&g.forEach(v=>{d[p][v]===void 0&&(d[p][v]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(m=>!m.done)}read(n,i,a,l=0,u=this.retryTimeout,f){if(!n.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:i,fcName:a,tried:l,wait:u,callback:f});return}this.readingCalls++;const d=(p,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(p&&g&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,n,i,a,l+1,u*2,f)},u);return}f(p,g)},m=this.backend[a].bind(this.backend);if(m.length===2){try{const p=m(n,i);p&&typeof p.then=="function"?p.then(g=>d(null,g)).catch(d):d(null,p)}catch(p){d(p)}return}return m(n,i,d)}prepareLoading(n,i,a={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();ce(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ce(i)&&(i=[i]);const u=this.queueLoad(n,i,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(n,i,a){this.prepareLoading(n,i,{},a)}reload(n,i,a){this.prepareLoading(n,i,{reload:!0},a)}loadOne(n,i=""){const a=n.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,(f,d)=>{f&&this.logger.warn(`${i}loading namespace ${u} for language ${l} failed`,f),!f&&d&&this.logger.log(`${i}loaded namespace ${u} for language ${l}`,d),this.loaded(n,f,d)})}saveMissing(n,i,a,l,u,f={},d=()=>{}){var m,p,g,v,b;if((p=(m=this.services)==null?void 0:m.utils)!=null&&p.hasLoadedNamespace&&!((v=(g=this.services)==null?void 0:g.utils)!=null&&v.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${a}" as the namespace "${i}" 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(!(a==null||a==="")){if((b=this.backend)!=null&&b.create){const k={...f,isUpdate:u},N=this.backend.create.bind(this.backend);if(N.length<6)try{let T;N.length===5?T=N(n,i,a,l,k):T=N(n,i,a,l),T&&typeof T.then=="function"?T.then(U=>d(null,U)).catch(d):d(null,T)}catch(T){d(T)}else N(n,i,a,l,d,k)}!n||!n[0]||this.store.addResource(n[0],i,a,l)}}}const py=()=>({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:t=>{let n={};if(typeof t[1]=="object"&&(n=t[1]),ce(t[1])&&(n.defaultValue=t[1]),ce(t[2])&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const i=t[3]||t[2];Object.keys(i).forEach(a=>{n[a]=i[a]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),my=t=>{var n,i;return ce(t.ns)&&(t.ns=[t.ns]),ce(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),ce(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((i=(n=t.supportedLngs)==null?void 0:n.indexOf)==null?void 0:i.call(n,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},no=()=>{},TN=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(i=>{typeof t[i]=="function"&&(t[i]=t[i].bind(t))})};class xs extends zo{constructor(n={},i){if(super(),this.options=my(n),this.services={},this.logger=wn,this.modules={external:[]},TN(this),i&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,i),this;setTimeout(()=>{this.init(n,i)},0)}}init(n={},i){this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),n.defaultNS==null&&n.ns&&(ce(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const a=py();this.options={...a,...this.options,...my(n)},this.options.interpolation={...a.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const l=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wn.init(l(this.modules.logger),this.options):wn.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=AN;const g=new uy(this.options);this.store=new sy(this.options.resources,this.options);const v=this.services;v.logger=wn,v.resourceStore=this.store,v.languageUtils=g,v.pluralResolver=new NN(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(v.formatter=l(p),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new kN(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new CN(l(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(b,...k)=>{this.emit(b,...k)}),this.modules.languageDetector&&(v.languageDetector=l(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=l(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new So(this.services,this.options),this.translator.on("*",(b,...k)=>{this.emit(b,...k)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,i||(i=no),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...g)=>this.store[p](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...g)=>(this.store[p](...g),this)});const d=os(),m=()=>{const p=(g,v)=>{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),d.resolve(v),i(g,v)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),d}loadResources(n,i=no){var u,f;let a=i;const l=ce(n)?n:this.language;if(typeof n=="function"&&(a=n),!this.options.resources||this.options.partialBundledLanguages){if((l==null?void 0:l.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const d=[],m=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(v=>{v!=="cimode"&&d.indexOf(v)<0&&d.push(v)})};l?m(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>m(g)),(f=(u=this.options.preload)==null?void 0:u.forEach)==null||f.call(u,p=>m(p)),this.services.backendConnector.load(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(p)})}else a(null)}reloadResources(n,i,a){const l=os();return typeof n=="function"&&(a=n,n=void 0),typeof i=="function"&&(a=i,i=void 0),n||(n=this.languages),i||(i=this.options.ns),a||(a=no),this.services.backendConnector.reload(n,i,u=>{l.resolve(),a(u)}),l}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&Fv.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let i=0;i<this.languages.length;i++){const a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,i){this.isLanguageChangingTo=n;const a=os();this.emit("languageChanging",n);const l=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,m)=>{m?this.isLanguageChangingTo===n&&(l(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,a.resolve((...p)=>this.t(...p)),i&&i(d,(...p)=>this.t(...p))},f=d=>{var g,v;!n&&!d&&this.services.languageDetector&&(d=[]);const m=ce(d)?d:d&&d[0],p=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ce(d)?[d]:d);p&&(this.language||l(p),this.translator.language||this.translator.changeLanguage(p),(v=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||v.call(g,p)),this.loadResources(p,b=>{u(b,p)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(n),a}getFixedT(n,i,a){const l=(u,f,...d)=>{let m;typeof f!="object"?m=this.options.overloadTranslationOptionHandler([u,f].concat(d)):m={...f},m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||a||l.keyPrefix);const p=this.options.keySeparator||".";let g;return m.keyPrefix&&Array.isArray(u)?g=u.map(v=>`${m.keyPrefix}${p}${v}`):g=m.keyPrefix?`${m.keyPrefix}${p}${u}`:u,this.t(g,m)};return ce(n)?l.lng=n:l.lngs=n,l.ns=i,l.keyPrefix=a,l}t(...n){var i;return(i=this.translator)==null?void 0:i.translate(...n)}exists(...n){var i;return(i=this.translator)==null?void 0:i.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,i={}){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 a=i.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const f=(d,m)=>{const p=this.services.backendConnector.state[`${d}|${m}`];return p===-1||p===0||p===2};if(i.precheck){const d=i.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(a,n)&&(!l||f(u,n)))}loadNamespaces(n,i){const a=os();return this.options.ns?(ce(n)&&(n=[n]),n.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{a.resolve(),i&&i(l)}),a):(i&&i(),Promise.resolve())}loadLanguages(n,i){const a=os();ce(n)&&(n=[n]);const l=this.options.preload||[],u=n.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=l.concat(u),this.loadResources(f=>{a.resolve(),i&&i(f)}),a):(i&&i(),Promise.resolve())}dir(n){var l,u;if(n||(n=this.resolvedLanguage||(((l=this.languages)==null?void 0:l.length)>0?this.languages[0]:this.language)),!n)return"rtl";const i=["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"],a=((u=this.services)==null?void 0:u.languageUtils)||new uy(py());return i.indexOf(a.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},i){return new xs(n,i)}cloneInstance(n={},i=no){const a=n.forkResourceStore;a&&delete n.forkResourceStore;const l={...this.options,...n,isClone:!0},u=new xs(l);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},a){const d=Object.keys(this.store.data).reduce((m,p)=>(m[p]={...this.store.data[p]},m[p]=Object.keys(m[p]).reduce((g,v)=>(g[v]={...m[p][v]},g),m[p]),m),{});u.store=new sy(d,l),u.services.resourceStore=u.store}return u.translator=new So(u.services,l),u.translator.on("*",(d,...m)=>{u.emit(d,...m)}),u.init(l,i),u.translator.options=l,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const bt=xs.createInstance();bt.createInstance=xs.createInstance;bt.createInstance;bt.dir;bt.init;bt.loadResources;bt.reloadResources;bt.use;bt.changeLanguage;bt.getFixedT;bt.t;bt.exists;bt.setDefaultNamespace;bt.hasLoadedNamespace;bt.loadNamespaces;bt.loadLanguages;var gf={exports:{}},me={};/**
9
+ */var yp;function z0(){if(yp)return ii;yp=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,o,f){var p=null;if(f!==void 0&&(p=""+f),o.key!==void 0&&(p=""+o.key),"key"in o){f={};for(var h in o)h!=="key"&&(f[h]=o[h])}else f=o;return o=f.ref,{$$typeof:i,type:s,key:p,ref:o!==void 0?o:null,props:f}}return ii.Fragment=n,ii.jsx=r,ii.jsxs=r,ii}var bp;function D0(){return bp||(bp=1,wo.exports=z0()),wo.exports}var b=D0();const ie=i=>typeof i=="string",ri=()=>{let i,n;const r=new Promise((s,o)=>{i=s,n=o});return r.resolve=i,r.reject=n,r},xp=i=>i==null?"":""+i,_0=(i,n,r)=>{i.forEach(s=>{n[s]&&(r[s]=n[s])})},M0=/###/g,Sp=i=>i&&i.indexOf("###")>-1?i.replace(M0,"."):i,Np=i=>!i||ie(i),di=(i,n,r)=>{const s=ie(n)?n.split("."):n;let o=0;for(;o<s.length-1;){if(Np(i))return{};const f=Sp(s[o]);!i[f]&&r&&(i[f]=new r),Object.prototype.hasOwnProperty.call(i,f)?i=i[f]:i={},++o}return Np(i)?{}:{obj:i,k:Sp(s[o])}},Ep=(i,n,r)=>{const{obj:s,k:o}=di(i,n,Object);if(s!==void 0||n.length===1){s[o]=r;return}let f=n[n.length-1],p=n.slice(0,n.length-1),h=di(i,p,Object);for(;h.obj===void 0&&p.length;)f=`${p[p.length-1]}.${f}`,p=p.slice(0,p.length-1),h=di(i,p,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${f}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${f}`]=r},U0=(i,n,r,s)=>{const{obj:o,k:f}=di(i,n,Object);o[f]=o[f]||[],o[f].push(r)},Jr=(i,n)=>{const{obj:r,k:s}=di(i,n);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},B0=(i,n,r)=>{const s=Jr(i,r);return s!==void 0?s:Jr(n,r)},sm=(i,n,r)=>{for(const s in n)s!=="__proto__"&&s!=="constructor"&&(s in i?ie(i[s])||i[s]instanceof String||ie(n[s])||n[s]instanceof String?r&&(i[s]=n[s]):sm(i[s],n[s],r):i[s]=n[s]);return i},al=i=>i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var H0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const V0=i=>ie(i)?i.replace(/[&<>"'\/]/g,n=>H0[n]):i;class $0{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const r=this.regExpMap.get(n);if(r!==void 0)return r;const s=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,s),this.regExpQueue.push(n),s}}const q0=[" ",",","?","!",";"],G0=new $0(20),Y0=(i,n,r)=>{n=n||"",r=r||"";const s=q0.filter(p=>n.indexOf(p)<0&&r.indexOf(p)<0);if(s.length===0)return!0;const o=G0.getRegExp(`(${s.map(p=>p==="?"?"\\?":p).join("|")})`);let f=!o.test(i);if(!f){const p=i.indexOf(r);p>0&&!o.test(i.substring(0,p))&&(f=!0)}return f},Uo=(i,n,r=".")=>{if(!i)return;if(i[n])return Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0;const s=n.split(r);let o=i;for(let f=0;f<s.length;){if(!o||typeof o!="object")return;let p,h="";for(let m=f;m<s.length;++m)if(m!==f&&(h+=r),h+=s[m],p=o[h],p!==void 0){if(["string","number","boolean"].indexOf(typeof p)>-1&&m<s.length-1)continue;f+=m-f+1;break}o=p}return o},pi=i=>i==null?void 0:i.replace("_","-"),Q0={type:"logger",log(i){this.output("log",i)},warn(i){this.output("warn",i)},error(i){this.output("error",i)},output(i,n){var r,s;(s=(r=console==null?void 0:console[i])==null?void 0:r.apply)==null||s.call(r,console,n)}};class Fr{constructor(n,r={}){this.init(n,r)}init(n,r={}){this.prefix=r.prefix||"i18next:",this.logger=n||Q0,this.options=r,this.debug=r.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,r,s,o){return o&&!this.debug?null:(ie(n[0])&&(n[0]=`${s}${this.prefix} ${n[0]}`),this.logger[r](n))}create(n){return new Fr(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Fr(this.logger,n)}}var Wt=new Fr;class as{constructor(){this.observers={}}on(n,r){return n.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(r)||0;this.observers[s].set(r,o+1)}),this}off(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n].delete(r)}}emit(n,...r){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([o,f])=>{for(let p=0;p<f;p++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,f])=>{for(let p=0;p<f;p++)o.apply(o,[n,...r])})}}class Rp extends as{constructor(n,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}getResource(n,r,s,o={}){var d,v;const f=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,p=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;n.indexOf(".")>-1?h=n.split("."):(h=[n,r],s&&(Array.isArray(s)?h.push(...s):ie(s)&&f?h.push(...s.split(f)):h.push(s)));const m=Jr(this.data,h);return!m&&!r&&!s&&n.indexOf(".")>-1&&(n=h[0],r=h[1],s=h.slice(2).join(".")),m||!p||!ie(s)?m:Uo((v=(d=this.data)==null?void 0:d[n])==null?void 0:v[r],s,f)}addResource(n,r,s,o,f={silent:!1}){const p=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let h=[n,r];s&&(h=h.concat(p?s.split(p):s)),n.indexOf(".")>-1&&(h=n.split("."),o=r,r=h[1]),this.addNamespaces(r),Ep(this.data,h,o),f.silent||this.emit("added",n,r,s,o)}addResources(n,r,s,o={silent:!1}){for(const f in s)(ie(s[f])||Array.isArray(s[f]))&&this.addResource(n,r,f,s[f],{silent:!0});o.silent||this.emit("added",n,r,s)}addResourceBundle(n,r,s,o,f,p={silent:!1,skipCopy:!1}){let h=[n,r];n.indexOf(".")>-1&&(h=n.split("."),o=s,s=r,r=h[1]),this.addNamespaces(r);let m=Jr(this.data,h)||{};p.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?sm(m,s,f):m={...m,...s},Ep(this.data,h,m),p.silent||this.emit("added",n,r,s)}removeResourceBundle(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}hasResourceBundle(n,r){return this.getResource(n,r)!==void 0}getResourceBundle(n,r){return r||(r=this.options.defaultNS),this.getResource(n,r)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const r=this.getDataByLanguage(n);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var um={processors:{},addPostProcessor(i){this.processors[i.name]=i},handle(i,n,r,s,o){return i.forEach(f=>{var p;n=((p=this.processors[f])==null?void 0:p.process(n,r,s,o))??n}),n}};const wp={},Tp=i=>!ie(i)&&typeof i!="boolean"&&typeof i!="number";class Pr extends as{constructor(n,r={}){super(),_0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wt.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,r={interpolation:{}}){const s={...r};if(n==null)return!1;const o=this.resolve(n,s);return(o==null?void 0:o.res)!==void 0}extractFromKey(n,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const p=s&&n.indexOf(s)>-1,h=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Y0(n,s,o);if(p&&!h){const m=n.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:n,namespaces:ie(f)?[f]:f};const d=n.split(s);(s!==o||s===o&&this.options.ns.indexOf(d[0])>-1)&&(f=d.shift()),n=d.join(o)}return{key:n,namespaces:ie(f)?[f]:f}}translate(n,r,s){let o=typeof r=="object"?{...r}:r;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const f=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,p=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:h,namespaces:m}=this.extractFromKey(n[n.length-1],o),d=m[m.length-1];let v=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const S=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((S==null?void 0:S.toLowerCase())==="cimode")return x?f?{res:`${d}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:S,usedNS:d,usedParams:this.getUsedParamsDetails(o)}:`${d}${v}${h}`:f?{res:h,usedKey:h,exactUsedKey:h,usedLng:S,usedNS:d,usedParams:this.getUsedParamsDetails(o)}:h;const C=this.resolve(n,o);let E=C==null?void 0:C.res;const L=(C==null?void 0:C.usedKey)||h,V=(C==null?void 0:C.exactUsedKey)||h,M=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,X=o.count!==void 0&&!ie(o.count),K=Pr.hasDefaultValue(o),se=X?this.pluralResolver.getSuffix(S,o.count,o):"",re=o.ordinal&&X?this.pluralResolver.getSuffix(S,o.count,{ordinal:!1}):"",ee=X&&!o.ordinal&&o.count===0,F=ee&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${se}`]||o[`defaultValue${re}`]||o.defaultValue;let ne=E;G&&!E&&K&&(ne=F);const pe=Tp(ne),Ke=Object.prototype.toString.apply(ne);if(G&&ne&&pe&&M.indexOf(Ke)<0&&!(ie(D)&&Array.isArray(ne))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Xe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(L,ne,{...o,ns:m}):`key '${h} (${this.language})' returned an object instead of string.`;return f?(C.res=Xe,C.usedParams=this.getUsedParamsDetails(o),C):Xe}if(p){const Xe=Array.isArray(ne),Ge=Xe?[]:{},Ye=Xe?V:L;for(const _ in ne)if(Object.prototype.hasOwnProperty.call(ne,_)){const Y=`${Ye}${p}${_}`;K&&!E?Ge[_]=this.translate(Y,{...o,defaultValue:Tp(F)?F[_]:void 0,joinArrays:!1,ns:m}):Ge[_]=this.translate(Y,{...o,joinArrays:!1,ns:m}),Ge[_]===Y&&(Ge[_]=ne[_])}E=Ge}}else if(G&&ie(D)&&Array.isArray(E))E=E.join(D),E&&(E=this.extendTranslation(E,n,o,s));else{let Xe=!1,Ge=!1;!this.isValidLookup(E)&&K&&(Xe=!0,E=F),this.isValidLookup(E)||(Ge=!0,E=h);const _=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ge?void 0:E,Y=K&&F!==E&&this.options.updateMissing;if(Ge||Xe||Y){if(this.logger.log(Y?"updateKey":"missingKey",S,d,h,Y?F:E),p){const $=this.resolve(h,{...o,keySeparator:!1});$&&$.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 W=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let $=0;$<ye.length;$++)W.push(ye[$]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(o.lng||this.language):W.push(o.lng||this.language);const R=($,Z,Q)=>{var me;const I=K&&Q!==E?Q:_;this.options.missingKeyHandler?this.options.missingKeyHandler($,d,Z,I,Y,o):(me=this.backendConnector)!=null&&me.saveMissing&&this.backendConnector.saveMissing($,d,Z,I,Y,o),this.emit("missingKey",$,d,Z,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?W.forEach($=>{const Z=this.pluralResolver.getSuffixes($,o);ee&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Z.indexOf(`${this.options.pluralSeparator}zero`)<0&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(Q=>{R([$],h+Q,o[`defaultValue${Q}`]||F)})}):R(W,h,F))}E=this.extendTranslation(E,n,o,C,s),Ge&&E===h&&this.options.appendNamespaceToMissingKey&&(E=`${d}${v}${h}`),(Ge||Xe)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}${v}${h}`:h,Xe?E:void 0,o))}return f?(C.res=E,C.usedParams=this.getUsedParamsDetails(o),C):E}extendTranslation(n,r,s,o,f){var m,d;if((m=this.i18nFormat)!=null&&m.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const v=ie(n)&&(((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let S;if(v){const C=n.match(this.interpolator.nestingRegexp);S=C&&C.length}let x=s.replace&&!ie(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),n=this.interpolator.interpolate(n,x,s.lng||this.language||o.usedLng,s),v){const C=n.match(this.interpolator.nestingRegexp),E=C&&C.length;S<E&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(n=this.interpolator.nest(n,(...C)=>(f==null?void 0:f[0])===C[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${r[0]}`),null):this.translate(...C,r),s)),s.interpolation&&this.interpolator.reset()}const p=s.postProcess||this.options.postProcess,h=ie(p)?[p]:p;return n!=null&&(h!=null&&h.length)&&s.applyPostProcessor!==!1&&(n=um.handle(h,n,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),n}resolve(n,r={}){let s,o,f,p,h;return ie(n)&&(n=[n]),n.forEach(m=>{if(this.isValidLookup(s))return;const d=this.extractFromKey(m,r),v=d.key;o=v;let S=d.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const x=r.count!==void 0&&!ie(r.count),C=x&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(ie(r.context)||typeof r.context=="number")&&r.context!=="",L=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);S.forEach(V=>{var M,D;this.isValidLookup(s)||(h=V,!wp[`${L[0]}-${V}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((D=this.utils)!=null&&D.hasLoadedNamespace(h))&&(wp[`${L[0]}-${V}`]=!0,this.logger.warn(`key "${o}" for languages "${L.join(", ")}" won't get resolved as namespace "${h}" 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!!!")),L.forEach(G=>{var se;if(this.isValidLookup(s))return;p=G;const X=[v];if((se=this.i18nFormat)!=null&&se.addLookupKeys)this.i18nFormat.addLookupKeys(X,v,G,V,r);else{let re;x&&(re=this.pluralResolver.getSuffix(G,r.count,r));const ee=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(X.push(v+re),r.ordinal&&re.indexOf(F)===0&&X.push(v+re.replace(F,this.options.pluralSeparator)),C&&X.push(v+ee)),E){const ne=`${v}${this.options.contextSeparator}${r.context}`;X.push(ne),x&&(X.push(ne+re),r.ordinal&&re.indexOf(F)===0&&X.push(ne+re.replace(F,this.options.pluralSeparator)),C&&X.push(ne+ee))}}let K;for(;K=X.pop();)this.isValidLookup(s)||(f=K,s=this.getResource(G,V,K,r))}))})}),{res:s,usedKey:o,exactUsedKey:f,usedLng:p,usedNS:h}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,r,s,o={}){var f;return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(n,r,s,o):this.resourceStore.getResource(n,r,s,o)}getUsedParamsDetails(n={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=n.replace&&!ie(n.replace);let o=s?n.replace:n;if(s&&typeof n.count<"u"&&(o.count=n.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const f of r)delete o[f]}return o}static hasDefaultValue(n){const r="defaultValue";for(const s in n)if(Object.prototype.hasOwnProperty.call(n,s)&&r===s.substring(0,r.length)&&n[s]!==void 0)return!0;return!1}}class Cp{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wt.create("languageUtils")}getScriptPartFromCode(n){if(n=pi(n),!n||n.indexOf("-")<0)return null;const r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(n){if(n=pi(n),!n||n.indexOf("-")<0)return n;const r=n.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(n){if(ie(n)&&n.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(n)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let r;return n.forEach(s=>{if(r)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&n.forEach(s=>{if(r)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return r=o;const f=this.getLanguagePartFromCode(s);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(p=>{if(p===f)return p;if(!(p.indexOf("-")<0&&f.indexOf("-")<0)&&(p.indexOf("-")>0&&f.indexOf("-")<0&&p.substring(0,p.indexOf("-"))===f||p.indexOf(f)===0&&f.length>1))return p})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),ie(n)&&(n=[n]),Array.isArray(n))return n;if(!r)return n.default||[];let s=n[r];return s||(s=n[this.getScriptPartFromCode(r)]),s||(s=n[this.formatLanguageCode(r)]),s||(s=n[this.getLanguagePartFromCode(r)]),s||(s=n.default),s||[]}toResolveHierarchy(n,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],n),o=[],f=p=>{p&&(this.isSupportedCode(p)?o.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return ie(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(n))):ie(n)&&f(this.formatLanguageCode(n)),s.forEach(p=>{o.indexOf(p)<0&&f(this.formatLanguageCode(p))}),o}}const jp={zero:0,one:1,two:2,few:3,many:4,other:5},Ap={select:i=>i===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Z0{constructor(n,r={}){this.languageUtils=n,this.options=r,this.logger=Wt.create("pluralResolver"),this.pluralRulesCache={}}addRule(n,r){this.rules[n]=r}clearCache(){this.pluralRulesCache={}}getRule(n,r={}){const s=pi(n==="dev"?"en":n),o=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:s,type:o});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let p;try{p=new Intl.PluralRules(s,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ap;if(!n.match(/-|_/))return Ap;const m=this.languageUtils.getLanguagePartFromCode(n);p=this.getRule(m,r)}return this.pluralRulesCache[f]=p,p}needsPlural(n,r={}){let s=this.getRule(n,r);return s||(s=this.getRule("dev",r)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,r,s={}){return this.getSuffixes(n,s).map(o=>`${r}${o}`)}getSuffixes(n,r={}){let s=this.getRule(n,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((o,f)=>jp[o]-jp[f]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(n,r,s={}){const o=this.getRule(n,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",r,s))}}const Op=(i,n,r,s=".",o=!0)=>{let f=B0(i,n,r);return!f&&o&&ie(r)&&(f=Uo(i,r,s),f===void 0&&(f=Uo(n,r,s))),f},To=i=>i.replace(/\$/g,"$$$$");class K0{constructor(n={}){var r;this.logger=Wt.create("interpolator"),this.options=n,this.format=((r=n==null?void 0:n.interpolation)==null?void 0:r.format)||(s=>s),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:o,prefix:f,prefixEscaped:p,suffix:h,suffixEscaped:m,formatSeparator:d,unescapeSuffix:v,unescapePrefix:S,nestingPrefix:x,nestingPrefixEscaped:C,nestingSuffix:E,nestingSuffixEscaped:L,nestingOptionsSeparator:V,maxReplaces:M,alwaysFormat:D}=n.interpolation;this.escape=r!==void 0?r:V0,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=f?al(f):p||"{{",this.suffix=h?al(h):m||"}}",this.formatSeparator=d||",",this.unescapePrefix=v?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=x?al(x):C||al("$t("),this.nestingSuffix=E?al(E):L||al(")"),this.nestingOptionsSeparator=V||",",this.maxReplaces=M||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(r,s)=>(r==null?void 0:r.source)===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,r,s,o){var C;let f,p,h;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=E=>{if(E.indexOf(this.formatSeparator)<0){const D=Op(r,m,E,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,s,{...o,...r,interpolationkey:E}):D}const L=E.split(this.formatSeparator),V=L.shift().trim(),M=L.join(this.formatSeparator).trim();return this.format(Op(r,m,V,this.options.keySeparator,this.options.ignoreJSONStructure),M,s,{...o,...r,interpolationkey:V})};this.resetRegExp();const v=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((C=o==null?void 0:o.interpolation)==null?void 0:C.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:E=>To(E)},{regex:this.regexp,safeValue:E=>this.escapeValue?To(this.escape(E)):To(E)}].forEach(E=>{for(h=0;f=E.regex.exec(n);){const L=f[1].trim();if(p=d(L),p===void 0)if(typeof v=="function"){const M=v(n,f,o);p=ie(M)?M:""}else if(o&&Object.prototype.hasOwnProperty.call(o,L))p="";else if(S){p=f[0];continue}else this.logger.warn(`missed to pass in variable ${L} for interpolating ${n}`),p="";else!ie(p)&&!this.useRawValueToEscape&&(p=xp(p));const V=E.safeValue(p);if(n=n.replace(f[0],V),S?(E.regex.lastIndex+=p.length,E.regex.lastIndex-=f[0].length):E.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),n}nest(n,r,s={}){let o,f,p;const h=(m,d)=>{const v=this.nestingOptionsSeparator;if(m.indexOf(v)<0)return m;const S=m.split(new RegExp(`${v}[ ]*{`));let x=`{${S[1]}`;m=S[0],x=this.interpolate(x,p);const C=x.match(/'/g),E=x.match(/"/g);(((C==null?void 0:C.length)??0)%2===0&&!E||E.length%2!==0)&&(x=x.replace(/'/g,'"'));try{p=JSON.parse(x),d&&(p={...d,...p})}catch(L){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,L),`${m}${v}${x}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,m};for(;o=this.nestingRegexp.exec(n);){let m=[];p={...s},p=p.replace&&!ie(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;let d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const v=o[1].split(this.formatSeparator).map(S=>S.trim());o[1]=v.shift(),m=v,d=!0}if(f=r(h.call(this,o[1].trim(),p),p),f&&o[0]===n&&!ie(f))return f;ie(f)||(f=xp(f)),f||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${n}`),f=""),d&&(f=m.reduce((v,S)=>this.format(v,S,s.lng,{...s,interpolationkey:o[1].trim()}),f.trim())),n=n.replace(o[0],f),this.regexp.lastIndex=0}return n}}const X0=i=>{let n=i.toLowerCase().trim();const r={};if(i.indexOf("(")>-1){const s=i.split("(");n=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);n==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):n==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(p=>{if(p){const[h,...m]=p.split(":"),d=m.join(":").trim().replace(/^'+|'+$/g,""),v=h.trim();r[v]||(r[v]=d),d==="false"&&(r[v]=!1),d==="true"&&(r[v]=!0),isNaN(d)||(r[v]=parseInt(d,10))}})}return{formatName:n,formatOptions:r}},kp=i=>{const n={};return(r,s,o)=>{let f=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(f={...f,[o.interpolationkey]:void 0});const p=s+JSON.stringify(f);let h=n[p];return h||(h=i(pi(s),o),n[p]=h),h(r)}},J0=i=>(n,r,s)=>i(pi(r),s)(n);class F0{constructor(n={}){this.logger=Wt.create("formatter"),this.options=n,this.init(n)}init(n,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?kp:J0;this.formats={number:s((o,f)=>{const p=new Intl.NumberFormat(o,{...f});return h=>p.format(h)}),currency:s((o,f)=>{const p=new Intl.NumberFormat(o,{...f,style:"currency"});return h=>p.format(h)}),datetime:s((o,f)=>{const p=new Intl.DateTimeFormat(o,{...f});return h=>p.format(h)}),relativetime:s((o,f)=>{const p=new Intl.RelativeTimeFormat(o,{...f});return h=>p.format(h,f.range||"day")}),list:s((o,f)=>{const p=new Intl.ListFormat(o,{...f});return h=>p.format(h)})}}add(n,r){this.formats[n.toLowerCase().trim()]=r}addCached(n,r){this.formats[n.toLowerCase().trim()]=kp(r)}format(n,r,s,o={}){const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(h=>h.indexOf(")")>-1)){const h=f.findIndex(m=>m.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,h)].join(this.formatSeparator)}return f.reduce((h,m)=>{var S;const{formatName:d,formatOptions:v}=X0(m);if(this.formats[d]){let x=h;try{const C=((S=o==null?void 0:o.formatParams)==null?void 0:S[o.interpolationkey])||{},E=C.locale||C.lng||o.locale||o.lng||s;x=this.formats[d](h,E,{...v,...o,...C})}catch(C){this.logger.warn(C)}return x}else this.logger.warn(`there was no format function for ${d}`);return h},n)}}const P0=(i,n)=>{i.pending[n]!==void 0&&(delete i.pending[n],i.pendingCount--)};class W0 extends as{constructor(n,r,s,o={}){var f,p;super(),this.backend=n,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=Wt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(p=(f=this.backend)==null?void 0:f.init)==null||p.call(f,s,o.backend,o)}queueLoad(n,r,s,o){const f={},p={},h={},m={};return n.forEach(d=>{let v=!0;r.forEach(S=>{const x=`${d}|${S}`;!s.reload&&this.store.hasResourceBundle(d,S)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?p[x]===void 0&&(p[x]=!0):(this.state[x]=1,v=!1,p[x]===void 0&&(p[x]=!0),f[x]===void 0&&(f[x]=!0),m[S]===void 0&&(m[S]=!0)))}),v||(h[d]=!0)}),(Object.keys(f).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(f),pending:Object.keys(p),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}loaded(n,r,s){const o=n.split("|"),f=o[0],p=o[1];r&&this.emit("failedLoading",f,p,r),!r&&s&&this.store.addResourceBundle(f,p,s,void 0,void 0,{skipCopy:!0}),this.state[n]=r?-1:2,r&&s&&(this.state[n]=0);const h={};this.queue.forEach(m=>{U0(m.loaded,[f],p),P0(m,n),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(d=>{h[d]||(h[d]={});const v=m.loaded[d];v.length&&v.forEach(S=>{h[d][S]===void 0&&(h[d][S]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(m=>!m.done)}read(n,r,s,o=0,f=this.retryTimeout,p){if(!n.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:r,fcName:s,tried:o,wait:f,callback:p});return}this.readingCalls++;const h=(d,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(d&&v&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,n,r,s,o+1,f*2,p)},f);return}p(d,v)},m=this.backend[s].bind(this.backend);if(m.length===2){try{const d=m(n,r);d&&typeof d.then=="function"?d.then(v=>h(null,v)).catch(h):h(null,d)}catch(d){h(d)}return}return m(n,r,h)}prepareLoading(n,r,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ie(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ie(r)&&(r=[r]);const f=this.queueLoad(n,r,s,o);if(!f.toLoad.length)return f.pending.length||o(),null;f.toLoad.forEach(p=>{this.loadOne(p)})}load(n,r,s){this.prepareLoading(n,r,{},s)}reload(n,r,s){this.prepareLoading(n,r,{reload:!0},s)}loadOne(n,r=""){const s=n.split("|"),o=s[0],f=s[1];this.read(o,f,"read",void 0,void 0,(p,h)=>{p&&this.logger.warn(`${r}loading namespace ${f} for language ${o} failed`,p),!p&&h&&this.logger.log(`${r}loaded namespace ${f} for language ${o}`,h),this.loaded(n,p,h)})}saveMissing(n,r,s,o,f,p={},h=()=>{}){var m,d,v,S,x;if((d=(m=this.services)==null?void 0:m.utils)!=null&&d.hasLoadedNamespace&&!((S=(v=this.services)==null?void 0:v.utils)!=null&&S.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((x=this.backend)!=null&&x.create){const C={...p,isUpdate:f},E=this.backend.create.bind(this.backend);if(E.length<6)try{let L;E.length===5?L=E(n,r,s,o,C):L=E(n,r,s,o),L&&typeof L.then=="function"?L.then(V=>h(null,V)).catch(h):h(null,L)}catch(L){h(L)}else E(n,r,s,o,h,C)}!n||!n[0]||this.store.addResource(n[0],r,s,o)}}}const Lp=()=>({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:i=>{let n={};if(typeof i[1]=="object"&&(n=i[1]),ie(i[1])&&(n.defaultValue=i[1]),ie(i[2])&&(n.tDescription=i[2]),typeof i[2]=="object"||typeof i[3]=="object"){const r=i[3]||i[2];Object.keys(r).forEach(s=>{n[s]=r[s]})}return n},interpolation:{escapeValue:!0,format:i=>i,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),zp=i=>{var n,r;return ie(i.ns)&&(i.ns=[i.ns]),ie(i.fallbackLng)&&(i.fallbackLng=[i.fallbackLng]),ie(i.fallbackNS)&&(i.fallbackNS=[i.fallbackNS]),((r=(n=i.supportedLngs)==null?void 0:n.indexOf)==null?void 0:r.call(n,"cimode"))<0&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),typeof i.initImmediate=="boolean"&&(i.initAsync=i.initImmediate),i},Br=()=>{},I0=i=>{Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(r=>{typeof i[r]=="function"&&(i[r]=i[r].bind(i))})};class mi extends as{constructor(n={},r){if(super(),this.options=zp(n),this.services={},this.logger=Wt,this.modules={external:[]},I0(this),r&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,r),this;setTimeout(()=>{this.init(n,r)},0)}}init(n={},r){this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(ie(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Lp();this.options={...s,...this.options,...zp(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Wt.init(o(this.modules.logger),this.options):Wt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=F0;const v=new Cp(this.options);this.store=new Rp(this.options.resources,this.options);const S=this.services;S.logger=Wt,S.resourceStore=this.store,S.languageUtils=v,S.pluralResolver=new Z0(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(S.formatter=o(d),S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new K0(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new W0(o(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",(x,...C)=>{this.emit(x,...C)}),this.modules.languageDetector&&(S.languageDetector=o(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=o(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new Pr(this.services,this.options),this.translator.on("*",(x,...C)=>{this.emit(x,...C)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Br),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=(...v)=>this.store[d](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=(...v)=>(this.store[d](...v),this)});const h=ri(),m=()=>{const d=(v,S)=>{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),h.resolve(S),r(v,S)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),h}loadResources(n,r=Br){var f,p;let s=r;const o=ie(n)?n:this.language;if(typeof n=="function"&&(s=n),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const h=[],m=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(S=>{S!=="cimode"&&h.indexOf(S)<0&&h.push(S)})};o?m(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>m(v)),(p=(f=this.options.preload)==null?void 0:f.forEach)==null||p.call(f,d=>m(d)),this.services.backendConnector.load(h,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(n,r,s){const o=ri();return typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=void 0),n||(n=this.languages),r||(r=this.options.ns),s||(s=Br),this.services.backendConnector.reload(n,r,f=>{o.resolve(),s(f)}),o}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&um.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-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(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,r){this.isLanguageChangingTo=n;const s=ri();this.emit("languageChanging",n);const o=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},f=(h,m)=>{m?this.isLanguageChangingTo===n&&(o(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,s.resolve((...d)=>this.t(...d)),r&&r(h,(...d)=>this.t(...d))},p=h=>{var v,S;!n&&!h&&this.services.languageDetector&&(h=[]);const m=ie(h)?h:h&&h[0],d=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ie(h)?[h]:h);d&&(this.language||o(d),this.translator.language||this.translator.changeLanguage(d),(S=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||S.call(v,d)),this.loadResources(d,x=>{f(x,d)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(n),s}getFixedT(n,r,s){const o=(f,p,...h)=>{let m;typeof p!="object"?m=this.options.overloadTranslationOptionHandler([f,p].concat(h)):m={...p},m.lng=m.lng||o.lng,m.lngs=m.lngs||o.lngs,m.ns=m.ns||o.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||s||o.keyPrefix);const d=this.options.keySeparator||".";let v;return m.keyPrefix&&Array.isArray(f)?v=f.map(S=>`${m.keyPrefix}${d}${S}`):v=m.keyPrefix?`${m.keyPrefix}${d}${f}`:f,this.t(v,m)};return ie(n)?o.lng=n:o.lngs=n,o.ns=r,o.keyPrefix=s,o}t(...n){var r;return(r=this.translator)==null?void 0:r.translate(...n)}exists(...n){var r;return(r=this.translator)==null?void 0:r.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,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],o=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const p=(h,m)=>{const d=this.services.backendConnector.state[`${h}|${m}`];return d===-1||d===0||d===2};if(r.precheck){const h=r.precheck(this,p);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(s,n)&&(!o||p(f,n)))}loadNamespaces(n,r){const s=ri();return this.options.ns?(ie(n)&&(n=[n]),n.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),r&&r(o)}),s):(r&&r(),Promise.resolve())}loadLanguages(n,r){const s=ri();ie(n)&&(n=[n]);const o=this.options.preload||[],f=n.filter(p=>o.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return f.length?(this.options.preload=o.concat(f),this.loadResources(p=>{s.resolve(),r&&r(p)}),s):(r&&r(),Promise.resolve())}dir(n){var o,f;if(n||(n=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!n)return"rtl";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=((f=this.services)==null?void 0:f.languageUtils)||new Cp(Lp());return r.indexOf(s.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},r){return new mi(n,r)}cloneInstance(n={},r=Br){const s=n.forkResourceStore;s&&delete n.forkResourceStore;const o={...this.options,...n,isClone:!0},f=new mi(o);if((n.debug!==void 0||n.prefix!==void 0)&&(f.logger=f.logger.clone(n)),["store","services","language"].forEach(h=>{f[h]=this[h]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},s){const h=Object.keys(this.store.data).reduce((m,d)=>(m[d]={...this.store.data[d]},m[d]=Object.keys(m[d]).reduce((v,S)=>(v[S]={...m[d][S]},v),m[d]),m),{});f.store=new Rp(h,o),f.services.resourceStore=f.store}return f.translator=new Pr(f.services,o),f.translator.on("*",(h,...m)=>{f.emit(h,...m)}),f.init(o,r),f.translator.options=o,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const at=mi.createInstance();at.createInstance=mi.createInstance;at.createInstance;at.dir;at.init;at.loadResources;at.reloadResources;at.use;at.changeLanguage;at.getFixedT;at.t;at.exists;at.setDefaultNamespace;at.hasLoadedNamespace;at.loadNamespaces;at.loadLanguages;var Co={exports:{}},oe={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,17 +14,17 @@ var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,config
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var gy;function ON(){if(gy)return me;gy=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function b(E){return E===null||typeof E!="object"?null:(E=v&&E[v]||E["@@iterator"],typeof E=="function"?E:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function U(E,V,Q){this.props=E,this.context=V,this.refs=T,this.updater=Q||k}U.prototype.isReactComponent={},U.prototype.setState=function(E,V){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,V,"setState")},U.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=U.prototype;function z(E,V,Q){this.props=E,this.context=V,this.refs=T,this.updater=Q||k}var G=z.prototype=new M;G.constructor=z,N(G,U.prototype),G.isPureReactComponent=!0;var X=Array.isArray,F={H:null,A:null,T:null,S:null,V:null},he=Object.prototype.hasOwnProperty;function fe(E,V,Q,I,ie,Se){return Q=Se.ref,{$$typeof:t,type:E,key:V,ref:Q!==void 0?Q:null,props:Se}}function re(E,V){return fe(E.type,V,void 0,void 0,void 0,E.props)}function ee(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function oe(E){var V={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(Q){return V[Q]})}var xe=/\/+/g;function ot(E,V){return typeof E=="object"&&E!==null&&E.key!=null?oe(""+E.key):V.toString(36)}function ut(){}function it(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ut,ut):(E.status="pending",E.then(function(V){E.status==="pending"&&(E.status="fulfilled",E.value=V)},function(V){E.status==="pending"&&(E.status="rejected",E.reason=V)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function rt(E,V,Q,I,ie){var Se=typeof E;(Se==="undefined"||Se==="boolean")&&(E=null);var pe=!1;if(E===null)pe=!0;else switch(Se){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(E.$$typeof){case t:case n:pe=!0;break;case g:return pe=E._init,rt(pe(E._payload),V,Q,I,ie)}}if(pe)return ie=ie(E),pe=I===""?"."+ot(E,0):I,X(ie)?(Q="",pe!=null&&(Q=pe.replace(xe,"$&/")+"/"),rt(ie,V,Q,"",function(Fn){return Fn})):ie!=null&&(ee(ie)&&(ie=re(ie,Q+(ie.key==null||E&&E.key===ie.key?"":(""+ie.key).replace(xe,"$&/")+"/")+pe)),V.push(ie)),1;pe=0;var Ut=I===""?".":I+":";if(X(E))for(var Ge=0;Ge<E.length;Ge++)I=E[Ge],Se=Ut+ot(I,Ge),pe+=rt(I,V,Q,Se,ie);else if(Ge=b(E),typeof Ge=="function")for(E=Ge.call(E),Ge=0;!(I=E.next()).done;)I=I.value,Se=Ut+ot(I,Ge++),pe+=rt(I,V,Q,Se,ie);else if(Se==="object"){if(typeof E.then=="function")return rt(it(E),V,Q,I,ie);throw V=String(E),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function B(E,V,Q){if(E==null)return E;var I=[],ie=0;return rt(E,I,"","",function(Se){return V.call(Q,Se,ie++)}),I}function Y(E){if(E._status===-1){var V=E._result;V=V(),V.then(function(Q){(E._status===0||E._status===-1)&&(E._status=1,E._result=Q)},function(Q){(E._status===0||E._status===-1)&&(E._status=2,E._result=Q)}),E._status===-1&&(E._status=0,E._result=V)}if(E._status===1)return E._result.default;throw E._result}var ne=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)};function ke(){}return me.Children={map:B,forEach:function(E,V,Q){B(E,function(){V.apply(this,arguments)},Q)},count:function(E){var V=0;return B(E,function(){V++}),V},toArray:function(E){return B(E,function(V){return V})||[]},only:function(E){if(!ee(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},me.Component=U,me.Fragment=i,me.Profiler=l,me.PureComponent=z,me.StrictMode=a,me.Suspense=m,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,me.__COMPILER_RUNTIME={__proto__:null,c:function(E){return F.H.useMemoCache(E)}},me.cache=function(E){return function(){return E.apply(null,arguments)}},me.cloneElement=function(E,V,Q){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var I=N({},E.props),ie=E.key,Se=void 0;if(V!=null)for(pe in V.ref!==void 0&&(Se=void 0),V.key!==void 0&&(ie=""+V.key),V)!he.call(V,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&V.ref===void 0||(I[pe]=V[pe]);var pe=arguments.length-2;if(pe===1)I.children=Q;else if(1<pe){for(var Ut=Array(pe),Ge=0;Ge<pe;Ge++)Ut[Ge]=arguments[Ge+2];I.children=Ut}return fe(E.type,ie,void 0,void 0,Se,I)},me.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:u,_context:E},E},me.createElement=function(E,V,Q){var I,ie={},Se=null;if(V!=null)for(I in V.key!==void 0&&(Se=""+V.key),V)he.call(V,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ie[I]=V[I]);var pe=arguments.length-2;if(pe===1)ie.children=Q;else if(1<pe){for(var Ut=Array(pe),Ge=0;Ge<pe;Ge++)Ut[Ge]=arguments[Ge+2];ie.children=Ut}if(E&&E.defaultProps)for(I in pe=E.defaultProps,pe)ie[I]===void 0&&(ie[I]=pe[I]);return fe(E,Se,void 0,void 0,null,ie)},me.createRef=function(){return{current:null}},me.forwardRef=function(E){return{$$typeof:d,render:E}},me.isValidElement=ee,me.lazy=function(E){return{$$typeof:g,_payload:{_status:-1,_result:E},_init:Y}},me.memo=function(E,V){return{$$typeof:p,type:E,compare:V===void 0?null:V}},me.startTransition=function(E){var V=F.T,Q={};F.T=Q;try{var I=E(),ie=F.S;ie!==null&&ie(Q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ke,ne)}catch(Se){ne(Se)}finally{F.T=V}},me.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},me.use=function(E){return F.H.use(E)},me.useActionState=function(E,V,Q){return F.H.useActionState(E,V,Q)},me.useCallback=function(E,V){return F.H.useCallback(E,V)},me.useContext=function(E){return F.H.useContext(E)},me.useDebugValue=function(){},me.useDeferredValue=function(E,V){return F.H.useDeferredValue(E,V)},me.useEffect=function(E,V,Q){var I=F.H;if(typeof Q=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return I.useEffect(E,V)},me.useId=function(){return F.H.useId()},me.useImperativeHandle=function(E,V,Q){return F.H.useImperativeHandle(E,V,Q)},me.useInsertionEffect=function(E,V){return F.H.useInsertionEffect(E,V)},me.useLayoutEffect=function(E,V){return F.H.useLayoutEffect(E,V)},me.useMemo=function(E,V){return F.H.useMemo(E,V)},me.useOptimistic=function(E,V){return F.H.useOptimistic(E,V)},me.useReducer=function(E,V,Q){return F.H.useReducer(E,V,Q)},me.useRef=function(E){return F.H.useRef(E)},me.useState=function(E){return F.H.useState(E)},me.useSyncExternalStore=function(E,V,Q){return F.H.useSyncExternalStore(E,V,Q)},me.useTransition=function(){return F.H.useTransition()},me.version="19.1.0",me}var yy;function md(){return yy||(yy=1,gf.exports=ON()),gf.exports}var A=md();const Bf=Zv(A),jN=(t,n,i,a)=>{var u,f,d,m;const l=[i,{code:n,...a||{}}];if((f=(u=t==null?void 0:t.services)==null?void 0:u.logger)!=null&&f.forward)return t.services.logger.forward(l,"warn","react-i18next::",!0);Qi(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(m=(d=t==null?void 0:t.services)==null?void 0:d.logger)!=null&&m.warn?t.services.logger.warn(...l):console!=null&&console.warn&&console.warn(...l)},vy={},_f=(t,n,i,a)=>{Qi(i)&&vy[i]||(Qi(i)&&(vy[i]=new Date),jN(t,n,i,a))},Xv=(t,n)=>()=>{if(t.isInitialized)n();else{const i=()=>{setTimeout(()=>{t.off("initialized",i)},0),n()};t.on("initialized",i)}},qf=(t,n,i)=>{t.loadNamespaces(n,Xv(t,i))},by=(t,n,i,a)=>{if(Qi(i)&&(i=[i]),t.options.preload&&t.options.preload.indexOf(n)>-1)return qf(t,i,a);i.forEach(l=>{t.options.ns.indexOf(l)<0&&t.options.ns.push(l)}),t.loadLanguages(n,Xv(t,a))},DN=(t,n,i={})=>!n.languages||!n.languages.length?(_f(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(t,{lng:i.lng,precheck:(a,l)=>{var u;if(((u=i.bindI18n)==null?void 0:u.indexOf("languageChanging"))>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!l(a.isLanguageChangingTo,t))return!1}}),Qi=t=>typeof t=="string",MN=t=>typeof t=="object"&&t!==null,LN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zN={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},UN=t=>zN[t],BN=t=>t.replace(LN,UN);let Kf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:BN};const _N=(t={})=>{Kf={...Kf,...t}},qN=()=>Kf;let Pv;const KN=t=>{Pv=t},VN=()=>Pv,HN={type:"3rdParty",init(t){_N(t.options.react),KN(t)}},GN=A.createContext();class JN{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const YN=(t,n)=>{const i=A.useRef();return A.useEffect(()=>{i.current=t},[t,n]),i.current},Wv=(t,n,i,a)=>t.getFixedT(n,i,a),IN=(t,n,i,a)=>A.useCallback(Wv(t,n,i,a),[t,n,i,a]),Ct=(t,n={})=>{var X,F,he,fe;const{i18n:i}=n,{i18n:a,defaultNS:l}=A.useContext(GN)||{},u=i||a||VN();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new JN),!u){_f(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const re=(oe,xe)=>Qi(xe)?xe:MN(xe)&&Qi(xe.defaultValue)?xe.defaultValue:Array.isArray(oe)?oe[oe.length-1]:oe,ee=[re,{},!1];return ee.t=re,ee.i18n={},ee.ready=!1,ee}(X=u.options.react)!=null&&X.wait&&_f(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...qN(),...u.options.react,...n},{useSuspense:d,keyPrefix:m}=f;let p=l||((F=u.options)==null?void 0:F.defaultNS);p=Qi(p)?[p]:p||["translation"],(fe=(he=u.reportNamespaces).addUsedNamespaces)==null||fe.call(he,p);const g=(u.isInitialized||u.initializedStoreOnce)&&p.every(re=>DN(re,u,f)),v=IN(u,n.lng||null,f.nsMode==="fallback"?p:p[0],m),b=()=>v,k=()=>Wv(u,n.lng||null,f.nsMode==="fallback"?p:p[0],m),[N,T]=A.useState(b);let U=p.join();n.lng&&(U=`${n.lng}${U}`);const M=YN(U),z=A.useRef(!0);A.useEffect(()=>{const{bindI18n:re,bindI18nStore:ee}=f;z.current=!0,!g&&!d&&(n.lng?by(u,n.lng,p,()=>{z.current&&T(k)}):qf(u,p,()=>{z.current&&T(k)})),g&&M&&M!==U&&z.current&&T(k);const oe=()=>{z.current&&T(k)};return re&&(u==null||u.on(re,oe)),ee&&(u==null||u.store.on(ee,oe)),()=>{z.current=!1,u&&(re==null||re.split(" ").forEach(xe=>u.off(xe,oe))),ee&&u&&ee.split(" ").forEach(xe=>u.store.off(xe,oe))}},[u,U]),A.useEffect(()=>{z.current&&g&&T(b)},[u,m,g]);const G=[N,u,g];if(G.t=N,G.i18n=u,G.ready=g,g||!g&&!d)return G;throw new Promise(re=>{n.lng?by(u,n.lng,p,()=>re()):qf(u,p,()=>re())})},ZN="ParoiCMS Site Generator",QN="<p>Describe here the data structure of your website: what types of pages it has and in which sections. In a page type, it is also possible to describe lists of sub-parts.</p>",FN="Create a website about… It will include a blog section, a list of pages, and a dedicated section about… that itself contains the following sub-sections: … The home page should contain an image carousel and a list of subparts, each containing an image and a text.",XN="Add a new text field to the page…",PN="Modify the Site Schema",WN="Create a Site Schema",ek="Generate the website",tk="Generate site with sample data (recommended)",nk="Generate an empty site",ik="Open the admin-ui",rk="Open the site",ak="Generated Schema",sk="Tree View",lk="Site Schema",ok="Node Types",uk="Labels",ck="Select language",fk="Explanations",dk="Current Activity",hk="An error occurred: {{ message }}",pk="An error occurred",mk="Start Again",gk="Step {{stepNumber}}: {{kind}}",yk="This step is in progress…",vk="This step failed.",bk="This step had no effect.",xk="No session data available",Sk="Step not found",wk="Welcome to ParoiCMS Site Generator",Nk="Close and start again",kk="Reset Schema",Rk="unknown error",Ek="Create New Site",Ak="Generating your site…",$k="The site is generated",Ck="Email:",Tk="Password:",Ok="I agree",jk="You are about to generate your website.",Dk="Cancel",Mk="Confirm",Lk="Site URL:",zk="Admin URL:",Uk="Copy all information to clipboard",Bk="<p>Welcome to the ParoiCMS Site Generator tool. This tool helps you create a new website with just a few steps.</p><p>To get started, please verify you're human by completing the CAPTCHA below.</p>",_k="Initial Schema Creation",qk="Schema Update",Kk="Site Generation",Vk={initial1:"Analyzing your request for site structure…",initial2:"Choosing from predefined fields…",updating1:"Analyzing your update request…",updating2:"Updating schema structure with changes…",generatingSite:"Building your website…",generatingContent:"Creating sample content for your site…"},Hk="Login Email",Gk="Login Password",Jk="Generated Site",Yk="Your session has expired. Please refresh the page to start a new session.",Ik="Failed to submit your prompt. Please try again.",Zk="Failed to generate the site. Please try again.",Qk='The source code of this generator is available <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">on GitLab</a> — <a href="https://www.paroicms.org/en" target="_blank">ParoiCMS</a> — Contact me <a href="https://paroi.tech/en" target="_blank">here</a>.',Fk="Extend your session",Xk="Failed to refresh your session. Please try again.",Pk="Error connecting to server. Please check your connection and try again.",Wk="Tip: If you want to start over, open the generator in a new tab and close this one.",eR={title:ZN,startInstruction:QN,createPromptPlaceholder:FN,updatePromptPlaceholder:XN,modifySchema:PN,createSchema:WN,generateTheWebsite:ek,generateSiteWithData:tk,generateEmptySite:nk,administration:ik,viewSite:rk,generatedSchema:ak,treeView:sk,siteSchema:lk,nodeTypes:ok,labels:uk,languageSelector:ck,explanation:fk,currentActivity:dk,errorOccurred:hk,unknownErrorOccurred:pk,startAgain:mk,stepTitle:gk,stepPending:yk,stepFailed:vk,stepNoEffect:bk,noSessionData:xk,stepNotFound:Sk,welcomeTitle:wk,reset:Nk,resetSchema:kk,unknownError:Rk,createNewSite:Ek,generatingSite:Ak,siteGenerated:$k,email:Ck,password:Tk,agree:Ok,aboutToGenerateWebsite:jk,cancel:Dk,confirm:Mk,siteUrl:Lk,adminUrl:zk,copyToClipboard:Uk,introduction:Bk,initialSchema:_k,updateSchema:qk,generateSite:Kk,activity:Vk,loginEmail:Hk,loginPassword:Gk,generatedSite:Jk,sessionExpired:Yk,promptSubmissionFailed:Ik,generationFailed:Zk,footerText:Qk,extendYourSession:Fk,sessionRenewalFailed:Xk,errorConnectingToServer:Pk,newTabRestartMessage:Wk},tR="ParoiCMS - Générateur de Site",nR="<p>Décrivez ici la structure des données de votre site web : quels types de pages, dans quelles rubriques. Il est également possible de décrire des listes de sous-parties de pages.</p>",iR="Génère un site web à propos de… Il contiendra une rubrique blog, une liste de pages, une rubrique dédiée à… contenant elle-même les sous-rubriques suivantes : … La page d'accueil doit contenir un carrousel d'images, et une liste de sous-parties contenant chacune une image et un texte.",rR="Ajoute un nouveau champ texte à la page…",aR="Modifier le schéma du site",sR="Créer un schéma de site",lR="Générer le site web",oR="Générer le site avec des données d'exemple (recommandé)",uR="Générer un site vide",cR="Ouvrir l'espace d'administration du site",fR="Ouvrir le site",dR="Schéma généré",hR="Arborescence",pR="Schéma du site",mR="Types de nœuds",gR="Libellés",yR="Sélectionner la langue",vR="Explications",bR="Activité en cours",xR="Une erreur est survenue : {{ message }}",SR="Une erreur est survenue",wR="Recommencer",NR="Étape {{stepNumber}} : {{kind}}",kR="Cette étape est en cours…",RR="Cette étape a échoué.",ER="Cette étape n'a eu aucun effet.",AR="Données de session non disponibles",$R="Étape introuvable",CR="Bienvenue sur le générateur de site ParoiCMS",TR="Fermer et réinitialiser",OR="Réinitialiser le schéma",jR="erreur inconnue",DR="Créer un nouveau site",MR="Génération de votre site…",LR="Le site est généré",zR="Email :",UR="Mot de passe :",BR="J'accepte",_R="Vous êtes sur le point de générer votre site web.",qR="Annuler",KR="Confirmer",VR="URL du site :",HR="URL d'admin :",GR="Copier toutes les informations dans le presse-papier",JR="<p>Bienvenue sur l'outil de génération de site ParoiCMS. Cet outil vous aide à créer un nouveau site web en quelques étapes.</p><p>Pour commencer, veuillez vérifier que vous êtes humain en complétant le CAPTCHA ci-dessous.</p>",YR="Création du schéma initial",IR="Mise à jour du schéma",ZR="Génération du site",QR={initial1:"Analyse de votre demande pour la structure du site…",initial2:"Choix parmi les champs prédéfinis…",updating1:"Analyse de votre demande de mise à jour…",updating2:"Mise à jour de la structure du schéma…",generatingSite:"Construction de votre site web…",generatingContent:"Création de contenu exemple pour votre site…"},FR="Email de connexion",XR="Mot de passe",PR="Site généré",WR="Votre session a expiré. Veuillez rafraîchir la page pour démarrer une nouvelle session.",eE="Échec de l'envoi de votre demande. Veuillez réessayer.",tE="Échec de la génération du site. Veuillez réessayer.",nE='Le code source de ce générateur est disponible <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">sur GitLab</a> — <a href="https://www.paroicms.org/fr" target="_blank">ParoiCMS</a> — Contactez-moi <a href="https://paroi.tech/fr" target="_blank">ici</a>.',iE="Prolonger votre session",rE="Échec du renouvellement de votre session. Veuillez réessayer.",aE="Erreur de connexion au serveur. Veuillez vérifier votre connexion et réessayer.",sE="Astuce : si vous souhaitez repartir de zéro, ouvrez le générateur dans un nouvel onglet et fermez celui-ci.",lE={title:tR,startInstruction:nR,createPromptPlaceholder:iR,updatePromptPlaceholder:rR,modifySchema:aR,createSchema:sR,generateTheWebsite:lR,generateSiteWithData:oR,generateEmptySite:uR,administration:cR,viewSite:fR,generatedSchema:dR,treeView:hR,siteSchema:pR,nodeTypes:mR,labels:gR,languageSelector:yR,explanation:vR,currentActivity:bR,errorOccurred:xR,unknownErrorOccurred:SR,startAgain:wR,stepTitle:NR,stepPending:kR,stepFailed:RR,stepNoEffect:ER,noSessionData:AR,stepNotFound:$R,welcomeTitle:CR,reset:TR,resetSchema:OR,unknownError:jR,createNewSite:DR,generatingSite:MR,siteGenerated:LR,email:zR,password:UR,agree:BR,aboutToGenerateWebsite:_R,cancel:qR,confirm:KR,siteUrl:VR,adminUrl:HR,copyToClipboard:GR,introduction:JR,initialSchema:YR,updateSchema:IR,generateSite:ZR,activity:QR,loginEmail:FR,loginPassword:XR,generatedSite:PR,sessionExpired:WR,promptSubmissionFailed:eE,generationFailed:tE,footerText:nE,extendYourSession:iE,sessionRenewalFailed:rE,errorConnectingToServer:aE,newTabRestartMessage:sE},oE=`<p>Welcome!</p>
17
+ */var Dp;function eb(){if(Dp)return oe;Dp=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,L={};function V(R,$,Z){this.props=R,this.context=$,this.refs=L,this.updater=Z||C}V.prototype.isReactComponent={},V.prototype.setState=function(R,$){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,$,"setState")},V.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function M(){}M.prototype=V.prototype;function D(R,$,Z){this.props=R,this.context=$,this.refs=L,this.updater=Z||C}var G=D.prototype=new M;G.constructor=D,E(G,V.prototype),G.isPureReactComponent=!0;var X=Array.isArray,K={H:null,A:null,T:null,S:null,V:null},se=Object.prototype.hasOwnProperty;function re(R,$,Z,Q,I,me){return Z=me.ref,{$$typeof:i,type:R,key:$,ref:Z!==void 0?Z:null,props:me}}function ee(R,$){return re(R.type,$,void 0,void 0,void 0,R.props)}function F(R){return typeof R=="object"&&R!==null&&R.$$typeof===i}function ne(R){var $={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Z){return $[Z]})}var pe=/\/+/g;function Ke(R,$){return typeof R=="object"&&R!==null&&R.key!=null?ne(""+R.key):$.toString(36)}function Xe(){}function Ge(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Xe,Xe):(R.status="pending",R.then(function($){R.status==="pending"&&(R.status="fulfilled",R.value=$)},function($){R.status==="pending"&&(R.status="rejected",R.reason=$)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Ye(R,$,Z,Q,I){var me=typeof R;(me==="undefined"||me==="boolean")&&(R=null);var ue=!1;if(R===null)ue=!0;else switch(me){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(R.$$typeof){case i:case n:ue=!0;break;case v:return ue=R._init,Ye(ue(R._payload),$,Z,Q,I)}}if(ue)return I=I(R),ue=Q===""?"."+Ke(R,0):Q,X(I)?(Z="",ue!=null&&(Z=ue.replace(pe,"$&/")+"/"),Ye(I,$,Z,"",function(ya){return ya})):I!=null&&(F(I)&&(I=ee(I,Z+(I.key==null||R&&R.key===I.key?"":(""+I.key).replace(pe,"$&/")+"/")+ue)),$.push(I)),1;ue=0;var gt=Q===""?".":Q+":";if(X(R))for(var ze=0;ze<R.length;ze++)Q=R[ze],me=gt+Ke(Q,ze),ue+=Ye(Q,$,Z,me,I);else if(ze=x(R),typeof ze=="function")for(R=ze.call(R),ze=0;!(Q=R.next()).done;)Q=Q.value,me=gt+Ke(Q,ze++),ue+=Ye(Q,$,Z,me,I);else if(me==="object"){if(typeof R.then=="function")return Ye(Ge(R),$,Z,Q,I);throw $=String(R),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ue}function _(R,$,Z){if(R==null)return R;var Q=[],I=0;return Ye(R,Q,"","",function(me){return $.call(Z,me,I++)}),Q}function Y(R){if(R._status===-1){var $=R._result;$=$(),$.then(function(Z){(R._status===0||R._status===-1)&&(R._status=1,R._result=Z)},function(Z){(R._status===0||R._status===-1)&&(R._status=2,R._result=Z)}),R._status===-1&&(R._status=0,R._result=$)}if(R._status===1)return R._result.default;throw R._result}var W=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function ye(){}return oe.Children={map:_,forEach:function(R,$,Z){_(R,function(){$.apply(this,arguments)},Z)},count:function(R){var $=0;return _(R,function(){$++}),$},toArray:function(R){return _(R,function($){return $})||[]},only:function(R){if(!F(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},oe.Component=V,oe.Fragment=r,oe.Profiler=o,oe.PureComponent=D,oe.StrictMode=s,oe.Suspense=m,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,oe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return K.H.useMemoCache(R)}},oe.cache=function(R){return function(){return R.apply(null,arguments)}},oe.cloneElement=function(R,$,Z){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Q=E({},R.props),I=R.key,me=void 0;if($!=null)for(ue in $.ref!==void 0&&(me=void 0),$.key!==void 0&&(I=""+$.key),$)!se.call($,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&$.ref===void 0||(Q[ue]=$[ue]);var ue=arguments.length-2;if(ue===1)Q.children=Z;else if(1<ue){for(var gt=Array(ue),ze=0;ze<ue;ze++)gt[ze]=arguments[ze+2];Q.children=gt}return re(R.type,I,void 0,void 0,me,Q)},oe.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},oe.createElement=function(R,$,Z){var Q,I={},me=null;if($!=null)for(Q in $.key!==void 0&&(me=""+$.key),$)se.call($,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(I[Q]=$[Q]);var ue=arguments.length-2;if(ue===1)I.children=Z;else if(1<ue){for(var gt=Array(ue),ze=0;ze<ue;ze++)gt[ze]=arguments[ze+2];I.children=gt}if(R&&R.defaultProps)for(Q in ue=R.defaultProps,ue)I[Q]===void 0&&(I[Q]=ue[Q]);return re(R,me,void 0,void 0,null,I)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(R){return{$$typeof:h,render:R}},oe.isValidElement=F,oe.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:Y}},oe.memo=function(R,$){return{$$typeof:d,type:R,compare:$===void 0?null:$}},oe.startTransition=function(R){var $=K.T,Z={};K.T=Z;try{var Q=R(),I=K.S;I!==null&&I(Z,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ye,W)}catch(me){W(me)}finally{K.T=$}},oe.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},oe.use=function(R){return K.H.use(R)},oe.useActionState=function(R,$,Z){return K.H.useActionState(R,$,Z)},oe.useCallback=function(R,$){return K.H.useCallback(R,$)},oe.useContext=function(R){return K.H.useContext(R)},oe.useDebugValue=function(){},oe.useDeferredValue=function(R,$){return K.H.useDeferredValue(R,$)},oe.useEffect=function(R,$,Z){var Q=K.H;if(typeof Z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Q.useEffect(R,$)},oe.useId=function(){return K.H.useId()},oe.useImperativeHandle=function(R,$,Z){return K.H.useImperativeHandle(R,$,Z)},oe.useInsertionEffect=function(R,$){return K.H.useInsertionEffect(R,$)},oe.useLayoutEffect=function(R,$){return K.H.useLayoutEffect(R,$)},oe.useMemo=function(R,$){return K.H.useMemo(R,$)},oe.useOptimistic=function(R,$){return K.H.useOptimistic(R,$)},oe.useReducer=function(R,$,Z){return K.H.useReducer(R,$,Z)},oe.useRef=function(R){return K.H.useRef(R)},oe.useState=function(R){return K.H.useState(R)},oe.useSyncExternalStore=function(R,$,Z){return K.H.useSyncExternalStore(R,$,Z)},oe.useTransition=function(){return K.H.useTransition()},oe.version="19.1.0",oe}var _p;function Fo(){return _p||(_p=1,Co.exports=eb()),Co.exports}var w=Fo();const Bo=rm(w),tb=(i,n,r,s)=>{var f,p,h,m;const o=[r,{code:n,...s||{}}];if((p=(f=i==null?void 0:i.services)==null?void 0:f.logger)!=null&&p.forward)return i.services.logger.forward(o,"warn","react-i18next::",!0);fn(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(m=(h=i==null?void 0:i.services)==null?void 0:h.logger)!=null&&m.warn?i.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},Mp={},Ho=(i,n,r,s)=>{fn(r)&&Mp[r]||(fn(r)&&(Mp[r]=new Date),tb(i,n,r,s))},om=(i,n)=>()=>{if(i.isInitialized)n();else{const r=()=>{setTimeout(()=>{i.off("initialized",r)},0),n()};i.on("initialized",r)}},Vo=(i,n,r)=>{i.loadNamespaces(n,om(i,r))},Up=(i,n,r,s)=>{if(fn(r)&&(r=[r]),i.options.preload&&i.options.preload.indexOf(n)>-1)return Vo(i,r,s);r.forEach(o=>{i.options.ns.indexOf(o)<0&&i.options.ns.push(o)}),i.loadLanguages(n,om(i,s))},ab=(i,n,r={})=>!n.languages||!n.languages.length?(Ho(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(i,{lng:r.lng,precheck:(s,o)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,i))return!1}}),fn=i=>typeof i=="string",nb=i=>typeof i=="object"&&i!==null,lb=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ib={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},rb=i=>ib[i],sb=i=>i.replace(lb,rb);let $o={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:sb};const ub=(i={})=>{$o={...$o,...i}},ob=()=>$o;let cm;const cb=i=>{cm=i},fb=()=>cm,db={type:"3rdParty",init(i){ub(i.options.react),cb(i)}},hb=w.createContext();class pb{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mb=(i,n)=>{const r=w.useRef();return w.useEffect(()=>{r.current=i},[i,n]),r.current},fm=(i,n,r,s)=>i.getFixedT(n,r,s),gb=(i,n,r,s)=>w.useCallback(fm(i,n,r,s),[i,n,r,s]),ot=(i,n={})=>{var X,K,se,re;const{i18n:r}=n,{i18n:s,defaultNS:o}=w.useContext(hb)||{},f=r||s||fb();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new pb),!f){Ho(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const ee=(ne,pe)=>fn(pe)?pe:nb(pe)&&fn(pe.defaultValue)?pe.defaultValue:Array.isArray(ne)?ne[ne.length-1]:ne,F=[ee,{},!1];return F.t=ee,F.i18n={},F.ready=!1,F}(X=f.options.react)!=null&&X.wait&&Ho(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const p={...ob(),...f.options.react,...n},{useSuspense:h,keyPrefix:m}=p;let d=o||((K=f.options)==null?void 0:K.defaultNS);d=fn(d)?[d]:d||["translation"],(re=(se=f.reportNamespaces).addUsedNamespaces)==null||re.call(se,d);const v=(f.isInitialized||f.initializedStoreOnce)&&d.every(ee=>ab(ee,f,p)),S=gb(f,n.lng||null,p.nsMode==="fallback"?d:d[0],m),x=()=>S,C=()=>fm(f,n.lng||null,p.nsMode==="fallback"?d:d[0],m),[E,L]=w.useState(x);let V=d.join();n.lng&&(V=`${n.lng}${V}`);const M=mb(V),D=w.useRef(!0);w.useEffect(()=>{const{bindI18n:ee,bindI18nStore:F}=p;D.current=!0,!v&&!h&&(n.lng?Up(f,n.lng,d,()=>{D.current&&L(C)}):Vo(f,d,()=>{D.current&&L(C)})),v&&M&&M!==V&&D.current&&L(C);const ne=()=>{D.current&&L(C)};return ee&&(f==null||f.on(ee,ne)),F&&(f==null||f.store.on(F,ne)),()=>{D.current=!1,f&&(ee==null||ee.split(" ").forEach(pe=>f.off(pe,ne))),F&&f&&F.split(" ").forEach(pe=>f.store.off(pe,ne))}},[f,V]),w.useEffect(()=>{D.current&&v&&L(x)},[f,m,v]);const G=[E,f,v];if(G.t=E,G.i18n=f,G.ready=v,v||!v&&!h)return G;throw new Promise(ee=>{n.lng?Up(f,n.lng,d,()=>ee()):Vo(f,d,()=>ee())})},vb="ParoiCMS Site Generator",yb="<p>Describe here the data structure of your website: what types of pages it has and in which sections. In a page type, it is also possible to describe lists of sub-parts.</p>",bb="Create a website about… It will include a blog section, a list of pages, and a dedicated section about… that itself contains the following sub-sections: … The home page should contain an image carousel and a list of subparts, each containing an image and a text.",xb="Add a new text field to the page…",Sb="Modify the Site Schema",Nb="Create a Site Schema",Eb="Generate the website",Rb="Generate site with sample data (recommended)",wb="Generate an empty site",Tb="Open the admin-ui",Cb="Open the site",jb="Generated Schema",Ab="Tree View",Ob="Site Schema",kb="Node Types",Lb="Labels",zb="Select language",Db="Explanations",_b="Current Activity",Mb="An error occurred: {{ message }}",Ub="An error occurred",Bb="Start Again",Hb="Step {{stepNumber}}: {{kind}}",Vb="This step is in progress…",$b="This step failed.",qb="This step had no effect.",Gb="No session data available",Yb="Step not found",Qb="Welcome to ParoiCMS Site Generator",Zb="Close and start again",Kb="Reset Schema",Xb="unknown error",Jb="Create New Site",Fb="Generating your site…",Pb="The site is generated",Wb="Email:",Ib="Password:",ex="I agree",tx="You are about to generate your website.",ax="Cancel",nx="Confirm",lx="Site URL:",ix="Admin URL:",rx="Copy all information to clipboard",sx="<p>Welcome to the ParoiCMS Site Generator tool. This tool helps you create a new website with just a few steps.</p><p>To get started, please verify you're human by completing the CAPTCHA below.</p>",ux="Initial Schema Creation",ox="Schema Update",cx="Site Generation",fx={initial1:"Analyzing your request for site structure…",initial2:"Choosing from predefined fields…",updating1:"Analyzing your update request…",updating2:"Updating schema structure with changes…",generatingSite:"Building your website…",generatingContent:"Creating sample content for your site…"},dx="Login Email",hx="Login Password",px="Generated Site",mx="Your session has expired. Please refresh the page to start a new session.",gx="Failed to submit your prompt. Please try again.",vx="Failed to generate the site. Please try again.",yx='The source code of this generator is available <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">on GitLab</a> — <a href="https://www.paroicms.org/en" target="_blank">ParoiCMS</a> — Contact me <a href="https://paroi.tech/en" target="_blank">here</a>.',bx="Extend your session",xx="Failed to refresh your session. Please try again.",Sx="Error connecting to server. Please check your connection and try again.",Nx="Tip: If you want to start over, open the generator in a new tab and close this one.",Ex={title:vb,startInstruction:yb,createPromptPlaceholder:bb,updatePromptPlaceholder:xb,modifySchema:Sb,createSchema:Nb,generateTheWebsite:Eb,generateSiteWithData:Rb,generateEmptySite:wb,administration:Tb,viewSite:Cb,generatedSchema:jb,treeView:Ab,siteSchema:Ob,nodeTypes:kb,labels:Lb,languageSelector:zb,explanation:Db,currentActivity:_b,errorOccurred:Mb,unknownErrorOccurred:Ub,startAgain:Bb,stepTitle:Hb,stepPending:Vb,stepFailed:$b,stepNoEffect:qb,noSessionData:Gb,stepNotFound:Yb,welcomeTitle:Qb,reset:Zb,resetSchema:Kb,unknownError:Xb,createNewSite:Jb,generatingSite:Fb,siteGenerated:Pb,email:Wb,password:Ib,agree:ex,aboutToGenerateWebsite:tx,cancel:ax,confirm:nx,siteUrl:lx,adminUrl:ix,copyToClipboard:rx,introduction:sx,initialSchema:ux,updateSchema:ox,generateSite:cx,activity:fx,loginEmail:dx,loginPassword:hx,generatedSite:px,sessionExpired:mx,promptSubmissionFailed:gx,generationFailed:vx,footerText:yx,extendYourSession:bx,sessionRenewalFailed:xx,errorConnectingToServer:Sx,newTabRestartMessage:Nx},Rx="ParoiCMS - Générateur de Site",wx="<p>Décrivez ici la structure des données de votre site web : quels types de pages, dans quelles rubriques. Il est également possible de décrire des listes de sous-parties de pages.</p>",Tx="Génère un site web à propos de… Il contiendra une rubrique blog, une liste de pages, une rubrique dédiée à… contenant elle-même les sous-rubriques suivantes : … La page d'accueil doit contenir un carrousel d'images, et une liste de sous-parties contenant chacune une image et un texte.",Cx="Ajoute un nouveau champ texte à la page…",jx="Modifier le schéma du site",Ax="Créer un schéma de site",Ox="Générer le site web",kx="Générer le site avec des données d'exemple (recommandé)",Lx="Générer un site vide",zx="Ouvrir l'espace d'administration du site",Dx="Ouvrir le site",_x="Schéma généré",Mx="Arborescence",Ux="Schéma du site",Bx="Types de nœuds",Hx="Libellés",Vx="Sélectionner la langue",$x="Explications",qx="Activité en cours",Gx="Une erreur est survenue : {{ message }}",Yx="Une erreur est survenue",Qx="Recommencer",Zx="Étape {{stepNumber}} : {{kind}}",Kx="Cette étape est en cours…",Xx="Cette étape a échoué.",Jx="Cette étape n'a eu aucun effet.",Fx="Données de session non disponibles",Px="Étape introuvable",Wx="Bienvenue sur le générateur de site ParoiCMS",Ix="Fermer et réinitialiser",eS="Réinitialiser le schéma",tS="erreur inconnue",aS="Créer un nouveau site",nS="Génération de votre site…",lS="Le site est généré",iS="Email :",rS="Mot de passe :",sS="J'accepte",uS="Vous êtes sur le point de générer votre site web.",oS="Annuler",cS="Confirmer",fS="URL du site :",dS="URL d'admin :",hS="Copier toutes les informations dans le presse-papier",pS="<p>Bienvenue sur l'outil de génération de site ParoiCMS. Cet outil vous aide à créer un nouveau site web en quelques étapes.</p><p>Pour commencer, veuillez vérifier que vous êtes humain en complétant le CAPTCHA ci-dessous.</p>",mS="Création du schéma initial",gS="Mise à jour du schéma",vS="Génération du site",yS={initial1:"Analyse de votre demande pour la structure du site…",initial2:"Choix parmi les champs prédéfinis…",updating1:"Analyse de votre demande de mise à jour…",updating2:"Mise à jour de la structure du schéma…",generatingSite:"Construction de votre site web…",generatingContent:"Création de contenu exemple pour votre site…"},bS="Email de connexion",xS="Mot de passe",SS="Site généré",NS="Votre session a expiré. Veuillez rafraîchir la page pour démarrer une nouvelle session.",ES="Échec de l'envoi de votre demande. Veuillez réessayer.",RS="Échec de la génération du site. Veuillez réessayer.",wS='Le code source de ce générateur est disponible <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">sur GitLab</a> — <a href="https://www.paroicms.org/fr" target="_blank">ParoiCMS</a> — Contactez-moi <a href="https://paroi.tech/fr" target="_blank">ici</a>.',TS="Prolonger votre session",CS="Échec du renouvellement de votre session. Veuillez réessayer.",jS="Erreur de connexion au serveur. Veuillez vérifier votre connexion et réessayer.",AS="Astuce : si vous souhaitez repartir de zéro, ouvrez le générateur dans un nouvel onglet et fermez celui-ci.",OS={title:Rx,startInstruction:wx,createPromptPlaceholder:Tx,updatePromptPlaceholder:Cx,modifySchema:jx,createSchema:Ax,generateTheWebsite:Ox,generateSiteWithData:kx,generateEmptySite:Lx,administration:zx,viewSite:Dx,generatedSchema:_x,treeView:Mx,siteSchema:Ux,nodeTypes:Bx,labels:Hx,languageSelector:Vx,explanation:$x,currentActivity:qx,errorOccurred:Gx,unknownErrorOccurred:Yx,startAgain:Qx,stepTitle:Zx,stepPending:Kx,stepFailed:Xx,stepNoEffect:Jx,noSessionData:Fx,stepNotFound:Px,welcomeTitle:Wx,reset:Ix,resetSchema:eS,unknownError:tS,createNewSite:aS,generatingSite:nS,siteGenerated:lS,email:iS,password:rS,agree:sS,aboutToGenerateWebsite:uS,cancel:oS,confirm:cS,siteUrl:fS,adminUrl:dS,copyToClipboard:hS,introduction:pS,initialSchema:mS,updateSchema:gS,generateSite:vS,activity:yS,loginEmail:bS,loginPassword:xS,generatedSite:SS,sessionExpired:NS,promptSubmissionFailed:ES,generationFailed:RS,footerText:wS,extendYourSession:TS,sessionRenewalFailed:CS,errorConnectingToServer:jS,newTabRestartMessage:AS},kS=`<p>Welcome!</p>
18
18
  <p>ParoiCMS is a CMS for showcase websites. Its core feature is that you define the structure of your website. This tool will help you to do it.</p>
19
- <p>A session identifier will follow you on the tab of your browser, it will be deleted when you close the tab. However, your session data may be retained for debugging purposes.</p>`,uE=`<p>Bienvenue !</p>
19
+ <p>A session identifier will follow you on the tab of your browser, it will be deleted when you close the tab. However, your session data may be retained for debugging purposes.</p>`,LS=`<p>Bienvenue !</p>
20
20
  <p>ParoiCMS est un CMS pour sites vitrines. Sa fonctionnalité principale est que vous définissez la structure de votre site web. Le générateur vous aidera dans cette tâche.</p>
21
- <p>Un identifiant de session vous suivra dans l'onglet de votre navigateur, il sera supprimé lorsque vous fermerez l'onglet. Mais vos données de session pourront être conservées à des fins de débogage.</p>`,cE=`<p>Congratulations! Your website has been generated. Now you can authenticate on the admin-ui (using the <strong>local account</strong>) and play with it.</p>
21
+ <p>Un identifiant de session vous suivra dans l'onglet de votre navigateur, il sera supprimé lorsque vous fermerez l'onglet. Mais vos données de session pourront être conservées à des fins de débogage.</p>`,zS=`<p>Congratulations! Your website has been generated. Now you can authenticate on the admin-ui (using the <strong>local account</strong>) and play with it.</p>
22
22
  <p>Notice that it will be deleted in 48 hours. However, if you want to keep it, then <strong>make a backup</strong>. <em>Each backup is a zip file that contains a full Node.js project, ready to be installed and executed in a local environment.</em></p>
23
23
  <p>An unattractive theme has been generated. Its purpose is to demonstrate how to write templates for your data structure.</p>
24
- <p>Make sure to copy the information below, as it will be lost once you close this tab.</p>`,fE=`<p>Félicitations ! Votre site web a été généré. Vous pouvez maintenant vous authentifier sur le admin-ui (en utilisant le <strong>compte local</strong>) et l'explorer.</p>
24
+ <p>Make sure to copy the information below, as it will be lost once you close this tab.</p>`,DS=`<p>Félicitations ! Votre site web a été généré. Vous pouvez maintenant vous authentifier sur le admin-ui (en utilisant le <strong>compte local</strong>) et l'explorer.</p>
25
25
  <p>Notez qu'il sera supprimé dans 48 heures. Cependant, si vous souhaitez le conserver, alors <strong>faites une sauvegarde</strong>. <em>Chaque sauvegarde est un fichier zip qui contient un projet Node.js complet, prêt à être installé et exécuté dans un environnement local.</em></p>
26
26
  <p>Un thème tout moche a été généré. Son but est de montrer comment écrire des templates pour votre structure de données.</p>
27
- <p>Assurez-vous de copier les informations ci-dessous, car elles seront perdues une fois que vous fermerez cet onglet.</p>`,dE={en:{translation:{...eR,introduction:oE,userManual:cE}},fr:{translation:{...lE,introduction:uE,userManual:fE}}};bt.use(HN).init({resources:dE,lng:navigator.language.split("-")[0],fallbackLng:"en",interpolation:{escapeValue:!1}});var yf={exports:{}},us={},vf={exports:{}},bf={};/**
27
+ <p>Assurez-vous de copier les informations ci-dessous, car elles seront perdues une fois que vous fermerez cet onglet.</p>`,_S={en:{translation:{...Ex,introduction:kS,userManual:zS}},fr:{translation:{...OS,introduction:LS,userManual:DS}}};at.use(db).init({resources:_S,lng:navigator.language.split("-")[0],fallbackLng:"en",interpolation:{escapeValue:!1}});var jo={exports:{}},si={},Ao={exports:{}},Oo={};/**
28
28
  * @license React
29
29
  * scheduler.production.js
30
30
  *
@@ -32,7 +32,7 @@ var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,config
32
32
  *
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
- */var xy;function hE(){return xy||(xy=1,function(t){function n(B,Y){var ne=B.length;B.push(Y);e:for(;0<ne;){var ke=ne-1>>>1,E=B[ke];if(0<l(E,Y))B[ke]=Y,B[ne]=E,ne=ke;else break e}}function i(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Y=B[0],ne=B.pop();if(ne!==Y){B[0]=ne;e:for(var ke=0,E=B.length,V=E>>>1;ke<V;){var Q=2*(ke+1)-1,I=B[Q],ie=Q+1,Se=B[ie];if(0>l(I,ne))ie<E&&0>l(Se,I)?(B[ke]=Se,B[ie]=ne,ke=ie):(B[ke]=I,B[Q]=ne,ke=Q);else if(ie<E&&0>l(Se,ne))B[ke]=Se,B[ie]=ne,ke=ie;else break e}}return Y}function l(B,Y){var ne=B.sortIndex-Y.sortIndex;return ne!==0?ne:B.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,d=f.now();t.unstable_now=function(){return f.now()-d}}var m=[],p=[],g=1,v=null,b=3,k=!1,N=!1,T=!1,U=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function X(B){for(var Y=i(p);Y!==null;){if(Y.callback===null)a(p);else if(Y.startTime<=B)a(p),Y.sortIndex=Y.expirationTime,n(m,Y);else break;Y=i(p)}}function F(B){if(T=!1,X(B),!N)if(i(m)!==null)N=!0,he||(he=!0,ot());else{var Y=i(p);Y!==null&&rt(F,Y.startTime-B)}}var he=!1,fe=-1,re=5,ee=-1;function oe(){return U?!0:!(t.unstable_now()-ee<re)}function xe(){if(U=!1,he){var B=t.unstable_now();ee=B;var Y=!0;try{e:{N=!1,T&&(T=!1,z(fe),fe=-1),k=!0;var ne=b;try{t:{for(X(B),v=i(m);v!==null&&!(v.expirationTime>B&&oe());){var ke=v.callback;if(typeof ke=="function"){v.callback=null,b=v.priorityLevel;var E=ke(v.expirationTime<=B);if(B=t.unstable_now(),typeof E=="function"){v.callback=E,X(B),Y=!0;break t}v===i(m)&&a(m),X(B)}else a(m);v=i(m)}if(v!==null)Y=!0;else{var V=i(p);V!==null&&rt(F,V.startTime-B),Y=!1}}break e}finally{v=null,b=ne,k=!1}Y=void 0}}finally{Y?ot():he=!1}}}var ot;if(typeof G=="function")ot=function(){G(xe)};else if(typeof MessageChannel<"u"){var ut=new MessageChannel,it=ut.port2;ut.port1.onmessage=xe,ot=function(){it.postMessage(null)}}else ot=function(){M(xe,0)};function rt(B,Y){fe=M(function(){B(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var ne=b;b=Y;try{return B()}finally{b=ne}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=b;b=B;try{return Y()}finally{b=ne}},t.unstable_scheduleCallback=function(B,Y,ne){var ke=t.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ke+ne:ke):ne=ke,B){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ne+E,B={id:g++,callback:Y,priorityLevel:B,startTime:ne,expirationTime:E,sortIndex:-1},ne>ke?(B.sortIndex=ne,n(p,B),i(m)===null&&B===i(p)&&(T?(z(fe),fe=-1):T=!0,rt(F,ne-ke))):(B.sortIndex=E,n(m,B),N||k||(N=!0,he||(he=!0,ot()))),B},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(B){var Y=b;return function(){var ne=b;b=Y;try{return B.apply(this,arguments)}finally{b=ne}}}}(bf)),bf}var Sy;function pE(){return Sy||(Sy=1,vf.exports=hE()),vf.exports}var xf={exports:{}},wt={};/**
35
+ */var Bp;function MS(){return Bp||(Bp=1,function(i){function n(_,Y){var W=_.length;_.push(Y);e:for(;0<W;){var ye=W-1>>>1,R=_[ye];if(0<o(R,Y))_[ye]=Y,_[W]=R,W=ye;else break e}}function r(_){return _.length===0?null:_[0]}function s(_){if(_.length===0)return null;var Y=_[0],W=_.pop();if(W!==Y){_[0]=W;e:for(var ye=0,R=_.length,$=R>>>1;ye<$;){var Z=2*(ye+1)-1,Q=_[Z],I=Z+1,me=_[I];if(0>o(Q,W))I<R&&0>o(me,Q)?(_[ye]=me,_[I]=W,ye=I):(_[ye]=Q,_[Z]=W,ye=Z);else if(I<R&&0>o(me,W))_[ye]=me,_[I]=W,ye=I;else break e}}return Y}function o(_,Y){var W=_.sortIndex-Y.sortIndex;return W!==0?W:_.id-Y.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var p=Date,h=p.now();i.unstable_now=function(){return p.now()-h}}var m=[],d=[],v=1,S=null,x=3,C=!1,E=!1,L=!1,V=!1,M=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function X(_){for(var Y=r(d);Y!==null;){if(Y.callback===null)s(d);else if(Y.startTime<=_)s(d),Y.sortIndex=Y.expirationTime,n(m,Y);else break;Y=r(d)}}function K(_){if(L=!1,X(_),!E)if(r(m)!==null)E=!0,se||(se=!0,Ke());else{var Y=r(d);Y!==null&&Ye(K,Y.startTime-_)}}var se=!1,re=-1,ee=5,F=-1;function ne(){return V?!0:!(i.unstable_now()-F<ee)}function pe(){if(V=!1,se){var _=i.unstable_now();F=_;var Y=!0;try{e:{E=!1,L&&(L=!1,D(re),re=-1),C=!0;var W=x;try{t:{for(X(_),S=r(m);S!==null&&!(S.expirationTime>_&&ne());){var ye=S.callback;if(typeof ye=="function"){S.callback=null,x=S.priorityLevel;var R=ye(S.expirationTime<=_);if(_=i.unstable_now(),typeof R=="function"){S.callback=R,X(_),Y=!0;break t}S===r(m)&&s(m),X(_)}else s(m);S=r(m)}if(S!==null)Y=!0;else{var $=r(d);$!==null&&Ye(K,$.startTime-_),Y=!1}}break e}finally{S=null,x=W,C=!1}Y=void 0}}finally{Y?Ke():se=!1}}}var Ke;if(typeof G=="function")Ke=function(){G(pe)};else if(typeof MessageChannel<"u"){var Xe=new MessageChannel,Ge=Xe.port2;Xe.port1.onmessage=pe,Ke=function(){Ge.postMessage(null)}}else Ke=function(){M(pe,0)};function Ye(_,Y){re=M(function(){_(i.unstable_now())},Y)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(_){_.callback=null},i.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<_?Math.floor(1e3/_):5},i.unstable_getCurrentPriorityLevel=function(){return x},i.unstable_next=function(_){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var W=x;x=Y;try{return _()}finally{x=W}},i.unstable_requestPaint=function(){V=!0},i.unstable_runWithPriority=function(_,Y){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var W=x;x=_;try{return Y()}finally{x=W}},i.unstable_scheduleCallback=function(_,Y,W){var ye=i.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ye+W:ye):W=ye,_){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=W+R,_={id:v++,callback:Y,priorityLevel:_,startTime:W,expirationTime:R,sortIndex:-1},W>ye?(_.sortIndex=W,n(d,_),r(m)===null&&_===r(d)&&(L?(D(re),re=-1):L=!0,Ye(K,W-ye))):(_.sortIndex=R,n(m,_),E||C||(E=!0,se||(se=!0,Ke()))),_},i.unstable_shouldYield=ne,i.unstable_wrapCallback=function(_){var Y=x;return function(){var W=x;x=Y;try{return _.apply(this,arguments)}finally{x=W}}}}(Oo)),Oo}var Hp;function US(){return Hp||(Hp=1,Ao.exports=MS()),Ao.exports}var ko={exports:{}},it={};/**
36
36
  * @license React
37
37
  * react-dom.production.js
38
38
  *
@@ -40,7 +40,7 @@ var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,config
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */var wy;function mE(){if(wy)return wt;wy=1;var t=md();function n(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(m,p,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:m,containerInfo:p,implementation:g}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,wt.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(m,p,null,g)},wt.flushSync=function(m){var p=f.T,g=a.p;try{if(f.T=null,a.p=2,m)return m()}finally{f.T=p,a.p=g,a.d.f()}},wt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(m,p))},wt.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},wt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,k=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:k}):g==="script"&&a.d.X(m,{crossOrigin:v,integrity:b,fetchPriority:k,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},wt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(m)},wt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin);a.d.L(m,g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},wt.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=d(p.as,p.crossOrigin);a.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(m)},wt.requestFormReset=function(m){a.d.r(m)},wt.unstable_batchedUpdates=function(m,p){return m(p)},wt.useFormState=function(m,p,g){return f.H.useFormState(m,p,g)},wt.useFormStatus=function(){return f.H.useHostTransitionStatus()},wt.version="19.1.0",wt}var Ny;function gE(){if(Ny)return xf.exports;Ny=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),xf.exports=mE(),xf.exports}/**
43
+ */var Vp;function BS(){if(Vp)return it;Vp=1;var i=Fo();function n(m){var d="https://react.dev/errors/"+m;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)d+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+d+" 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(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(m,d,v){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:""+S,children:m,containerInfo:d,implementation:v}}var p=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,d){if(m==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,it.createPortal=function(m,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(n(299));return f(m,d,null,v)},it.flushSync=function(m){var d=p.T,v=s.p;try{if(p.T=null,s.p=2,m)return m()}finally{p.T=d,s.p=v,s.d.f()}},it.preconnect=function(m,d){typeof m=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,s.d.C(m,d))},it.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},it.preinit=function(m,d){if(typeof m=="string"&&d&&typeof d.as=="string"){var v=d.as,S=h(v,d.crossOrigin),x=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;v==="style"?s.d.S(m,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:S,integrity:x,fetchPriority:C}):v==="script"&&s.d.X(m,{crossOrigin:S,integrity:x,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},it.preinitModule=function(m,d){if(typeof m=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var v=h(d.as,d.crossOrigin);s.d.M(m,{crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&s.d.M(m)},it.preload=function(m,d){if(typeof m=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var v=d.as,S=h(v,d.crossOrigin);s.d.L(m,v,{crossOrigin:S,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},it.preloadModule=function(m,d){if(typeof m=="string")if(d){var v=h(d.as,d.crossOrigin);s.d.m(m,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else s.d.m(m)},it.requestFormReset=function(m){s.d.r(m)},it.unstable_batchedUpdates=function(m,d){return m(d)},it.useFormState=function(m,d,v){return p.H.useFormState(m,d,v)},it.useFormStatus=function(){return p.H.useHostTransitionStatus()},it.version="19.1.0",it}var $p;function HS(){if($p)return ko.exports;$p=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),ko.exports=BS(),ko.exports}/**
44
44
  * @license React
45
45
  * react-dom-client.production.js
46
46
  *
@@ -48,119 +48,75 @@ var oN=Object.defineProperty;var uN=(t,n,i)=>n in t?oN(t,n,{enumerable:!0,config
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var ky;function yE(){if(ky)return us;ky=1;var t=pE(),n=md(),i=gE();function a(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var r=e,s=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,(r.flags&4098)!==0&&(s=r.return),e=r.return;while(e)}return r.tag===3?s:null}function f(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(a(188))}function m(e){var r=e.alternate;if(!r){if(r=u(e),r===null)throw Error(a(188));return r!==e?null:e}for(var s=e,o=r;;){var c=s.return;if(c===null)break;var h=c.alternate;if(h===null){if(o=c.return,o!==null){s=o;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===s)return d(c),e;if(h===o)return d(c),r;h=h.sibling}throw Error(a(188))}if(s.return!==o.return)s=c,o=h;else{for(var y=!1,x=c.child;x;){if(x===s){y=!0,s=c,o=h;break}if(x===o){y=!0,o=c,s=h;break}x=x.sibling}if(!y){for(x=h.child;x;){if(x===s){y=!0,s=h,o=c;break}if(x===o){y=!0,o=h,s=c;break}x=x.sibling}if(!y)throw Error(a(189))}}if(s.alternate!==o)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:r}function p(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e;for(e=e.child;e!==null;){if(r=p(e),r!==null)return r;e=e.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),z=Symbol.for("react.consumer"),G=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),xe=Symbol.iterator;function ot(e){return e===null||typeof e!="object"?null:(e=xe&&e[xe]||e["@@iterator"],typeof e=="function"?e:null)}var ut=Symbol.for("react.client.reference");function it(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ut?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case U:return"Profiler";case T:return"StrictMode";case F:return"Suspense";case he:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case G:return(e.displayName||"Context")+".Provider";case z:return(e._context.displayName||"Context")+".Consumer";case X:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fe:return r=e.displayName||null,r!==null?r:it(e.type)||"Memo";case re:r=e._payload,e=e._init;try{return it(e(r))}catch{}}return null}var rt=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ke=[],E=-1;function V(e){return{current:e}}function Q(e){0>E||(e.current=ke[E],ke[E]=null,E--)}function I(e,r){E++,ke[E]=e.current,e.current=r}var ie=V(null),Se=V(null),pe=V(null),Ut=V(null);function Ge(e,r){switch(I(pe,r),I(Se,e),I(ie,null),r.nodeType){case 9:case 11:e=(e=r.documentElement)&&(e=e.namespaceURI)?$g(e):0;break;default:if(e=r.tagName,r=r.namespaceURI)r=$g(r),e=Cg(r,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(ie),I(ie,e)}function Fn(){Q(ie),Q(Se),Q(pe)}function Po(e){e.memoizedState!==null&&I(Ut,e);var r=ie.current,s=Cg(r,e.type);r!==s&&(I(Se,e),I(ie,s))}function Ks(e){Se.current===e&&(Q(ie),Q(Se)),Ut.current===e&&(Q(Ut),ns._currentValue=ne)}var Wo=Object.prototype.hasOwnProperty,eu=t.unstable_scheduleCallback,tu=t.unstable_cancelCallback,qS=t.unstable_shouldYield,KS=t.unstable_requestPaint,mn=t.unstable_now,VS=t.unstable_getCurrentPriorityLevel,oh=t.unstable_ImmediatePriority,uh=t.unstable_UserBlockingPriority,Vs=t.unstable_NormalPriority,HS=t.unstable_LowPriority,ch=t.unstable_IdlePriority,GS=t.log,JS=t.unstable_setDisableYieldValue,ca=null,Bt=null;function Xn(e){if(typeof GS=="function"&&JS(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(ca,e)}catch{}}var _t=Math.clz32?Math.clz32:ZS,YS=Math.log,IS=Math.LN2;function ZS(e){return e>>>=0,e===0?32:31-(YS(e)/IS|0)|0}var Hs=256,Gs=4194304;function $i(e){var r=e&42;if(r!==0)return r;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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 Js(e,r,s){var o=e.pendingLanes;if(o===0)return 0;var c=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var x=o&134217727;return x!==0?(o=x&~h,o!==0?c=$i(o):(y&=x,y!==0?c=$i(y):s||(s=x&~e,s!==0&&(c=$i(s))))):(x=o&~h,x!==0?c=$i(x):y!==0?c=$i(y):s||(s=o&~e,s!==0&&(c=$i(s)))),c===0?0:r!==0&&r!==c&&(r&h)===0&&(h=c&-c,s=r&-r,h>=s||h===32&&(s&4194048)!==0)?r:c}function fa(e,r){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&r)===0}function QS(e,r){switch(e){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 fh(){var e=Hs;return Hs<<=1,(Hs&4194048)===0&&(Hs=256),e}function dh(){var e=Gs;return Gs<<=1,(Gs&62914560)===0&&(Gs=4194304),e}function nu(e){for(var r=[],s=0;31>s;s++)r.push(e);return r}function da(e,r){e.pendingLanes|=r,r!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function FS(e,r,s,o,c,h){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,R=e.expirationTimes,j=e.hiddenUpdates;for(s=y&~s;0<s;){var q=31-_t(s),H=1<<q;x[q]=0,R[q]=-1;var D=j[q];if(D!==null)for(j[q]=null,q=0;q<D.length;q++){var L=D[q];L!==null&&(L.lane&=-536870913)}s&=~H}o!==0&&hh(e,o,0),h!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~r))}function hh(e,r,s){e.pendingLanes|=r,e.suspendedLanes&=~r;var o=31-_t(r);e.entangledLanes|=r,e.entanglements[o]=e.entanglements[o]|1073741824|s&4194090}function ph(e,r){var s=e.entangledLanes|=r;for(e=e.entanglements;s;){var o=31-_t(s),c=1<<o;c&r|e[o]&r&&(e[o]|=r),s&=~c}}function iu(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 ru(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mh(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Zg(e.type))}function XS(e,r){var s=Y.p;try{return Y.p=e,r()}finally{Y.p=s}}var Pn=Math.random().toString(36).slice(2),xt="__reactFiber$"+Pn,Tt="__reactProps$"+Pn,ar="__reactContainer$"+Pn,au="__reactEvents$"+Pn,PS="__reactListeners$"+Pn,WS="__reactHandles$"+Pn,gh="__reactResources$"+Pn,ha="__reactMarker$"+Pn;function su(e){delete e[xt],delete e[Tt],delete e[au],delete e[PS],delete e[WS]}function sr(e){var r=e[xt];if(r)return r;for(var s=e.parentNode;s;){if(r=s[ar]||s[xt]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(e=Dg(e);e!==null;){if(s=e[xt])return s;e=Dg(e)}return r}e=s,s=e.parentNode}return null}function lr(e){if(e=e[xt]||e[ar]){var r=e.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return e}return null}function pa(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e.stateNode;throw Error(a(33))}function or(e){var r=e[gh];return r||(r=e[gh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ct(e){e[ha]=!0}var yh=new Set,vh={};function Ci(e,r){ur(e,r),ur(e+"Capture",r)}function ur(e,r){for(vh[e]=r,e=0;e<r.length;e++)yh.add(r[e])}var e1=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]*$"),bh={},xh={};function t1(e){return Wo.call(xh,e)?!0:Wo.call(bh,e)?!1:e1.test(e)?xh[e]=!0:(bh[e]=!0,!1)}function Ys(e,r,s){if(t1(r))if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(r);return}}e.setAttribute(r,""+s)}}function Is(e,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttribute(r,""+s)}}function Rn(e,r,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(r,s,""+o)}}var lu,Sh;function cr(e){if(lu===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);lu=r&&r[1]||"",Sh=-1<s.stack.indexOf(`
52
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
53
- `+lu+e+Sh}var ou=!1;function uu(e,r){if(!e||ou)return"";ou=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(L){var D=L}Reflect.construct(e,[],H)}else{try{H.call()}catch(L){D=L}e.call(H.prototype)}}else{try{throw Error()}catch(L){D=L}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(L){if(L&&D&&typeof L.stack=="string")return[L.stack,D.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),y=h[0],x=h[1];if(y&&x){var R=y.split(`
54
- `),j=x.split(`
55
- `);for(c=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;c<j.length&&!j[c].includes("DetermineComponentFrameRoot");)c++;if(o===R.length||c===j.length)for(o=R.length-1,c=j.length-1;1<=o&&0<=c&&R[o]!==j[c];)c--;for(;1<=o&&0<=c;o--,c--)if(R[o]!==j[c]){if(o!==1||c!==1)do if(o--,c--,0>c||R[o]!==j[c]){var q=`
56
- `+R[o].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=o&&0<=c);break}}}finally{ou=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?cr(s):""}function n1(e){switch(e.tag){case 26:case 27:case 5:return cr(e.type);case 16:return cr("Lazy");case 13:return cr("Suspense");case 19:return cr("SuspenseList");case 0:case 15:return uu(e.type,!1);case 11:return uu(e.type.render,!1);case 1:return uu(e.type,!0);case 31:return cr("Activity");default:return""}}function wh(e){try{var r="";do r+=n1(e),e=e.return;while(e);return r}catch(s){return`
57
- Error generating stack: `+s.message+`
58
- `+s.stack}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function i1(e){var r=Nh(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),o=""+e[r];if(!e.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,h=s.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){o=""+y,h.call(this,y)}}),Object.defineProperty(e,r,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Zs(e){e._valueTracker||(e._valueTracker=i1(e))}function kh(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var s=r.getValue(),o="";return e&&(o=Nh(e)?e.checked?"true":"false":e.value),e=o,e!==s?(r.setValue(e),!0):!1}function Qs(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 r1=/[\n"\\]/g;function Ft(e){return e.replace(r1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function cu(e,r,s,o,c,h,y,x){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),r!=null?y==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+Qt(r)):e.value!==""+Qt(r)&&(e.value=""+Qt(r)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),r!=null?fu(e,y,Qt(r)):s!=null?fu(e,y,Qt(s)):o!=null&&e.removeAttribute("value"),c==null&&h!=null&&(e.defaultChecked=!!h),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Qt(x):e.removeAttribute("name")}function Rh(e,r,s,o,c,h,y,x){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),r!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||r!=null))return;s=s!=null?""+Qt(s):"",r=r!=null?""+Qt(r):s,x||r===e.value||(e.value=r),e.defaultValue=r}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=x?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function fu(e,r,s){r==="number"&&Qs(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function fr(e,r,s,o){if(e=e.options,r){r={};for(var c=0;c<s.length;c++)r["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=r.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&o&&(e[s].defaultSelected=!0)}else{for(s=""+Qt(s),r=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}r!==null||e[c].disabled||(r=e[c])}r!==null&&(r.selected=!0)}}function Eh(e,r,s){if(r!=null&&(r=""+Qt(r),r!==e.value&&(e.value=r),s==null)){e.defaultValue!==r&&(e.defaultValue=r);return}e.defaultValue=s!=null?""+Qt(s):""}function Ah(e,r,s,o){if(r==null){if(o!=null){if(s!=null)throw Error(a(92));if(rt(o)){if(1<o.length)throw Error(a(93));o=o[0]}s=o}s==null&&(s=""),r=s}s=Qt(r),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o)}function dr(e,r){if(r){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=r;return}}e.textContent=r}var a1=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 $h(e,r,s){var o=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="":o?e.setProperty(r,s):typeof s!="number"||s===0||a1.has(r)?r==="float"?e.cssFloat=s:e[r]=(""+s).trim():e[r]=s+"px"}function Ch(e,r,s){if(r!=null&&typeof r!="object")throw Error(a(62));if(e=e.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in r)o=r[c],r.hasOwnProperty(c)&&s[c]!==o&&$h(e,c,o)}else for(var h in r)r.hasOwnProperty(h)&&$h(e,h,r[h])}function du(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 s1=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"]]),l1=/^[\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 Fs(e){return l1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var hu=null;function pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hr=null,pr=null;function Th(e){var r=lr(e);if(r&&(e=r.stateNode)){var s=e[Tt]||null;e:switch(e=r.stateNode,r.type){case"input":if(cu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Ft(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var o=s[r];if(o!==e&&o.form===e.form){var c=o[Tt]||null;if(!c)throw Error(a(90));cu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(r=0;r<s.length;r++)o=s[r],o.form===e.form&&kh(o)}break e;case"textarea":Eh(e,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&fr(e,!!s.multiple,r,!1)}}}var mu=!1;function Oh(e,r,s){if(mu)return e(r,s);mu=!0;try{var o=e(r);return o}finally{if(mu=!1,(hr!==null||pr!==null)&&(Ll(),hr&&(r=hr,e=pr,pr=hr=null,Th(r),e)))for(r=0;r<e.length;r++)Th(e[r])}}function ma(e,r){var s=e.stateNode;if(s===null)return null;var o=s[Tt]||null;if(o===null)return null;s=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,r,typeof s));return s}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=!1;if(En)try{var ga={};Object.defineProperty(ga,"passive",{get:function(){gu=!0}}),window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{gu=!1}var Wn=null,yu=null,Xs=null;function jh(){if(Xs)return Xs;var e,r=yu,s=r.length,o,c="value"in Wn?Wn.value:Wn.textContent,h=c.length;for(e=0;e<s&&r[e]===c[e];e++);var y=s-e;for(o=1;o<=y&&r[s-o]===c[h-o];o++);return Xs=c.slice(e,1<o?1-o:void 0)}function Ps(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function Ws(){return!0}function Dh(){return!1}function Ot(e){function r(s,o,c,h,y){this._reactName=s,this._targetInst=c,this.type=o,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(h):h[x]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Ws:Dh,this.isPropagationStopped=Dh,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),r}var Ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},el=Ot(Ti),ya=g({},Ti,{view:0,detail:0}),o1=Ot(ya),vu,bu,va,tl=g({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,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!==va&&(va&&e.type==="mousemove"?(vu=e.screenX-va.screenX,bu=e.screenY-va.screenY):bu=vu=0,va=e),vu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),Mh=Ot(tl),u1=g({},tl,{dataTransfer:0}),c1=Ot(u1),f1=g({},ya,{relatedTarget:0}),xu=Ot(f1),d1=g({},Ti,{animationName:0,elapsedTime:0,pseudoElement:0}),h1=Ot(d1),p1=g({},Ti,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),m1=Ot(p1),g1=g({},Ti,{data:0}),Lh=Ot(g1),y1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v1={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"},b1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x1(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=b1[e])?!!r[e]:!1}function Su(){return x1}var S1=g({},ya,{key:function(e){if(e.key){var r=y1[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=Ps(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?Ps(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ps(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),w1=Ot(S1),N1=g({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zh=Ot(N1),k1=g({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),R1=Ot(k1),E1=g({},Ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),A1=Ot(E1),$1=g({},tl,{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}),C1=Ot($1),T1=g({},Ti,{newState:0,oldState:0}),O1=Ot(T1),j1=[9,13,27,32],wu=En&&"CompositionEvent"in window,ba=null;En&&"documentMode"in document&&(ba=document.documentMode);var D1=En&&"TextEvent"in window&&!ba,Uh=En&&(!wu||ba&&8<ba&&11>=ba),Bh=" ",_h=!1;function qh(e,r){switch(e){case"keyup":return j1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mr=!1;function M1(e,r){switch(e){case"compositionend":return Kh(r);case"keypress":return r.which!==32?null:(_h=!0,Bh);case"textInput":return e=r.data,e===Bh&&_h?null:e;default:return null}}function L1(e,r){if(mr)return e==="compositionend"||!wu&&qh(e,r)?(e=jh(),Xs=yu=Wn=null,mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Uh&&r.locale!=="ko"?null:r.data;default:return null}}var z1={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 Vh(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!z1[e.type]:r==="textarea"}function Hh(e,r,s,o){hr?pr?pr.push(o):pr=[o]:hr=o,r=Kl(r,"onChange"),0<r.length&&(s=new el("onChange","change",null,s,o),e.push({event:s,listeners:r}))}var xa=null,Sa=null;function U1(e){Ng(e,0)}function nl(e){var r=pa(e);if(kh(r))return e}function Gh(e,r){if(e==="change")return r}var Jh=!1;if(En){var Nu;if(En){var ku="oninput"in document;if(!ku){var Yh=document.createElement("div");Yh.setAttribute("oninput","return;"),ku=typeof Yh.oninput=="function"}Nu=ku}else Nu=!1;Jh=Nu&&(!document.documentMode||9<document.documentMode)}function Ih(){xa&&(xa.detachEvent("onpropertychange",Zh),Sa=xa=null)}function Zh(e){if(e.propertyName==="value"&&nl(Sa)){var r=[];Hh(r,Sa,e,pu(e)),Oh(U1,r)}}function B1(e,r,s){e==="focusin"?(Ih(),xa=r,Sa=s,xa.attachEvent("onpropertychange",Zh)):e==="focusout"&&Ih()}function _1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nl(Sa)}function q1(e,r){if(e==="click")return nl(r)}function K1(e,r){if(e==="input"||e==="change")return nl(r)}function V1(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var qt=typeof Object.is=="function"?Object.is:V1;function wa(e,r){if(qt(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var c=s[o];if(!Wo.call(r,c)||!qt(e[c],r[c]))return!1}return!0}function Qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fh(e,r){var s=Qh(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=r&&o>=r)return{node:s,offset:r-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Qh(s)}}function Xh(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?Xh(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Ph(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var r=Qs(e.document);r instanceof e.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)e=r.contentWindow;else break;r=Qs(e.document)}return r}function Ru(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}var H1=En&&"documentMode"in document&&11>=document.documentMode,gr=null,Eu=null,Na=null,Au=!1;function Wh(e,r,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Au||gr==null||gr!==Qs(o)||(o=gr,"selectionStart"in o&&Ru(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Na&&wa(Na,o)||(Na=o,o=Kl(Eu,"onSelect"),0<o.length&&(r=new el("onSelect","select",null,r,s),e.push({event:r,listeners:o}),r.target=gr)))}function Oi(e,r){var s={};return s[e.toLowerCase()]=r.toLowerCase(),s["Webkit"+e]="webkit"+r,s["Moz"+e]="moz"+r,s}var yr={animationend:Oi("Animation","AnimationEnd"),animationiteration:Oi("Animation","AnimationIteration"),animationstart:Oi("Animation","AnimationStart"),transitionrun:Oi("Transition","TransitionRun"),transitionstart:Oi("Transition","TransitionStart"),transitioncancel:Oi("Transition","TransitionCancel"),transitionend:Oi("Transition","TransitionEnd")},$u={},ep={};En&&(ep=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function ji(e){if($u[e])return $u[e];if(!yr[e])return e;var r=yr[e],s;for(s in r)if(r.hasOwnProperty(s)&&s in ep)return $u[e]=r[s];return e}var tp=ji("animationend"),np=ji("animationiteration"),ip=ji("animationstart"),G1=ji("transitionrun"),J1=ji("transitionstart"),Y1=ji("transitioncancel"),rp=ji("transitionend"),ap=new Map,Cu="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(" ");Cu.push("scrollEnd");function on(e,r){ap.set(e,r),Ci(r,[e])}var sp=new WeakMap;function Xt(e,r){if(typeof e=="object"&&e!==null){var s=sp.get(e);return s!==void 0?s:(r={value:e,source:r,stack:wh(r)},sp.set(e,r),r)}return{value:e,source:r,stack:wh(r)}}var Pt=[],vr=0,Tu=0;function il(){for(var e=vr,r=Tu=vr=0;r<e;){var s=Pt[r];Pt[r++]=null;var o=Pt[r];Pt[r++]=null;var c=Pt[r];Pt[r++]=null;var h=Pt[r];if(Pt[r++]=null,o!==null&&c!==null){var y=o.pending;y===null?c.next=c:(c.next=y.next,y.next=c),o.pending=c}h!==0&&lp(s,c,h)}}function rl(e,r,s,o){Pt[vr++]=e,Pt[vr++]=r,Pt[vr++]=s,Pt[vr++]=o,Tu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Ou(e,r,s,o){return rl(e,r,s,o),al(e)}function br(e,r){return rl(e,null,null,r),al(e)}function lp(e,r,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var c=!1,h=e.return;h!==null;)h.childLanes|=s,o=h.alternate,o!==null&&(o.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(c=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,c&&r!==null&&(c=31-_t(s),e=h.hiddenUpdates,o=e[c],o===null?e[c]=[r]:o.push(r),r.lane=s|536870912),h):null}function al(e){if(50<Za)throw Za=0,Uc=null,Error(a(185));for(var r=e.return;r!==null;)e=r,r=e.return;return e.tag===3?e.stateNode:null}var xr={};function I1(e,r,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,r,s,o){return new I1(e,r,s,o)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function An(e,r){var s=e.alternate;return s===null?(s=Kt(e.tag,r,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=r,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,r=e.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function op(e,r){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=r,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,r=s.dependencies,e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),e}function sl(e,r,s,o,c,h){var y=0;if(o=e,typeof e=="function")ju(e)&&(y=1);else if(typeof e=="string")y=Qw(e,s,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Kt(31,s,r,c),e.elementType=ee,e.lanes=h,e;case N:return Di(s.children,c,h,r);case T:y=8,c|=24;break;case U:return e=Kt(12,s,r,c|2),e.elementType=U,e.lanes=h,e;case F:return e=Kt(13,s,r,c),e.elementType=F,e.lanes=h,e;case he:return e=Kt(19,s,r,c),e.elementType=he,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case G:y=10;break e;case z:y=9;break e;case X:y=11;break e;case fe:y=14;break e;case re:y=16,o=null;break e}y=29,s=Error(a(130,e===null?"null":typeof e,"")),o=null}return r=Kt(y,s,r,c),r.elementType=e,r.type=o,r.lanes=h,r}function Di(e,r,s,o){return e=Kt(7,e,o,r),e.lanes=s,e}function Du(e,r,s){return e=Kt(6,e,null,r),e.lanes=s,e}function Mu(e,r,s){return r=Kt(4,e.children!==null?e.children:[],e.key,r),r.lanes=s,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}var Sr=[],wr=0,ll=null,ol=0,Wt=[],en=0,Mi=null,$n=1,Cn="";function Li(e,r){Sr[wr++]=ol,Sr[wr++]=ll,ll=e,ol=r}function up(e,r,s){Wt[en++]=$n,Wt[en++]=Cn,Wt[en++]=Mi,Mi=e;var o=$n;e=Cn;var c=32-_t(o)-1;o&=~(1<<c),s+=1;var h=32-_t(r)+c;if(30<h){var y=c-c%5;h=(o&(1<<y)-1).toString(32),o>>=y,c-=y,$n=1<<32-_t(r)+c|s<<c|o,Cn=h+e}else $n=1<<h|s<<c|o,Cn=e}function Lu(e){e.return!==null&&(Li(e,1),up(e,1,0))}function zu(e){for(;e===ll;)ll=Sr[--wr],Sr[wr]=null,ol=Sr[--wr],Sr[wr]=null;for(;e===Mi;)Mi=Wt[--en],Wt[en]=null,Cn=Wt[--en],Wt[en]=null,$n=Wt[--en],Wt[en]=null}var Rt=null,Ze=null,Ee=!1,zi=null,gn=!1,Uu=Error(a(519));function Ui(e){var r=Error(a(418,""));throw Ea(Xt(r,e)),Uu}function cp(e){var r=e.stateNode,s=e.type,o=e.memoizedProps;switch(r[xt]=e,r[Tt]=o,s){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(s=0;s<Fa.length;s++)be(Fa[s],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":be("invalid",r),Rh(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Zs(r);break;case"select":be("invalid",r);break;case"textarea":be("invalid",r),Ah(r,o.value,o.defaultValue,o.children),Zs(r)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||o.suppressHydrationWarning===!0||Ag(r.textContent,s)?(o.popover!=null&&(be("beforetoggle",r),be("toggle",r)),o.onScroll!=null&&be("scroll",r),o.onScrollEnd!=null&&be("scrollend",r),o.onClick!=null&&(r.onclick=Vl),r=!0):r=!1,r||Ui(e)}function fp(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Rt=Rt.return}}function ka(e){if(e!==Rt)return!1;if(!Ee)return fp(e),Ee=!0,!1;var r=e.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Wc(e.type,e.memoizedProps)),s=!s),s&&Ze&&Ui(e),fp(e),r===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8)if(s=e.data,s==="/$"){if(r===0){Ze=cn(e.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++;e=e.nextSibling}Ze=null}}else r===27?(r=Ze,mi(e.type)?(e=rf,rf=null,Ze=e):Ze=r):Ze=Rt?cn(e.stateNode.nextSibling):null;return!0}function Ra(){Ze=Rt=null,Ee=!1}function dp(){var e=zi;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),zi=null),e}function Ea(e){zi===null?zi=[e]:zi.push(e)}var Bu=V(null),Bi=null,Tn=null;function ei(e,r,s){I(Bu,r._currentValue),r._currentValue=s}function On(e){e._currentValue=Bu.current,Q(Bu)}function _u(e,r,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),e===s)break;e=e.return}}function qu(e,r,s,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var h=c.dependencies;if(h!==null){var y=c.child;h=h.firstContext;e:for(;h!==null;){var x=h;h=c;for(var R=0;R<r.length;R++)if(x.context===r[R]){h.lanes|=s,x=h.alternate,x!==null&&(x.lanes|=s),_u(h.return,s,e),o||(y=null);break e}h=x.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(a(341));y.lanes|=s,h=y.alternate,h!==null&&(h.lanes|=s),_u(y,s,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Aa(e,r,s,o){e=null;for(var c=r,h=!1;c!==null;){if(!h){if((c.flags&524288)!==0)h=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var x=c.type;qt(c.pendingProps.value,y.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ut.current){if(y=c.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}c=c.return}e!==null&&qu(r,e,s,o),r.flags|=262144}function ul(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _i(e){Bi=e,Tn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return hp(Bi,e)}function cl(e,r){return Bi===null&&_i(e),hp(e,r)}function hp(e,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},Tn===null){if(e===null)throw Error(a(308));Tn=r,e.dependencies={lanes:0,firstContext:r},e.flags|=524288}else Tn=Tn.next=r;return s}var Z1=typeof AbortController<"u"?AbortController:function(){var e=[],r=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){r.aborted=!0,e.forEach(function(s){return s()})}},Q1=t.unstable_scheduleCallback,F1=t.unstable_NormalPriority,at={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ku(){return{controller:new Z1,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&Q1(F1,function(){e.controller.abort()})}var Ca=null,Vu=0,Nr=0,kr=null;function X1(e,r){if(Ca===null){var s=Ca=[];Vu=0,Nr=Gc(),kr={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Vu++,r.then(pp,pp),r}function pp(){if(--Vu===0&&Ca!==null){kr!==null&&(kr.status="fulfilled");var e=Ca;Ca=null,Nr=0,kr=null;for(var r=0;r<e.length;r++)(0,e[r])()}}function P1(e,r){var s=[],o={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){o.status="fulfilled",o.value=r;for(var c=0;c<s.length;c++)(0,s[c])(r)},function(c){for(o.status="rejected",o.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),o}var mp=B.S;B.S=function(e,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&X1(e,r),mp!==null&&mp(e,r)};var qi=V(null);function Hu(){var e=qi.current;return e!==null?e:qe.pooledCache}function fl(e,r){r===null?I(qi,qi.current):I(qi,r.pool)}function gp(){var e=Hu();return e===null?null:{parent:at._currentValue,pool:e}}var Ta=Error(a(460)),yp=Error(a(474)),dl=Error(a(542)),Gu={then:function(){}};function vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hl(){}function bp(e,r,s){switch(s=e[s],s===void 0?e.push(r):s!==r&&(r.then(hl,hl),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,Sp(e),e;default:if(typeof r.status=="string")r.then(hl,hl);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=r,e.status="pending",e.then(function(o){if(r.status==="pending"){var c=r;c.status="fulfilled",c.value=o}},function(o){if(r.status==="pending"){var c=r;c.status="rejected",c.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,Sp(e),e}throw Oa=r,Ta}}var Oa=null;function xp(){if(Oa===null)throw Error(a(459));var e=Oa;return Oa=null,e}function Sp(e){if(e===Ta||e===dl)throw Error(a(483))}var ti=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yu(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ii(e,r,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ce&2)!==0){var c=o.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),o.pending=r,r=al(e),lp(e,null,s),r}return rl(e,o,r,s),al(e)}function ja(e,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var o=r.lanes;o&=e.pendingLanes,s|=o,r.lanes=s,ph(e,s)}}function Iu(e,r){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var c=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?c=h=y:h=h.next=y,s=s.next}while(s!==null);h===null?c=h=r:h=h.next=r}else c=h=r;s={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=r:e.next=r,s.lastBaseUpdate=r}var Zu=!1;function Da(){if(Zu){var e=kr;if(e!==null)throw e}}function Ma(e,r,s,o){Zu=!1;var c=e.updateQueue;ti=!1;var h=c.firstBaseUpdate,y=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var R=x,j=R.next;R.next=null,y===null?h=j:y.next=j,y=R;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==y&&(x===null?q.firstBaseUpdate=j:x.next=j,q.lastBaseUpdate=R))}if(h!==null){var H=c.baseState;y=0,q=j=R=null,x=h;do{var D=x.lane&-536870913,L=D!==x.lane;if(L?(Ne&D)===D:(o&D)===D){D!==0&&D===Nr&&(Zu=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ue=e,ae=x;D=r;var Le=s;switch(ae.tag){case 1:if(ue=ae.payload,typeof ue=="function"){H=ue.call(Le,H,D);break e}H=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ae.payload,D=typeof ue=="function"?ue.call(Le,H,D):ue,D==null)break e;H=g({},H,D);break e;case 2:ti=!0}}D=x.callback,D!==null&&(e.flags|=64,L&&(e.flags|=8192),L=c.callbacks,L===null?c.callbacks=[D]:L.push(D))}else L={lane:D,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(j=q=L,R=H):q=q.next=L,y|=D;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;L=x,x=L.next,L.next=null,c.lastBaseUpdate=L,c.shared.pending=null}}while(!0);q===null&&(R=H),c.baseState=R,c.firstBaseUpdate=j,c.lastBaseUpdate=q,h===null&&(c.shared.lanes=0),fi|=y,e.lanes=y,e.memoizedState=H}}function wp(e,r){if(typeof e!="function")throw Error(a(191,e));e.call(r)}function Np(e,r){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)wp(s[e],r)}var Rr=V(null),pl=V(0);function kp(e,r){e=Bn,I(pl,e),I(Rr,r),Bn=e|r.baseLanes}function Qu(){I(pl,Bn),I(Rr,Rr.current)}function Fu(){Bn=pl.current,Q(Rr),Q(pl)}var ri=0,ge=null,De=null,We=null,ml=!1,Er=!1,Ki=!1,gl=0,La=0,Ar=null,W1=0;function Xe(){throw Error(a(321))}function Xu(e,r){if(r===null)return!1;for(var s=0;s<r.length&&s<e.length;s++)if(!qt(e[s],r[s]))return!1;return!0}function Pu(e,r,s,o,c,h){return ri=h,ge=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=e===null||e.memoizedState===null?lm:om,Ki=!1,h=s(o,c),Ki=!1,Er&&(h=Ep(r,s,o,c)),Rp(e),h}function Rp(e){B.H=wl;var r=De!==null&&De.next!==null;if(ri=0,We=De=ge=null,ml=!1,La=0,Ar=null,r)throw Error(a(300));e===null||ft||(e=e.dependencies,e!==null&&ul(e)&&(ft=!0))}function Ep(e,r,s,o){ge=e;var c=0;do{if(Er&&(Ar=null),La=0,Er=!1,25<=c)throw Error(a(301));if(c+=1,We=De=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}B.H=sw,h=r(s,o)}while(Er);return h}function ew(){var e=B.H,r=e.useState()[0];return r=typeof r.then=="function"?za(r):r,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ge.flags|=1024),r}function Wu(){var e=gl!==0;return gl=0,e}function ec(e,r,s){r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~s}function tc(e){if(ml){for(e=e.memoizedState;e!==null;){var r=e.queue;r!==null&&(r.pending=null),e=e.next}ml=!1}ri=0,We=De=ge=null,Er=!1,La=gl=0,Ar=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function et(){if(De===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var r=We===null?ge.memoizedState:We.next;if(r!==null)We=r,De=e;else{if(e===null)throw ge.alternate===null?Error(a(467)):Error(a(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function nc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function za(e){var r=La;return La+=1,Ar===null&&(Ar=[]),e=bp(Ar,e,r),r=ge,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?lm:om),e}function yl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return za(e);if(e.$$typeof===G)return St(e)}throw Error(a(438,String(e)))}function ic(e){var r=null,s=ge.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var o=ge.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(c){return c.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=nc(),ge.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(e),o=0;o<e;o++)s[o]=oe;return r.index++,s}function jn(e,r){return typeof r=="function"?r(e):r}function vl(e){var r=et();return rc(r,De,e)}function rc(e,r,s){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=s;var c=e.baseQueue,h=o.pending;if(h!==null){if(c!==null){var y=c.next;c.next=h.next,h.next=y}r.baseQueue=c=h,o.pending=null}if(h=e.baseState,c===null)e.memoizedState=h;else{r=c.next;var x=y=null,R=null,j=r,q=!1;do{var H=j.lane&-536870913;if(H!==j.lane?(Ne&H)===H:(ri&H)===H){var D=j.revertLane;if(D===0)R!==null&&(R=R.next={lane:0,revertLane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),H===Nr&&(q=!0);else if((ri&D)===D){j=j.next,D===Nr&&(q=!0);continue}else H={lane:0,revertLane:j.revertLane,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},R===null?(x=R=H,y=h):R=R.next=H,ge.lanes|=D,fi|=D;H=j.action,Ki&&s(h,H),h=j.hasEagerState?j.eagerState:s(h,H)}else D={lane:H,revertLane:j.revertLane,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},R===null?(x=R=D,y=h):R=R.next=D,ge.lanes|=H,fi|=H;j=j.next}while(j!==null&&j!==r);if(R===null?y=h:R.next=x,!qt(h,e.memoizedState)&&(ft=!0,q&&(s=kr,s!==null)))throw s;e.memoizedState=h,e.baseState=y,e.baseQueue=R,o.lastRenderedState=h}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ac(e){var r=et(),s=r.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var o=s.dispatch,c=s.pending,h=r.memoizedState;if(c!==null){s.pending=null;var y=c=c.next;do h=e(h,y.action),y=y.next;while(y!==c);qt(h,r.memoizedState)||(ft=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),s.lastRenderedState=h}return[h,o]}function Ap(e,r,s){var o=ge,c=et(),h=Ee;if(h){if(s===void 0)throw Error(a(407));s=s()}else s=r();var y=!qt((De||c).memoizedState,s);y&&(c.memoizedState=s,ft=!0),c=c.queue;var x=Tp.bind(null,o,c,e);if(Ua(2048,8,x,[e]),c.getSnapshot!==r||y||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,$r(9,bl(),Cp.bind(null,o,c,s,r),null),qe===null)throw Error(a(349));h||(ri&124)!==0||$p(o,r,s)}return s}function $p(e,r,s){e.flags|=16384,e={getSnapshot:r,value:s},r=ge.updateQueue,r===null?(r=nc(),ge.updateQueue=r,r.stores=[e]):(s=r.stores,s===null?r.stores=[e]:s.push(e))}function Cp(e,r,s,o){r.value=s,r.getSnapshot=o,Op(r)&&jp(e)}function Tp(e,r,s){return s(function(){Op(r)&&jp(e)})}function Op(e){var r=e.getSnapshot;e=e.value;try{var s=r();return!qt(e,s)}catch{return!0}}function jp(e){var r=br(e,2);r!==null&&Yt(r,e,2)}function sc(e){var r=jt();if(typeof e=="function"){var s=e;if(e=s(),Ki){Xn(!0);try{s()}finally{Xn(!1)}}}return r.memoizedState=r.baseState=e,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},r}function Dp(e,r,s,o){return e.baseState=s,rc(e,De,typeof o=="function"?o:jn)}function tw(e,r,s,o,c){if(Sl(e))throw Error(a(485));if(e=r.action,e!==null){var h={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};B.T!==null?s(!0):h.isTransition=!1,o(h),s=r.pending,s===null?(h.next=r.pending=h,Mp(r,h)):(h.next=s.next,r.pending=s.next=h)}}function Mp(e,r){var s=r.action,o=r.payload,c=e.state;if(r.isTransition){var h=B.T,y={};B.T=y;try{var x=s(c,o),R=B.S;R!==null&&R(y,x),Lp(e,r,x)}catch(j){lc(e,r,j)}finally{B.T=h}}else try{h=s(c,o),Lp(e,r,h)}catch(j){lc(e,r,j)}}function Lp(e,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){zp(e,r,o)},function(o){return lc(e,r,o)}):zp(e,r,s)}function zp(e,r,s){r.status="fulfilled",r.value=s,Up(r),e.state=s,r=e.pending,r!==null&&(s=r.next,s===r?e.pending=null:(s=s.next,r.next=s,Mp(e,s)))}function lc(e,r,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=s,Up(r),r=r.next;while(r!==o)}e.action=null}function Up(e){e=e.listeners;for(var r=0;r<e.length;r++)(0,e[r])()}function Bp(e,r){return r}function _p(e,r){if(Ee){var s=qe.formState;if(s!==null){e:{var o=ge;if(Ee){if(Ze){t:{for(var c=Ze,h=gn;c.nodeType!==8;){if(!h){c=null;break t}if(c=cn(c.nextSibling),c===null){c=null;break t}}h=c.data,c=h==="F!"||h==="F"?c:null}if(c){Ze=cn(c.nextSibling),o=c.data==="F!";break e}}Ui(o)}o=!1}o&&(r=s[0])}}return s=jt(),s.memoizedState=s.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bp,lastRenderedState:r},s.queue=o,s=rm.bind(null,ge,o),o.dispatch=s,o=sc(!1),h=dc.bind(null,ge,!1,o.queue),o=jt(),c={state:r,dispatch:null,action:e,pending:null},o.queue=c,s=tw.bind(null,ge,c,h,s),c.dispatch=s,o.memoizedState=e,[r,s,!1]}function qp(e){var r=et();return Kp(r,De,e)}function Kp(e,r,s){if(r=rc(e,r,Bp)[0],e=vl(jn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=za(r)}catch(y){throw y===Ta?dl:y}else o=r;r=et();var c=r.queue,h=c.dispatch;return s!==r.memoizedState&&(ge.flags|=2048,$r(9,bl(),nw.bind(null,c,s),null)),[o,h,e]}function nw(e,r){e.action=r}function Vp(e){var r=et(),s=De;if(s!==null)return Kp(r,s,e);et(),r=r.memoizedState,s=et();var o=s.queue.dispatch;return s.memoizedState=e,[r,o,!1]}function $r(e,r,s,o){return e={tag:e,create:s,deps:o,inst:r,next:null},r=ge.updateQueue,r===null&&(r=nc(),ge.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,r.lastEffect=e),e}function bl(){return{destroy:void 0,resource:void 0}}function Hp(){return et().memoizedState}function xl(e,r,s,o){var c=jt();o=o===void 0?null:o,ge.flags|=e,c.memoizedState=$r(1|r,bl(),s,o)}function Ua(e,r,s,o){var c=et();o=o===void 0?null:o;var h=c.memoizedState.inst;De!==null&&o!==null&&Xu(o,De.memoizedState.deps)?c.memoizedState=$r(r,h,s,o):(ge.flags|=e,c.memoizedState=$r(1|r,h,s,o))}function Gp(e,r){xl(8390656,8,e,r)}function Jp(e,r){Ua(2048,8,e,r)}function Yp(e,r){return Ua(4,2,e,r)}function Ip(e,r){return Ua(4,4,e,r)}function Zp(e,r){if(typeof r=="function"){e=e();var s=r(e);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function Qp(e,r,s){s=s!=null?s.concat([e]):null,Ua(4,4,Zp.bind(null,r,e),s)}function oc(){}function Fp(e,r){var s=et();r=r===void 0?null:r;var o=s.memoizedState;return r!==null&&Xu(r,o[1])?o[0]:(s.memoizedState=[e,r],e)}function Xp(e,r){var s=et();r=r===void 0?null:r;var o=s.memoizedState;if(r!==null&&Xu(r,o[1]))return o[0];if(o=e(),Ki){Xn(!0);try{e()}finally{Xn(!1)}}return s.memoizedState=[o,r],o}function uc(e,r,s){return s===void 0||(ri&1073741824)!==0?e.memoizedState=r:(e.memoizedState=s,e=eg(),ge.lanes|=e,fi|=e,s)}function Pp(e,r,s,o){return qt(s,r)?s:Rr.current!==null?(e=uc(e,s,o),qt(e,r)||(ft=!0),e):(ri&42)===0?(ft=!0,e.memoizedState=s):(e=eg(),ge.lanes|=e,fi|=e,r)}function Wp(e,r,s,o,c){var h=Y.p;Y.p=h!==0&&8>h?h:8;var y=B.T,x={};B.T=x,dc(e,!1,r,s);try{var R=c(),j=B.S;if(j!==null&&j(x,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var q=P1(R,o);Ba(e,r,q,Jt(e))}else Ba(e,r,o,Jt(e))}catch(H){Ba(e,r,{then:function(){},status:"rejected",reason:H},Jt())}finally{Y.p=h,B.T=y}}function iw(){}function cc(e,r,s,o){if(e.tag!==5)throw Error(a(476));var c=em(e).queue;Wp(e,c,r,ne,s===null?iw:function(){return tm(e),s(o)})}function em(e){var r=e.memoizedState;if(r!==null)return r;r={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:ne},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:s},next:null},e.memoizedState=r,e=e.alternate,e!==null&&(e.memoizedState=r),r}function tm(e){var r=em(e).next.queue;Ba(e,r,{},Jt())}function fc(){return St(ns)}function nm(){return et().memoizedState}function im(){return et().memoizedState}function rw(e){for(var r=e.return;r!==null;){switch(r.tag){case 24:case 3:var s=Jt();e=ni(s);var o=ii(r,e,s);o!==null&&(Yt(o,r,s),ja(o,r,s)),r={cache:Ku()},e.payload=r;return}r=r.return}}function aw(e,r,s){var o=Jt();s={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},Sl(e)?am(r,s):(s=Ou(e,r,s,o),s!==null&&(Yt(s,e,o),sm(s,r,o)))}function rm(e,r,s){var o=Jt();Ba(e,r,s,o)}function Ba(e,r,s,o){var c={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(Sl(e))am(r,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var y=r.lastRenderedState,x=h(y,s);if(c.hasEagerState=!0,c.eagerState=x,qt(x,y))return rl(e,r,c,0),qe===null&&il(),!1}catch{}finally{}if(s=Ou(e,r,c,o),s!==null)return Yt(s,e,o),sm(s,r,o),!0}return!1}function dc(e,r,s,o){if(o={lane:2,revertLane:Gc(),action:o,hasEagerState:!1,eagerState:null,next:null},Sl(e)){if(r)throw Error(a(479))}else r=Ou(e,s,o,2),r!==null&&Yt(r,e,2)}function Sl(e){var r=e.alternate;return e===ge||r!==null&&r===ge}function am(e,r){Er=ml=!0;var s=e.pending;s===null?r.next=r:(r.next=s.next,s.next=r),e.pending=r}function sm(e,r,s){if((s&4194048)!==0){var o=r.lanes;o&=e.pendingLanes,s|=o,r.lanes=s,ph(e,s)}}var wl={readContext:St,use:yl,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe},lm={readContext:St,use:yl,useCallback:function(e,r){return jt().memoizedState=[e,r===void 0?null:r],e},useContext:St,useEffect:Gp,useImperativeHandle:function(e,r,s){s=s!=null?s.concat([e]):null,xl(4194308,4,Zp.bind(null,r,e),s)},useLayoutEffect:function(e,r){return xl(4194308,4,e,r)},useInsertionEffect:function(e,r){xl(4,2,e,r)},useMemo:function(e,r){var s=jt();r=r===void 0?null:r;var o=e();if(Ki){Xn(!0);try{e()}finally{Xn(!1)}}return s.memoizedState=[o,r],o},useReducer:function(e,r,s){var o=jt();if(s!==void 0){var c=s(r);if(Ki){Xn(!0);try{s(r)}finally{Xn(!1)}}}else c=r;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=aw.bind(null,ge,e),[o.memoizedState,e]},useRef:function(e){var r=jt();return e={current:e},r.memoizedState=e},useState:function(e){e=sc(e);var r=e.queue,s=rm.bind(null,ge,r);return r.dispatch=s,[e.memoizedState,s]},useDebugValue:oc,useDeferredValue:function(e,r){var s=jt();return uc(s,e,r)},useTransition:function(){var e=sc(!1);return e=Wp.bind(null,ge,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,r,s){var o=ge,c=jt();if(Ee){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),qe===null)throw Error(a(349));(Ne&124)!==0||$p(o,r,s)}c.memoizedState=s;var h={value:s,getSnapshot:r};return c.queue=h,Gp(Tp.bind(null,o,h,e),[e]),o.flags|=2048,$r(9,bl(),Cp.bind(null,o,h,s,r),null),s},useId:function(){var e=jt(),r=qe.identifierPrefix;if(Ee){var s=Cn,o=$n;s=(o&~(1<<32-_t(o)-1)).toString(32)+s,r="«"+r+"R"+s,s=gl++,0<s&&(r+="H"+s.toString(32)),r+="»"}else s=W1++,r="«"+r+"r"+s.toString(32)+"»";return e.memoizedState=r},useHostTransitionStatus:fc,useFormState:_p,useActionState:_p,useOptimistic:function(e){var r=jt();r.memoizedState=r.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=dc.bind(null,ge,!0,s),s.dispatch=r,[e,r]},useMemoCache:ic,useCacheRefresh:function(){return jt().memoizedState=rw.bind(null,ge)}},om={readContext:St,use:yl,useCallback:Fp,useContext:St,useEffect:Jp,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Ip,useMemo:Xp,useReducer:vl,useRef:Hp,useState:function(){return vl(jn)},useDebugValue:oc,useDeferredValue:function(e,r){var s=et();return Pp(s,De.memoizedState,e,r)},useTransition:function(){var e=vl(jn)[0],r=et().memoizedState;return[typeof e=="boolean"?e:za(e),r]},useSyncExternalStore:Ap,useId:nm,useHostTransitionStatus:fc,useFormState:qp,useActionState:qp,useOptimistic:function(e,r){var s=et();return Dp(s,De,e,r)},useMemoCache:ic,useCacheRefresh:im},sw={readContext:St,use:yl,useCallback:Fp,useContext:St,useEffect:Jp,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Ip,useMemo:Xp,useReducer:ac,useRef:Hp,useState:function(){return ac(jn)},useDebugValue:oc,useDeferredValue:function(e,r){var s=et();return De===null?uc(s,e,r):Pp(s,De.memoizedState,e,r)},useTransition:function(){var e=ac(jn)[0],r=et().memoizedState;return[typeof e=="boolean"?e:za(e),r]},useSyncExternalStore:Ap,useId:nm,useHostTransitionStatus:fc,useFormState:Vp,useActionState:Vp,useOptimistic:function(e,r){var s=et();return De!==null?Dp(s,De,e,r):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ic,useCacheRefresh:im},Cr=null,_a=0;function Nl(e){var r=_a;return _a+=1,Cr===null&&(Cr=[]),bp(Cr,e,r)}function qa(e,r){r=r.props.ref,e.ref=r!==void 0?r:null}function kl(e,r){throw r.$$typeof===v?Error(a(525)):(e=Object.prototype.toString.call(r),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)))}function um(e){var r=e._init;return r(e._payload)}function cm(e){function r(C,$){if(e){var O=C.deletions;O===null?(C.deletions=[$],C.flags|=16):O.push($)}}function s(C,$){if(!e)return null;for(;$!==null;)r(C,$),$=$.sibling;return null}function o(C){for(var $=new Map;C!==null;)C.key!==null?$.set(C.key,C):$.set(C.index,C),C=C.sibling;return $}function c(C,$){return C=An(C,$),C.index=0,C.sibling=null,C}function h(C,$,O){return C.index=O,e?(O=C.alternate,O!==null?(O=O.index,O<$?(C.flags|=67108866,$):O):(C.flags|=67108866,$)):(C.flags|=1048576,$)}function y(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function x(C,$,O,K){return $===null||$.tag!==6?($=Du(O,C.mode,K),$.return=C,$):($=c($,O),$.return=C,$)}function R(C,$,O,K){var P=O.type;return P===N?q(C,$,O.props.children,K,O.key):$!==null&&($.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===re&&um(P)===$.type)?($=c($,O.props),qa($,O),$.return=C,$):($=sl(O.type,O.key,O.props,null,C.mode,K),qa($,O),$.return=C,$)}function j(C,$,O,K){return $===null||$.tag!==4||$.stateNode.containerInfo!==O.containerInfo||$.stateNode.implementation!==O.implementation?($=Mu(O,C.mode,K),$.return=C,$):($=c($,O.children||[]),$.return=C,$)}function q(C,$,O,K,P){return $===null||$.tag!==7?($=Di(O,C.mode,K,P),$.return=C,$):($=c($,O),$.return=C,$)}function H(C,$,O){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Du(""+$,C.mode,O),$.return=C,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case b:return O=sl($.type,$.key,$.props,null,C.mode,O),qa(O,$),O.return=C,O;case k:return $=Mu($,C.mode,O),$.return=C,$;case re:var K=$._init;return $=K($._payload),H(C,$,O)}if(rt($)||ot($))return $=Di($,C.mode,O,null),$.return=C,$;if(typeof $.then=="function")return H(C,Nl($),O);if($.$$typeof===G)return H(C,cl(C,$),O);kl(C,$)}return null}function D(C,$,O,K){var P=$!==null?$.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return P!==null?null:x(C,$,""+O,K);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case b:return O.key===P?R(C,$,O,K):null;case k:return O.key===P?j(C,$,O,K):null;case re:return P=O._init,O=P(O._payload),D(C,$,O,K)}if(rt(O)||ot(O))return P!==null?null:q(C,$,O,K,null);if(typeof O.then=="function")return D(C,$,Nl(O),K);if(O.$$typeof===G)return D(C,$,cl(C,O),K);kl(C,O)}return null}function L(C,$,O,K,P){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return C=C.get(O)||null,x($,C,""+K,P);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return C=C.get(K.key===null?O:K.key)||null,R($,C,K,P);case k:return C=C.get(K.key===null?O:K.key)||null,j($,C,K,P);case re:var ye=K._init;return K=ye(K._payload),L(C,$,O,K,P)}if(rt(K)||ot(K))return C=C.get(O)||null,q($,C,K,P,null);if(typeof K.then=="function")return L(C,$,O,Nl(K),P);if(K.$$typeof===G)return L(C,$,O,cl($,K),P);kl($,K)}return null}function ue(C,$,O,K){for(var P=null,ye=null,te=$,se=$=0,ht=null;te!==null&&se<O.length;se++){te.index>se?(ht=te,te=null):ht=te.sibling;var Re=D(C,te,O[se],K);if(Re===null){te===null&&(te=ht);break}e&&te&&Re.alternate===null&&r(C,te),$=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re,te=ht}if(se===O.length)return s(C,te),Ee&&Li(C,se),P;if(te===null){for(;se<O.length;se++)te=H(C,O[se],K),te!==null&&($=h(te,$,se),ye===null?P=te:ye.sibling=te,ye=te);return Ee&&Li(C,se),P}for(te=o(te);se<O.length;se++)ht=L(te,C,se,O[se],K),ht!==null&&(e&&ht.alternate!==null&&te.delete(ht.key===null?se:ht.key),$=h(ht,$,se),ye===null?P=ht:ye.sibling=ht,ye=ht);return e&&te.forEach(function(xi){return r(C,xi)}),Ee&&Li(C,se),P}function ae(C,$,O,K){if(O==null)throw Error(a(151));for(var P=null,ye=null,te=$,se=$=0,ht=null,Re=O.next();te!==null&&!Re.done;se++,Re=O.next()){te.index>se?(ht=te,te=null):ht=te.sibling;var xi=D(C,te,Re.value,K);if(xi===null){te===null&&(te=ht);break}e&&te&&xi.alternate===null&&r(C,te),$=h(xi,$,se),ye===null?P=xi:ye.sibling=xi,ye=xi,te=ht}if(Re.done)return s(C,te),Ee&&Li(C,se),P;if(te===null){for(;!Re.done;se++,Re=O.next())Re=H(C,Re.value,K),Re!==null&&($=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re);return Ee&&Li(C,se),P}for(te=o(te);!Re.done;se++,Re=O.next())Re=L(te,C,se,Re.value,K),Re!==null&&(e&&Re.alternate!==null&&te.delete(Re.key===null?se:Re.key),$=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re);return e&&te.forEach(function(lN){return r(C,lN)}),Ee&&Li(C,se),P}function Le(C,$,O,K){if(typeof O=="object"&&O!==null&&O.type===N&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case b:e:{for(var P=O.key;$!==null;){if($.key===P){if(P=O.type,P===N){if($.tag===7){s(C,$.sibling),K=c($,O.props.children),K.return=C,C=K;break e}}else if($.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===re&&um(P)===$.type){s(C,$.sibling),K=c($,O.props),qa(K,O),K.return=C,C=K;break e}s(C,$);break}else r(C,$);$=$.sibling}O.type===N?(K=Di(O.props.children,C.mode,K,O.key),K.return=C,C=K):(K=sl(O.type,O.key,O.props,null,C.mode,K),qa(K,O),K.return=C,C=K)}return y(C);case k:e:{for(P=O.key;$!==null;){if($.key===P)if($.tag===4&&$.stateNode.containerInfo===O.containerInfo&&$.stateNode.implementation===O.implementation){s(C,$.sibling),K=c($,O.children||[]),K.return=C,C=K;break e}else{s(C,$);break}else r(C,$);$=$.sibling}K=Mu(O,C.mode,K),K.return=C,C=K}return y(C);case re:return P=O._init,O=P(O._payload),Le(C,$,O,K)}if(rt(O))return ue(C,$,O,K);if(ot(O)){if(P=ot(O),typeof P!="function")throw Error(a(150));return O=P.call(O),ae(C,$,O,K)}if(typeof O.then=="function")return Le(C,$,Nl(O),K);if(O.$$typeof===G)return Le(C,$,cl(C,O),K);kl(C,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,$!==null&&$.tag===6?(s(C,$.sibling),K=c($,O),K.return=C,C=K):(s(C,$),K=Du(O,C.mode,K),K.return=C,C=K),y(C)):s(C,$)}return function(C,$,O,K){try{_a=0;var P=Le(C,$,O,K);return Cr=null,P}catch(te){if(te===Ta||te===dl)throw te;var ye=Kt(29,te,null,C.mode);return ye.lanes=K,ye.return=C,ye}finally{}}}var Tr=cm(!0),fm=cm(!1),tn=V(null),yn=null;function ai(e){var r=e.alternate;I(st,st.current&1),I(tn,e),yn===null&&(r===null||Rr.current!==null||r.memoizedState!==null)&&(yn=e)}function dm(e){if(e.tag===22){if(I(st,st.current),I(tn,e),yn===null){var r=e.alternate;r!==null&&r.memoizedState!==null&&(yn=e)}}else si()}function si(){I(st,st.current),I(tn,tn.current)}function Dn(e){Q(tn),yn===e&&(yn=null),Q(st)}var st=V(0);function Rl(e){for(var r=e;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||nf(s)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function hc(e,r,s,o){r=e.memoizedState,s=s(o,r),s=s==null?r:g({},r,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var pc={enqueueSetState:function(e,r,s){e=e._reactInternals;var o=Jt(),c=ni(o);c.payload=r,s!=null&&(c.callback=s),r=ii(e,c,o),r!==null&&(Yt(r,e,o),ja(r,e,o))},enqueueReplaceState:function(e,r,s){e=e._reactInternals;var o=Jt(),c=ni(o);c.tag=1,c.payload=r,s!=null&&(c.callback=s),r=ii(e,c,o),r!==null&&(Yt(r,e,o),ja(r,e,o))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var s=Jt(),o=ni(s);o.tag=2,r!=null&&(o.callback=r),r=ii(e,o,s),r!==null&&(Yt(r,e,s),ja(r,e,s))}};function hm(e,r,s,o,c,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,y):r.prototype&&r.prototype.isPureReactComponent?!wa(s,o)||!wa(c,h):!0}function pm(e,r,s,o){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,o),r.state!==e&&pc.enqueueReplaceState(r,r.state,null)}function Vi(e,r){var s=r;if("ref"in r){s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}if(e=e.defaultProps){s===r&&(s=g({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}var El=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function mm(e){El(e)}function gm(e){console.error(e)}function ym(e){El(e)}function Al(e,r){try{var s=e.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function vm(e,r,s){try{var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function mc(e,r,s){return s=ni(s),s.tag=3,s.payload={element:null},s.callback=function(){Al(e,r)},s}function bm(e){return e=ni(e),e.tag=3,e}function xm(e,r,s,o){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var h=o.value;e.payload=function(){return c(h)},e.callback=function(){vm(r,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){vm(r,s,o),typeof c!="function"&&(di===null?di=new Set([this]):di.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})})}function lw(e,r,s,o,c){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=s.alternate,r!==null&&Aa(r,s,c,!0),s=tn.current,s!==null){switch(s.tag){case 13:return yn===null?_c():s.alternate===null&&Qe===0&&(Qe=3),s.flags&=-257,s.flags|=65536,s.lanes=c,o===Gu?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([o]):r.add(o),Kc(e,o,c)),!1;case 22:return s.flags|=65536,o===Gu?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([o]):s.add(o)),Kc(e,o,c)),!1}throw Error(a(435,s.tag))}return Kc(e,o,c),_c(),!1}if(Ee)return r=tn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=c,o!==Uu&&(e=Error(a(422),{cause:o}),Ea(Xt(e,s)))):(o!==Uu&&(r=Error(a(423),{cause:o}),Ea(Xt(r,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=Xt(o,s),c=mc(e.stateNode,o,c),Iu(e,c),Qe!==4&&(Qe=2)),!1;var h=Error(a(520),{cause:o});if(h=Xt(h,s),Ia===null?Ia=[h]:Ia.push(h),Qe!==4&&(Qe=2),r===null)return!0;o=Xt(o,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=mc(s.stateNode,o,e),Iu(s,e),!1;case 1:if(r=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(di===null||!di.has(h))))return s.flags|=65536,c&=-c,s.lanes|=c,c=bm(c),xm(c,e,s,o),Iu(s,c),!1}s=s.return}while(s!==null);return!1}var Sm=Error(a(461)),ft=!1;function gt(e,r,s,o){r.child=e===null?fm(r,null,s,o):Tr(r,e.child,s,o)}function wm(e,r,s,o,c){s=s.render;var h=r.ref;if("ref"in o){var y={};for(var x in o)x!=="ref"&&(y[x]=o[x])}else y=o;return _i(r),o=Pu(e,r,s,y,h,c),x=Wu(),e!==null&&!ft?(ec(e,r,c),Mn(e,r,c)):(Ee&&x&&Lu(r),r.flags|=1,gt(e,r,o,c),r.child)}function Nm(e,r,s,o,c){if(e===null){var h=s.type;return typeof h=="function"&&!ju(h)&&h.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=h,km(e,r,h,o,c)):(e=sl(s.type,null,o,r,r.mode,c),e.ref=r.ref,e.return=r,r.child=e)}if(h=e.child,!Nc(e,c)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:wa,s(y,o)&&e.ref===r.ref)return Mn(e,r,c)}return r.flags|=1,e=An(h,o),e.ref=r.ref,e.return=r,r.child=e}function km(e,r,s,o,c){if(e!==null){var h=e.memoizedProps;if(wa(h,o)&&e.ref===r.ref)if(ft=!1,r.pendingProps=o=h,Nc(e,c))(e.flags&131072)!==0&&(ft=!0);else return r.lanes=e.lanes,Mn(e,r,c)}return gc(e,r,s,o,c)}function Rm(e,r,s){var o=r.pendingProps,c=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((r.flags&128)!==0){if(o=h!==null?h.baseLanes|s:s,e!==null){for(c=r.child=e.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;r.childLanes=h&~o}else r.childLanes=0,r.child=null;return Em(e,r,o,s)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},e!==null&&fl(r,h!==null?h.cachePool:null),h!==null?kp(r,h):Qu(),dm(r);else return r.lanes=r.childLanes=536870912,Em(e,r,h!==null?h.baseLanes|s:s,s)}else h!==null?(fl(r,h.cachePool),kp(r,h),si(),r.memoizedState=null):(e!==null&&fl(r,null),Qu(),si());return gt(e,r,c,s),r.child}function Em(e,r,s,o){var c=Hu();return c=c===null?null:{parent:at._currentValue,pool:c},r.memoizedState={baseLanes:s,cachePool:c},e!==null&&fl(r,null),Qu(),dm(r),e!==null&&Aa(e,r,o,!0),null}function $l(e,r){var s=r.ref;if(s===null)e!==null&&e.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(e===null||e.ref!==s)&&(r.flags|=4194816)}}function gc(e,r,s,o,c){return _i(r),s=Pu(e,r,s,o,void 0,c),o=Wu(),e!==null&&!ft?(ec(e,r,c),Mn(e,r,c)):(Ee&&o&&Lu(r),r.flags|=1,gt(e,r,s,c),r.child)}function Am(e,r,s,o,c,h){return _i(r),r.updateQueue=null,s=Ep(r,o,s,c),Rp(e),o=Wu(),e!==null&&!ft?(ec(e,r,h),Mn(e,r,h)):(Ee&&o&&Lu(r),r.flags|=1,gt(e,r,s,h),r.child)}function $m(e,r,s,o,c){if(_i(r),r.stateNode===null){var h=xr,y=s.contextType;typeof y=="object"&&y!==null&&(h=St(y)),h=new s(o,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=pc,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=o,h.state=r.memoizedState,h.refs={},Ju(r),y=s.contextType,h.context=typeof y=="object"&&y!==null?St(y):xr,h.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(hc(r,s,y,o),h.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&pc.enqueueReplaceState(h,h.state,null),Ma(r,o,h,c),Da(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(e===null){h=r.stateNode;var x=r.memoizedProps,R=Vi(s,x);h.props=R;var j=h.context,q=s.contextType;y=xr,typeof q=="object"&&q!==null&&(y=St(q));var H=s.getDerivedStateFromProps;q=typeof H=="function"||typeof h.getSnapshotBeforeUpdate=="function",x=r.pendingProps!==x,q||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x||j!==y)&&pm(r,h,o,y),ti=!1;var D=r.memoizedState;h.state=D,Ma(r,o,h,c),Da(),j=r.memoizedState,x||D!==j||ti?(typeof H=="function"&&(hc(r,s,H,o),j=r.memoizedState),(R=ti||hm(r,s,R,o,D,j,y))?(q||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=j),h.props=o,h.state=j,h.context=y,o=R):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{h=r.stateNode,Yu(e,r),y=r.memoizedProps,q=Vi(s,y),h.props=q,H=r.pendingProps,D=h.context,j=s.contextType,R=xr,typeof j=="object"&&j!==null&&(R=St(j)),x=s.getDerivedStateFromProps,(j=typeof x=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==H||D!==R)&&pm(r,h,o,R),ti=!1,D=r.memoizedState,h.state=D,Ma(r,o,h,c),Da();var L=r.memoizedState;y!==H||D!==L||ti||e!==null&&e.dependencies!==null&&ul(e.dependencies)?(typeof x=="function"&&(hc(r,s,x,o),L=r.memoizedState),(q=ti||hm(r,s,q,o,D,L,R)||e!==null&&e.dependencies!==null&&ul(e.dependencies))?(j||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,L,R),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,L,R)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=L),h.props=o,h.state=L,h.context=R,o=q):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=1024),o=!1)}return h=o,$l(e,r),o=(r.flags&128)!==0,h||o?(h=r.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,e!==null&&o?(r.child=Tr(r,e.child,null,c),r.child=Tr(r,null,s,c)):gt(e,r,s,c),r.memoizedState=h.state,e=r.child):e=Mn(e,r,c),e}function Cm(e,r,s,o){return Ra(),r.flags|=256,gt(e,r,s,o),r.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:gp()}}function bc(e,r,s){return e=e!==null?e.childLanes&~s:0,r&&(e|=nn),e}function Tm(e,r,s){var o=r.pendingProps,c=!1,h=(r.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),y&&(c=!0,r.flags&=-129),y=(r.flags&32)!==0,r.flags&=-33,e===null){if(Ee){if(c?ai(r):si(),Ee){var x=Ze,R;if(R=x){e:{for(R=x,x=gn;R.nodeType!==8;){if(!x){x=null;break e}if(R=cn(R.nextSibling),R===null){x=null;break e}}x=R}x!==null?(r.memoizedState={dehydrated:x,treeContext:Mi!==null?{id:$n,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},R=Kt(18,null,null,0),R.stateNode=x,R.return=r,r.child=R,Rt=r,Ze=null,R=!0):R=!1}R||Ui(r)}if(x=r.memoizedState,x!==null&&(x=x.dehydrated,x!==null))return nf(x)?r.lanes=32:r.lanes=536870912,null;Dn(r)}return x=o.children,o=o.fallback,c?(si(),c=r.mode,x=Cl({mode:"hidden",children:x},c),o=Di(o,c,s,null),x.return=r,o.return=r,x.sibling=o,r.child=x,c=r.child,c.memoizedState=vc(s),c.childLanes=bc(e,y,s),r.memoizedState=yc,o):(ai(r),xc(r,x))}if(R=e.memoizedState,R!==null&&(x=R.dehydrated,x!==null)){if(h)r.flags&256?(ai(r),r.flags&=-257,r=Sc(e,r,s)):r.memoizedState!==null?(si(),r.child=e.child,r.flags|=128,r=null):(si(),c=o.fallback,x=r.mode,o=Cl({mode:"visible",children:o.children},x),c=Di(c,x,s,null),c.flags|=2,o.return=r,c.return=r,o.sibling=c,r.child=o,Tr(r,e.child,null,s),o=r.child,o.memoizedState=vc(s),o.childLanes=bc(e,y,s),r.memoizedState=yc,r=c);else if(ai(r),nf(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var j=y.dgst;y=j,o=Error(a(419)),o.stack="",o.digest=y,Ea({value:o,source:null,stack:null}),r=Sc(e,r,s)}else if(ft||Aa(e,r,s,!1),y=(s&e.childLanes)!==0,ft||y){if(y=qe,y!==null&&(o=s&-s,o=(o&42)!==0?1:iu(o),o=(o&(y.suspendedLanes|s))!==0?0:o,o!==0&&o!==R.retryLane))throw R.retryLane=o,br(e,o),Yt(y,e,o),Sm;x.data==="$?"||_c(),r=Sc(e,r,s)}else x.data==="$?"?(r.flags|=192,r.child=e.child,r=null):(e=R.treeContext,Ze=cn(x.nextSibling),Rt=r,Ee=!0,zi=null,gn=!1,e!==null&&(Wt[en++]=$n,Wt[en++]=Cn,Wt[en++]=Mi,$n=e.id,Cn=e.overflow,Mi=r),r=xc(r,o.children),r.flags|=4096);return r}return c?(si(),c=o.fallback,x=r.mode,R=e.child,j=R.sibling,o=An(R,{mode:"hidden",children:o.children}),o.subtreeFlags=R.subtreeFlags&65011712,j!==null?c=An(j,c):(c=Di(c,x,s,null),c.flags|=2),c.return=r,o.return=r,o.sibling=c,r.child=o,o=c,c=r.child,x=e.child.memoizedState,x===null?x=vc(s):(R=x.cachePool,R!==null?(j=at._currentValue,R=R.parent!==j?{parent:j,pool:j}:R):R=gp(),x={baseLanes:x.baseLanes|s,cachePool:R}),c.memoizedState=x,c.childLanes=bc(e,y,s),r.memoizedState=yc,o):(ai(r),s=e.child,e=s.sibling,s=An(s,{mode:"visible",children:o.children}),s.return=r,s.sibling=null,e!==null&&(y=r.deletions,y===null?(r.deletions=[e],r.flags|=16):y.push(e)),r.child=s,r.memoizedState=null,s)}function xc(e,r){return r=Cl({mode:"visible",children:r},e.mode),r.return=e,e.child=r}function Cl(e,r){return e=Kt(22,e,null,r),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Sc(e,r,s){return Tr(r,e.child,null,s),e=xc(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function Om(e,r,s){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r),_u(e.return,r,s)}function wc(e,r,s,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:c}:(h.isBackwards=r,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=s,h.tailMode=c)}function jm(e,r,s){var o=r.pendingProps,c=o.revealOrder,h=o.tail;if(gt(e,r,o.children,s),o=st.current,(o&2)!==0)o=o&1|2,r.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Om(e,s,r);else if(e.tag===19)Om(e,s,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}switch(I(st,o),c){case"forwards":for(s=r.child,c=null;s!==null;)e=s.alternate,e!==null&&Rl(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=r.child,r.child=null):(c=s.sibling,s.sibling=null),wc(r,!1,c,s,h);break;case"backwards":for(s=null,c=r.child,r.child=null;c!==null;){if(e=c.alternate,e!==null&&Rl(e)===null){r.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}wc(r,!0,s,null,h);break;case"together":wc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Mn(e,r,s){if(e!==null&&(r.dependencies=e.dependencies),fi|=r.lanes,(s&r.childLanes)===0)if(e!==null){if(Aa(e,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(e!==null&&r.child!==e.child)throw Error(a(153));if(r.child!==null){for(e=r.child,s=An(e,e.pendingProps),r.child=s,s.return=r;e.sibling!==null;)e=e.sibling,s=s.sibling=An(e,e.pendingProps),s.return=r;s.sibling=null}return r.child}function Nc(e,r){return(e.lanes&r)!==0?!0:(e=e.dependencies,!!(e!==null&&ul(e)))}function ow(e,r,s){switch(r.tag){case 3:Ge(r,r.stateNode.containerInfo),ei(r,at,e.memoizedState.cache),Ra();break;case 27:case 5:Po(r);break;case 4:Ge(r,r.stateNode.containerInfo);break;case 10:ei(r,r.type,r.memoizedProps.value);break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(ai(r),r.flags|=128,null):(s&r.child.childLanes)!==0?Tm(e,r,s):(ai(r),e=Mn(e,r,s),e!==null?e.sibling:null);ai(r);break;case 19:var c=(e.flags&128)!==0;if(o=(s&r.childLanes)!==0,o||(Aa(e,r,s,!1),o=(s&r.childLanes)!==0),c){if(o)return jm(e,r,s);r.flags|=128}if(c=r.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(st,st.current),o)break;return null;case 22:case 23:return r.lanes=0,Rm(e,r,s);case 24:ei(r,at,e.memoizedState.cache)}return Mn(e,r,s)}function Dm(e,r,s){if(e!==null)if(e.memoizedProps!==r.pendingProps)ft=!0;else{if(!Nc(e,s)&&(r.flags&128)===0)return ft=!1,ow(e,r,s);ft=(e.flags&131072)!==0}else ft=!1,Ee&&(r.flags&1048576)!==0&&up(r,ol,r.index);switch(r.lanes=0,r.tag){case 16:e:{e=r.pendingProps;var o=r.elementType,c=o._init;if(o=c(o._payload),r.type=o,typeof o=="function")ju(o)?(e=Vi(o,e),r.tag=1,r=$m(null,r,o,e,s)):(r.tag=0,r=gc(null,r,o,e,s));else{if(o!=null){if(c=o.$$typeof,c===X){r.tag=11,r=wm(null,r,o,e,s);break e}else if(c===fe){r.tag=14,r=Nm(null,r,o,e,s);break e}}throw r=it(o)||o,Error(a(306,r,""))}}return r;case 0:return gc(e,r,r.type,r.pendingProps,s);case 1:return o=r.type,c=Vi(o,r.pendingProps),$m(e,r,o,c,s);case 3:e:{if(Ge(r,r.stateNode.containerInfo),e===null)throw Error(a(387));o=r.pendingProps;var h=r.memoizedState;c=h.element,Yu(e,r),Ma(r,o,null,s);var y=r.memoizedState;if(o=y.cache,ei(r,at,o),o!==h.cache&&qu(r,[at],s,!0),Da(),o=y.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:y.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=Cm(e,r,o,s);break e}else if(o!==c){c=Xt(Error(a(424)),r),Ea(c),r=Cm(e,r,o,s);break e}else{switch(e=r.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ze=cn(e.firstChild),Rt=r,Ee=!0,zi=null,gn=!0,s=fm(r,null,o,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ra(),o===c){r=Mn(e,r,s);break e}gt(e,r,o,s)}r=r.child}return r;case 26:return $l(e,r),e===null?(s=Ug(r.type,null,r.pendingProps,null))?r.memoizedState=s:Ee||(s=r.type,e=r.pendingProps,o=Hl(pe.current).createElement(s),o[xt]=r,o[Tt]=e,vt(o,s,e),ct(o),r.stateNode=o):r.memoizedState=Ug(r.type,e.memoizedProps,r.pendingProps,e.memoizedState),null;case 27:return Po(r),e===null&&Ee&&(o=r.stateNode=Mg(r.type,r.pendingProps,pe.current),Rt=r,gn=!0,c=Ze,mi(r.type)?(rf=c,Ze=cn(o.firstChild)):Ze=c),gt(e,r,r.pendingProps.children,s),$l(e,r),e===null&&(r.flags|=4194304),r.child;case 5:return e===null&&Ee&&((c=o=Ze)&&(o=zw(o,r.type,r.pendingProps,gn),o!==null?(r.stateNode=o,Rt=r,Ze=cn(o.firstChild),gn=!1,c=!0):c=!1),c||Ui(r)),Po(r),c=r.type,h=r.pendingProps,y=e!==null?e.memoizedProps:null,o=h.children,Wc(c,h)?o=null:y!==null&&Wc(c,y)&&(r.flags|=32),r.memoizedState!==null&&(c=Pu(e,r,ew,null,null,s),ns._currentValue=c),$l(e,r),gt(e,r,o,s),r.child;case 6:return e===null&&Ee&&((e=s=Ze)&&(s=Uw(s,r.pendingProps,gn),s!==null?(r.stateNode=s,Rt=r,Ze=null,e=!0):e=!1),e||Ui(r)),null;case 13:return Tm(e,r,s);case 4:return Ge(r,r.stateNode.containerInfo),o=r.pendingProps,e===null?r.child=Tr(r,null,o,s):gt(e,r,o,s),r.child;case 11:return wm(e,r,r.type,r.pendingProps,s);case 7:return gt(e,r,r.pendingProps,s),r.child;case 8:return gt(e,r,r.pendingProps.children,s),r.child;case 12:return gt(e,r,r.pendingProps.children,s),r.child;case 10:return o=r.pendingProps,ei(r,r.type,o.value),gt(e,r,o.children,s),r.child;case 9:return c=r.type._context,o=r.pendingProps.children,_i(r),c=St(c),o=o(c),r.flags|=1,gt(e,r,o,s),r.child;case 14:return Nm(e,r,r.type,r.pendingProps,s);case 15:return km(e,r,r.type,r.pendingProps,s);case 19:return jm(e,r,s);case 31:return o=r.pendingProps,s=r.mode,o={mode:o.mode,children:o.children},e===null?(s=Cl(o,s),s.ref=r.ref,r.child=s,s.return=r,r=s):(s=An(e.child,o),s.ref=r.ref,r.child=s,s.return=r,r=s),r;case 22:return Rm(e,r,s);case 24:return _i(r),o=St(at),e===null?(c=Hu(),c===null&&(c=qe,h=Ku(),c.pooledCache=h,h.refCount++,h!==null&&(c.pooledCacheLanes|=s),c=h),r.memoizedState={parent:o,cache:c},Ju(r),ei(r,at,c)):((e.lanes&s)!==0&&(Yu(e,r),Ma(r,null,null,s),Da()),c=e.memoizedState,h=r.memoizedState,c.parent!==o?(c={parent:o,cache:o},r.memoizedState=c,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=c),ei(r,at,o)):(o=h.cache,ei(r,at,o),o!==c.cache&&qu(r,[at],s,!0))),gt(e,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Ln(e){e.flags|=4}function Mm(e,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vg(r)){if(r=tn.current,r!==null&&((Ne&4194048)===Ne?yn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||r!==yn))throw Oa=Gu,yp;e.flags|=8192}}function Tl(e,r){r!==null&&(e.flags|=4),e.flags&16384&&(r=e.tag!==22?dh():536870912,e.lanes|=r,Mr|=r)}function Ka(e,r){if(!Ee)switch(e.tailMode){case"hidden":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ie(e){var r=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(r)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=s,r}function uw(e,r,s){var o=r.pendingProps;switch(zu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(r),null;case 1:return Ie(r),null;case 3:return s=r.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),On(at),Fn(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ka(r)?Ln(r):e===null||e.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,dp())),Ie(r),null;case 26:return s=r.memoizedState,e===null?(Ln(r),s!==null?(Ie(r),Mm(r,s)):(Ie(r),r.flags&=-16777217)):s?s!==e.memoizedState?(Ln(r),Ie(r),Mm(r,s)):(Ie(r),r.flags&=-16777217):(e.memoizedProps!==o&&Ln(r),Ie(r),r.flags&=-16777217),null;case 27:Ks(r),s=pe.current;var c=r.type;if(e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ie(r),null}e=ie.current,ka(r)?cp(r):(e=Mg(c,o,s),r.stateNode=e,Ln(r))}return Ie(r),null;case 5:if(Ks(r),s=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ie(r),null}if(e=ie.current,ka(r))cp(r);else{switch(c=Hl(pe.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(s,{is:o.is}):c.createElement(s)}}e[xt]=r,e[Tt]=o;e:for(c=r.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===r)break e;for(;c.sibling===null;){if(c.return===null||c.return===r)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r.stateNode=e;e:switch(vt(e,s,o),s){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ln(r)}}return Ie(r),r.flags&=-16777217,null;case 6:if(e&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(e=pe.current,ka(r)){if(e=r.stateNode,s=r.memoizedProps,o=null,c=Rt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[xt]=r,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||Ag(e.nodeValue,s)),e||Ui(r)}else e=Hl(e).createTextNode(o),e[xt]=r,r.stateNode=e}return Ie(r),null;case 13:if(o=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ka(r),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(a(318));if(c=r.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(a(317));c[xt]=r}else Ra(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ie(r),c=!1}else c=dp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return r.flags&256?(Dn(r),r):(Dn(r),null)}if(Dn(r),(r.flags&128)!==0)return r.lanes=s,r;if(s=o!==null,e=e!==null&&e.memoizedState!==null,s){o=r.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var h=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==c&&(o.flags|=2048)}return s!==e&&s&&(r.child.flags|=8192),Tl(r,r.updateQueue),Ie(r),null;case 4:return Fn(),e===null&&Zc(r.stateNode.containerInfo),Ie(r),null;case 10:return On(r.type),Ie(r),null;case 19:if(Q(st),c=r.memoizedState,c===null)return Ie(r),null;if(o=(r.flags&128)!==0,h=c.rendering,h===null)if(o)Ka(c,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=r.child;e!==null;){if(h=Rl(e),h!==null){for(r.flags|=128,Ka(c,!1),e=h.updateQueue,r.updateQueue=e,Tl(r,e),r.subtreeFlags=0,e=s,s=r.child;s!==null;)op(s,e),s=s.sibling;return I(st,st.current&1|2),r.child}e=e.sibling}c.tail!==null&&mn()>Dl&&(r.flags|=128,o=!0,Ka(c,!1),r.lanes=4194304)}else{if(!o)if(e=Rl(h),e!==null){if(r.flags|=128,o=!0,e=e.updateQueue,r.updateQueue=e,Tl(r,e),Ka(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Ee)return Ie(r),null}else 2*mn()-c.renderingStartTime>Dl&&s!==536870912&&(r.flags|=128,o=!0,Ka(c,!1),r.lanes=4194304);c.isBackwards?(h.sibling=r.child,r.child=h):(e=c.last,e!==null?e.sibling=h:r.child=h,c.last=h)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=mn(),r.sibling=null,e=st.current,I(st,o?e&1|2:e&1),r):(Ie(r),null);case 22:case 23:return Dn(r),Fu(),o=r.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(s&536870912)!==0&&(r.flags&128)===0&&(Ie(r),r.subtreeFlags&6&&(r.flags|=8192)):Ie(r),s=r.updateQueue,s!==null&&Tl(r,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==s&&(r.flags|=2048),e!==null&&Q(qi),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),On(at),Ie(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function cw(e,r){switch(zu(r),r.tag){case 1:return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return On(at),Fn(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 26:case 27:case 5:return Ks(r),null;case 13:if(Dn(r),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Ra()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Q(st),null;case 4:return Fn(),null;case 10:return On(r.type),null;case 22:case 23:return Dn(r),Fu(),e!==null&&Q(qi),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 24:return On(at),null;case 25:return null;default:return null}}function Lm(e,r){switch(zu(r),r.tag){case 3:On(at),Fn();break;case 26:case 27:case 5:Ks(r);break;case 4:Fn();break;case 13:Dn(r);break;case 19:Q(st);break;case 10:On(r.type);break;case 22:case 23:Dn(r),Fu(),e!==null&&Q(qi);break;case 24:On(at)}}function Va(e,r){try{var s=r.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&e)===e){o=void 0;var h=s.create,y=s.inst;o=h(),y.destroy=o}s=s.next}while(s!==c)}}catch(x){Ue(r,r.return,x)}}function li(e,r,s){try{var o=r.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var h=c.next;o=h;do{if((o.tag&e)===e){var y=o.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,c=r;var R=s,j=x;try{j()}catch(q){Ue(c,R,q)}}}o=o.next}while(o!==h)}}catch(q){Ue(r,r.return,q)}}function zm(e){var r=e.updateQueue;if(r!==null){var s=e.stateNode;try{Np(r,s)}catch(o){Ue(e,e.return,o)}}}function Um(e,r,s){s.props=Vi(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(o){Ue(e,r,o)}}function Ha(e,r){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof s=="function"?e.refCleanup=s(o):s.current=o}}catch(c){Ue(e,r,c)}}function vn(e,r){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(c){Ue(e,r,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Ue(e,r,c)}else s.current=null}function Bm(e){var r=e.type,s=e.memoizedProps,o=e.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(c){Ue(e,e.return,c)}}function kc(e,r,s){try{var o=e.stateNode;Ow(o,e.type,s,r),o[Tt]=r}catch(c){Ue(e,e.return,c)}}function _m(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mi(e.type)||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_m(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&&mi(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 Ec(e,r,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(e),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Vl));else if(o!==4&&(o===27&&mi(e.type)&&(s=e.stateNode,r=null),e=e.child,e!==null))for(Ec(e,r,s),e=e.sibling;e!==null;)Ec(e,r,s),e=e.sibling}function Ol(e,r,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?s.insertBefore(e,r):s.appendChild(e);else if(o!==4&&(o===27&&mi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ol(e,r,s),e=e.sibling;e!==null;)Ol(e,r,s),e=e.sibling}function qm(e){var r=e.stateNode,s=e.memoizedProps;try{for(var o=e.type,c=r.attributes;c.length;)r.removeAttributeNode(c[0]);vt(r,o,s),r[xt]=e,r[Tt]=s}catch(h){Ue(e,e.return,h)}}var zn=!1,Pe=!1,Ac=!1,Km=typeof WeakSet=="function"?WeakSet:Set,dt=null;function fw(e,r){if(e=e.containerInfo,Xc=Ql,e=Ph(e),Ru(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var c=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var y=0,x=-1,R=-1,j=0,q=0,H=e,D=null;t:for(;;){for(var L;H!==s||c!==0&&H.nodeType!==3||(x=y+c),H!==h||o!==0&&H.nodeType!==3||(R=y+o),H.nodeType===3&&(y+=H.nodeValue.length),(L=H.firstChild)!==null;)D=H,H=L;for(;;){if(H===e)break t;if(D===s&&++j===c&&(x=y),D===h&&++q===o&&(R=y),(L=H.nextSibling)!==null)break;H=D,D=H.parentNode}H=L}s=x===-1||R===-1?null:{start:x,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(Pc={focusedElem:e,selectionRange:s},Ql=!1,dt=r;dt!==null;)if(r=dt,e=r.child,(r.subtreeFlags&1024)!==0&&e!==null)e.return=r,dt=e;else for(;dt!==null;){switch(r=dt,h=r.alternate,e=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=r,c=h.memoizedProps,h=h.memoizedState,o=s.stateNode;try{var ue=Vi(s.type,c,s.elementType===s.type);e=o.getSnapshotBeforeUpdate(ue,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(ae){Ue(s,s.return,ae)}}break;case 3:if((e&1024)!==0){if(e=r.stateNode.containerInfo,s=e.nodeType,s===9)tf(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tf(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(a(163))}if(e=r.sibling,e!==null){e.return=r.return,dt=e;break}dt=r.return}}function Vm(e,r,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:oi(e,s),o&4&&Va(5,s);break;case 1:if(oi(e,s),o&4)if(e=s.stateNode,r===null)try{e.componentDidMount()}catch(y){Ue(s,s.return,y)}else{var c=Vi(s.type,r.memoizedProps);r=r.memoizedState;try{e.componentDidUpdate(c,r,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ue(s,s.return,y)}}o&64&&zm(s),o&512&&Ha(s,s.return);break;case 3:if(oi(e,s),o&64&&(e=s.updateQueue,e!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{Np(e,r)}catch(y){Ue(s,s.return,y)}}break;case 27:r===null&&o&4&&qm(s);case 26:case 5:oi(e,s),r===null&&o&4&&Bm(s),o&512&&Ha(s,s.return);break;case 12:oi(e,s);break;case 13:oi(e,s),o&4&&Jm(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=xw.bind(null,s),Bw(e,s))));break;case 22:if(o=s.memoizedState!==null||zn,!o){r=r!==null&&r.memoizedState!==null||Pe,c=zn;var h=Pe;zn=o,(Pe=r)&&!h?ui(e,s,(s.subtreeFlags&8772)!==0):oi(e,s),zn=c,Pe=h}break;case 30:break;default:oi(e,s)}}function Hm(e){var r=e.alternate;r!==null&&(e.alternate=null,Hm(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&su(r)),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 Je=null,Dt=!1;function Un(e,r,s){for(s=s.child;s!==null;)Gm(e,r,s),s=s.sibling}function Gm(e,r,s){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(ca,s)}catch{}switch(s.tag){case 26:Pe||vn(s,r),Un(e,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Pe||vn(s,r);var o=Je,c=Dt;mi(s.type)&&(Je=s.stateNode,Dt=!1),Un(e,r,s),Pa(s.stateNode),Je=o,Dt=c;break;case 5:Pe||vn(s,r);case 6:if(o=Je,c=Dt,Je=null,Un(e,r,s),Je=o,Dt=c,Je!==null)if(Dt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(s.stateNode)}catch(h){Ue(s,r,h)}else try{Je.removeChild(s.stateNode)}catch(h){Ue(s,r,h)}break;case 18:Je!==null&&(Dt?(e=Je,jg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ss(e)):jg(Je,s.stateNode));break;case 4:o=Je,c=Dt,Je=s.stateNode.containerInfo,Dt=!0,Un(e,r,s),Je=o,Dt=c;break;case 0:case 11:case 14:case 15:Pe||li(2,s,r),Pe||li(4,s,r),Un(e,r,s);break;case 1:Pe||(vn(s,r),o=s.stateNode,typeof o.componentWillUnmount=="function"&&Um(s,r,o)),Un(e,r,s);break;case 21:Un(e,r,s);break;case 22:Pe=(o=Pe)||s.memoizedState!==null,Un(e,r,s),Pe=o;break;default:Un(e,r,s)}}function Jm(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ss(e)}catch(s){Ue(r,r.return,s)}}function dw(e){switch(e.tag){case 13:case 19:var r=e.stateNode;return r===null&&(r=e.stateNode=new Km),r;case 22:return e=e.stateNode,r=e._retryCache,r===null&&(r=e._retryCache=new Km),r;default:throw Error(a(435,e.tag))}}function $c(e,r){var s=dw(e);r.forEach(function(o){var c=Sw.bind(null,e,o);s.has(o)||(s.add(o),o.then(c,c))})}function Vt(e,r){var s=r.deletions;if(s!==null)for(var o=0;o<s.length;o++){var c=s[o],h=e,y=r,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(mi(x.type)){Je=x.stateNode,Dt=!1;break e}break;case 5:Je=x.stateNode,Dt=!1;break e;case 3:case 4:Je=x.stateNode.containerInfo,Dt=!0;break e}x=x.return}if(Je===null)throw Error(a(160));Gm(h,y,c),Je=null,Dt=!1,h=c.alternate,h!==null&&(h.return=null),c.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Ym(r,e),r=r.sibling}var un=null;function Ym(e,r){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(r,e),Ht(e),o&4&&(li(3,e,e.return),Va(3,e),li(5,e,e.return));break;case 1:Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),o&64&&zn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var c=un;if(Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),o&4){var h=s!==null?s.memoizedState:null;if(o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){e:{o=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":h=c.getElementsByTagName("title")[0],(!h||h[ha]||h[xt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=c.createElement(o),c.head.insertBefore(h,c.querySelector("head > title"))),vt(h,o,s),h[xt]=e,ct(h),o=h;break e;case"link":var y=qg("link","href",c).get(o+(s.href||""));if(y){for(var x=0;x<y.length;x++)if(h=y[x],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(x,1);break t}}h=c.createElement(o),vt(h,o,s),c.head.appendChild(h);break;case"meta":if(y=qg("meta","content",c).get(o+(s.content||""))){for(x=0;x<y.length;x++)if(h=y[x],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(x,1);break t}}h=c.createElement(o),vt(h,o,s),c.head.appendChild(h);break;default:throw Error(a(468,o))}h[xt]=e,ct(h),o=h}e.stateNode=o}else Kg(c,e.type,e.stateNode);else e.stateNode=_g(c,o,e.memoizedProps);else h!==o?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,o===null?Kg(c,e.type,e.stateNode):_g(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&kc(e,e.memoizedProps,s.memoizedProps)}break;case 27:Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),s!==null&&o&4&&kc(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),e.flags&32){c=e.stateNode;try{dr(c,"")}catch(L){Ue(e,e.return,L)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,kc(e,c,s!==null?s.memoizedProps:c)),o&1024&&(Ac=!0);break;case 6:if(Vt(r,e),Ht(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,s=e.stateNode;try{s.nodeValue=o}catch(L){Ue(e,e.return,L)}}break;case 3:if(Yl=null,c=un,un=Gl(r.containerInfo),Vt(r,e),un=c,Ht(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{ss(r.containerInfo)}catch(L){Ue(e,e.return,L)}Ac&&(Ac=!1,Im(e));break;case 4:o=un,un=Gl(e.stateNode.containerInfo),Vt(r,e),Ht(e),un=o;break;case 12:Vt(r,e),Ht(e);break;case 13:Vt(r,e),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Mc=mn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,$c(e,o)));break;case 22:c=e.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,j=zn,q=Pe;if(zn=j||c,Pe=q||R,Vt(r,e),Pe=q,zn=j,Ht(e),o&8192)e:for(r=e.stateNode,r._visibility=c?r._visibility&-2:r._visibility|1,c&&(s===null||R||zn||Pe||Hi(e)),s=null,r=e;;){if(r.tag===5||r.tag===26){if(s===null){R=s=r;try{if(h=R.stateNode,c)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=R.stateNode;var H=R.memoizedProps.style,D=H!=null&&H.hasOwnProperty("display")?H.display:null;x.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(L){Ue(R,R.return,L)}}}else if(r.tag===6){if(s===null){R=r;try{R.stateNode.nodeValue=c?"":R.memoizedProps}catch(L){Ue(R,R.return,L)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,$c(e,s))));break;case 19:Vt(r,e),Ht(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,$c(e,o)));break;case 30:break;case 21:break;default:Vt(r,e),Ht(e)}}function Ht(e){var r=e.flags;if(r&2){try{for(var s,o=e.return;o!==null;){if(_m(o)){s=o;break}o=o.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var c=s.stateNode,h=Rc(e);Ol(e,h,c);break;case 5:var y=s.stateNode;s.flags&32&&(dr(y,""),s.flags&=-33);var x=Rc(e);Ol(e,x,y);break;case 3:case 4:var R=s.stateNode.containerInfo,j=Rc(e);Ec(e,j,R);break;default:throw Error(a(161))}}catch(q){Ue(e,e.return,q)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function Im(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var r=e;Im(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),e=e.sibling}}function oi(e,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Vm(e,r.alternate,r),r=r.sibling}function Hi(e){for(e=e.child;e!==null;){var r=e;switch(r.tag){case 0:case 11:case 14:case 15:li(4,r,r.return),Hi(r);break;case 1:vn(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&Um(r,r.return,s),Hi(r);break;case 27:Pa(r.stateNode);case 26:case 5:vn(r,r.return),Hi(r);break;case 22:r.memoizedState===null&&Hi(r);break;case 30:Hi(r);break;default:Hi(r)}e=e.sibling}}function ui(e,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,c=e,h=r,y=h.flags;switch(h.tag){case 0:case 11:case 15:ui(c,h,s),Va(4,h);break;case 1:if(ui(c,h,s),o=h,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(j){Ue(o,o.return,j)}if(o=h,c=o.updateQueue,c!==null){var x=o.stateNode;try{var R=c.shared.hiddenCallbacks;if(R!==null)for(c.shared.hiddenCallbacks=null,c=0;c<R.length;c++)wp(R[c],x)}catch(j){Ue(o,o.return,j)}}s&&y&64&&zm(h),Ha(h,h.return);break;case 27:qm(h);case 26:case 5:ui(c,h,s),s&&o===null&&y&4&&Bm(h),Ha(h,h.return);break;case 12:ui(c,h,s);break;case 13:ui(c,h,s),s&&y&4&&Jm(c,h);break;case 22:h.memoizedState===null&&ui(c,h,s),Ha(h,h.return);break;case 30:break;default:ui(c,h,s)}r=r.sibling}}function Cc(e,r){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(e=r.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&$a(s))}function Tc(e,r){e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&$a(e))}function bn(e,r,s,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Zm(e,r,s,o),r=r.sibling}function Zm(e,r,s,o){var c=r.flags;switch(r.tag){case 0:case 11:case 15:bn(e,r,s,o),c&2048&&Va(9,r);break;case 1:bn(e,r,s,o);break;case 3:bn(e,r,s,o),c&2048&&(e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&$a(e)));break;case 12:if(c&2048){bn(e,r,s,o),e=r.stateNode;try{var h=r.memoizedProps,y=h.id,x=h.onPostCommit;typeof x=="function"&&x(y,r.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Ue(r,r.return,R)}}else bn(e,r,s,o);break;case 13:bn(e,r,s,o);break;case 23:break;case 22:h=r.stateNode,y=r.alternate,r.memoizedState!==null?h._visibility&2?bn(e,r,s,o):Ga(e,r):h._visibility&2?bn(e,r,s,o):(h._visibility|=2,Or(e,r,s,o,(r.subtreeFlags&10256)!==0)),c&2048&&Cc(y,r);break;case 24:bn(e,r,s,o),c&2048&&Tc(r.alternate,r);break;default:bn(e,r,s,o)}}function Or(e,r,s,o,c){for(c=c&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var h=e,y=r,x=s,R=o,j=y.flags;switch(y.tag){case 0:case 11:case 15:Or(h,y,x,R,c),Va(8,y);break;case 23:break;case 22:var q=y.stateNode;y.memoizedState!==null?q._visibility&2?Or(h,y,x,R,c):Ga(h,y):(q._visibility|=2,Or(h,y,x,R,c)),c&&j&2048&&Cc(y.alternate,y);break;case 24:Or(h,y,x,R,c),c&&j&2048&&Tc(y.alternate,y);break;default:Or(h,y,x,R,c)}r=r.sibling}}function Ga(e,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=e,o=r,c=o.flags;switch(o.tag){case 22:Ga(s,o),c&2048&&Cc(o.alternate,o);break;case 24:Ga(s,o),c&2048&&Tc(o.alternate,o);break;default:Ga(s,o)}r=r.sibling}}var Ja=8192;function jr(e){if(e.subtreeFlags&Ja)for(e=e.child;e!==null;)Qm(e),e=e.sibling}function Qm(e){switch(e.tag){case 26:jr(e),e.flags&Ja&&e.memoizedState!==null&&Xw(un,e.memoizedState,e.memoizedProps);break;case 5:jr(e);break;case 3:case 4:var r=un;un=Gl(e.stateNode.containerInfo),jr(e),un=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ja,Ja=16777216,jr(e),Ja=r):jr(e));break;default:jr(e)}}function Fm(e){var r=e.alternate;if(r!==null&&(e=r.child,e!==null)){r.child=null;do r=e.sibling,e.sibling=null,e=r;while(e!==null)}}function Ya(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];dt=o,Pm(o,e)}Fm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xm(e),e=e.sibling}function Xm(e){switch(e.tag){case 0:case 11:case 15:Ya(e),e.flags&2048&&li(9,e,e.return);break;case 3:Ya(e);break;case 12:Ya(e);break;case 22:var r=e.stateNode;e.memoizedState!==null&&r._visibility&2&&(e.return===null||e.return.tag!==13)?(r._visibility&=-3,jl(e)):Ya(e);break;default:Ya(e)}}function jl(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];dt=o,Pm(o,e)}Fm(e)}for(e=e.child;e!==null;){switch(r=e,r.tag){case 0:case 11:case 15:li(8,r,r.return),jl(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,jl(r));break;default:jl(r)}e=e.sibling}}function Pm(e,r){for(;dt!==null;){var s=dt;switch(s.tag){case 0:case 11:case 15:li(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:$a(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,dt=o;else e:for(s=e;dt!==null;){o=dt;var c=o.sibling,h=o.return;if(Hm(o),o===s){dt=null;break e}if(c!==null){c.return=h,dt=c;break e}dt=h}}}var hw={getCacheForType:function(e){var r=St(at),s=r.data.get(e);return s===void 0&&(s=e(),r.data.set(e,s)),s}},pw=typeof WeakMap=="function"?WeakMap:Map,Ce=0,qe=null,ve=null,Ne=0,Te=0,Gt=null,ci=!1,Dr=!1,Oc=!1,Bn=0,Qe=0,fi=0,Gi=0,jc=0,nn=0,Mr=0,Ia=null,Mt=null,Dc=!1,Mc=0,Dl=1/0,Ml=null,di=null,yt=0,hi=null,Lr=null,zr=0,Lc=0,zc=null,Wm=null,Za=0,Uc=null;function Jt(){if((Ce&2)!==0&&Ne!==0)return Ne&-Ne;if(B.T!==null){var e=Nr;return e!==0?e:Gc()}return mh()}function eg(){nn===0&&(nn=(Ne&536870912)===0||Ee?fh():536870912);var e=tn.current;return e!==null&&(e.flags|=32),nn}function Yt(e,r,s){(e===qe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(Ur(e,0),pi(e,Ne,nn,!1)),da(e,s),((Ce&2)===0||e!==qe)&&(e===qe&&((Ce&2)===0&&(Gi|=s),Qe===4&&pi(e,Ne,nn,!1)),xn(e))}function tg(e,r,s){if((Ce&6)!==0)throw Error(a(327));var o=!s&&(r&124)===0&&(r&e.expiredLanes)===0||fa(e,r),c=o?yw(e,r):qc(e,r,!0),h=o;do{if(c===0){Dr&&!o&&pi(e,r,0,!1);break}else{if(s=e.current.alternate,h&&!mw(s)){c=qc(e,r,!1),h=!1;continue}if(c===2){if(h=r,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){r=y;e:{var x=e;c=Ia;var R=x.current.memoizedState.isDehydrated;if(R&&(Ur(x,y).flags|=256),y=qc(x,y,!1),y!==2){if(Oc&&!R){x.errorRecoveryDisabledLanes|=h,Gi|=h,c=4;break e}h=Mt,Mt=c,h!==null&&(Mt===null?Mt=h:Mt.push.apply(Mt,h))}c=y}if(h=!1,c!==2)continue}}if(c===1){Ur(e,0),pi(e,r,0,!0);break}e:{switch(o=e,h=c,h){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:pi(o,r,nn,!ci);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(c=Mc+300-mn(),10<c)){if(pi(o,r,nn,!ci),Js(o,0,!0)!==0)break e;o.timeoutHandle=Tg(ng.bind(null,o,s,Mt,Ml,Dc,r,nn,Gi,Mr,ci,h,2,-0,0),c);break e}ng(o,s,Mt,Ml,Dc,r,nn,Gi,Mr,ci,h,0,-0,0)}}break}while(!0);xn(e)}function ng(e,r,s,o,c,h,y,x,R,j,q,H,D,L){if(e.timeoutHandle=-1,H=r.subtreeFlags,(H&8192||(H&16785408)===16785408)&&(ts={stylesheets:null,count:0,unsuspend:Fw},Qm(r),H=Pw(),H!==null)){e.cancelPendingCommit=H(ug.bind(null,e,r,h,s,o,c,y,x,R,q,1,D,L)),pi(e,h,y,!j);return}ug(e,r,h,s,o,c,y,x,R)}function mw(e){for(var r=e;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var c=s[o],h=c.getSnapshot;c=c.value;try{if(!qt(h(),c))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function pi(e,r,s,o){r&=~jc,r&=~Gi,e.suspendedLanes|=r,e.pingedLanes&=~r,o&&(e.warmLanes|=r),o=e.expirationTimes;for(var c=r;0<c;){var h=31-_t(c),y=1<<h;o[h]=-1,c&=~y}s!==0&&hh(e,s,r)}function Ll(){return(Ce&6)===0?(Qa(0),!1):!0}function Bc(){if(ve!==null){if(Te===0)var e=ve.return;else e=ve,Tn=Bi=null,tc(e),Cr=null,_a=0,e=ve;for(;e!==null;)Lm(e.alternate,e),e=e.return;ve=null}}function Ur(e,r){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Dw(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Bc(),qe=e,ve=s=An(e.current,null),Ne=r,Te=0,Gt=null,ci=!1,Dr=fa(e,r),Oc=!1,Mr=nn=jc=Gi=fi=Qe=0,Mt=Ia=null,Dc=!1,(r&8)!==0&&(r|=r&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=r;0<o;){var c=31-_t(o),h=1<<c;r|=e[c],o&=~h}return Bn=r,il(),s}function ig(e,r){ge=null,B.H=wl,r===Ta||r===dl?(r=xp(),Te=3):r===yp?(r=xp(),Te=4):Te=r===Sm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Gt=r,ve===null&&(Qe=1,Al(e,Xt(r,e.current)))}function rg(){var e=B.H;return B.H=wl,e===null?wl:e}function ag(){var e=B.A;return B.A=hw,e}function _c(){Qe=4,ci||(Ne&4194048)!==Ne&&tn.current!==null||(Dr=!0),(fi&134217727)===0&&(Gi&134217727)===0||qe===null||pi(qe,Ne,nn,!1)}function qc(e,r,s){var o=Ce;Ce|=2;var c=rg(),h=ag();(qe!==e||Ne!==r)&&(Ml=null,Ur(e,r)),r=!1;var y=Qe;e:do try{if(Te!==0&&ve!==null){var x=ve,R=Gt;switch(Te){case 8:Bc(),y=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(r=!0);var j=Te;if(Te=0,Gt=null,Br(e,x,R,j),s&&Dr){y=0;break e}break;default:j=Te,Te=0,Gt=null,Br(e,x,R,j)}}gw(),y=Qe;break}catch(q){ig(e,q)}while(!0);return r&&e.shellSuspendCounter++,Tn=Bi=null,Ce=o,B.H=c,B.A=h,ve===null&&(qe=null,Ne=0,il()),y}function gw(){for(;ve!==null;)sg(ve)}function yw(e,r){var s=Ce;Ce|=2;var o=rg(),c=ag();qe!==e||Ne!==r?(Ml=null,Dl=mn()+500,Ur(e,r)):Dr=fa(e,r);e:do try{if(Te!==0&&ve!==null){r=ve;var h=Gt;t:switch(Te){case 1:Te=0,Gt=null,Br(e,r,h,1);break;case 2:case 9:if(vp(h)){Te=0,Gt=null,lg(r);break}r=function(){Te!==2&&Te!==9||qe!==e||(Te=7),xn(e)},h.then(r,r);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:vp(h)?(Te=0,Gt=null,lg(r)):(Te=0,Gt=null,Br(e,r,h,7));break;case 5:var y=null;switch(ve.tag){case 26:y=ve.memoizedState;case 5:case 27:var x=ve;if(!y||Vg(y)){Te=0,Gt=null;var R=x.sibling;if(R!==null)ve=R;else{var j=x.return;j!==null?(ve=j,zl(j)):ve=null}break t}}Te=0,Gt=null,Br(e,r,h,5);break;case 6:Te=0,Gt=null,Br(e,r,h,6);break;case 8:Bc(),Qe=6;break e;default:throw Error(a(462))}}vw();break}catch(q){ig(e,q)}while(!0);return Tn=Bi=null,B.H=o,B.A=c,Ce=s,ve!==null?0:(qe=null,Ne=0,il(),Qe)}function vw(){for(;ve!==null&&!qS();)sg(ve)}function sg(e){var r=Dm(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,r===null?zl(e):ve=r}function lg(e){var r=e,s=r.alternate;switch(r.tag){case 15:case 0:r=Am(s,r,r.pendingProps,r.type,void 0,Ne);break;case 11:r=Am(s,r,r.pendingProps,r.type.render,r.ref,Ne);break;case 5:tc(r);default:Lm(s,r),r=ve=op(r,Bn),r=Dm(s,r,Bn)}e.memoizedProps=e.pendingProps,r===null?zl(e):ve=r}function Br(e,r,s,o){Tn=Bi=null,tc(r),Cr=null,_a=0;var c=r.return;try{if(lw(e,c,r,s,Ne)){Qe=1,Al(e,Xt(s,e.current)),ve=null;return}}catch(h){if(c!==null)throw ve=c,h;Qe=1,Al(e,Xt(s,e.current)),ve=null;return}r.flags&32768?(Ee||o===1?e=!0:Dr||(Ne&536870912)!==0?e=!1:(ci=e=!0,(o===2||o===9||o===3||o===6)&&(o=tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),og(r,e)):zl(r)}function zl(e){var r=e;do{if((r.flags&32768)!==0){og(r,ci);return}e=r.return;var s=uw(r.alternate,r,Bn);if(s!==null){ve=s;return}if(r=r.sibling,r!==null){ve=r;return}ve=r=e}while(r!==null);Qe===0&&(Qe=5)}function og(e,r){do{var s=cw(e.alternate,e);if(s!==null){s.flags&=32767,ve=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(e=e.sibling,e!==null)){ve=e;return}ve=e=s}while(e!==null);Qe=6,ve=null}function ug(e,r,s,o,c,h,y,x,R){e.cancelPendingCommit=null;do Ul();while(yt!==0);if((Ce&6)!==0)throw Error(a(327));if(r!==null){if(r===e.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=Tu,FS(e,s,h,y,x,R),e===qe&&(ve=qe=null,Ne=0),Lr=r,hi=e,zr=s,Lc=h,zc=c,Wm=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ww(Vs,function(){return pg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,c=Y.p,Y.p=2,y=Ce,Ce|=4;try{fw(e,r,s)}finally{Ce=y,Y.p=c,B.T=o}}yt=1,cg(),fg(),dg()}}function cg(){if(yt===1){yt=0;var e=hi,r=Lr,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var o=Y.p;Y.p=2;var c=Ce;Ce|=4;try{Ym(r,e);var h=Pc,y=Ph(e.containerInfo),x=h.focusedElem,R=h.selectionRange;if(y!==x&&x&&x.ownerDocument&&Xh(x.ownerDocument.documentElement,x)){if(R!==null&&Ru(x)){var j=R.start,q=R.end;if(q===void 0&&(q=j),"selectionStart"in x)x.selectionStart=j,x.selectionEnd=Math.min(q,x.value.length);else{var H=x.ownerDocument||document,D=H&&H.defaultView||window;if(D.getSelection){var L=D.getSelection(),ue=x.textContent.length,ae=Math.min(R.start,ue),Le=R.end===void 0?ae:Math.min(R.end,ue);!L.extend&&ae>Le&&(y=Le,Le=ae,ae=y);var C=Fh(x,ae),$=Fh(x,Le);if(C&&$&&(L.rangeCount!==1||L.anchorNode!==C.node||L.anchorOffset!==C.offset||L.focusNode!==$.node||L.focusOffset!==$.offset)){var O=H.createRange();O.setStart(C.node,C.offset),L.removeAllRanges(),ae>Le?(L.addRange(O),L.extend($.node,$.offset)):(O.setEnd($.node,$.offset),L.addRange(O))}}}}for(H=[],L=x;L=L.parentNode;)L.nodeType===1&&H.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<H.length;x++){var K=H[x];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ql=!!Xc,Pc=Xc=null}finally{Ce=c,Y.p=o,B.T=s}}e.current=r,yt=2}}function fg(){if(yt===2){yt=0;var e=hi,r=Lr,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var o=Y.p;Y.p=2;var c=Ce;Ce|=4;try{Vm(e,r.alternate,r)}finally{Ce=c,Y.p=o,B.T=s}}yt=3}}function dg(){if(yt===4||yt===3){yt=0,KS();var e=hi,r=Lr,s=zr,o=Wm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?yt=5:(yt=0,Lr=hi=null,hg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(di=null),ru(s),r=r.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(ca,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,c=Y.p,Y.p=2,B.T=null;try{for(var h=e.onRecoverableError,y=0;y<o.length;y++){var x=o[y];h(x.value,{componentStack:x.stack})}}finally{B.T=r,Y.p=c}}(zr&3)!==0&&Ul(),xn(e),c=e.pendingLanes,(s&4194090)!==0&&(c&42)!==0?e===Uc?Za++:(Za=0,Uc=e):Za=0,Qa(0)}}function hg(e,r){(e.pooledCacheLanes&=r)===0&&(r=e.pooledCache,r!=null&&(e.pooledCache=null,$a(r)))}function Ul(e){return cg(),fg(),dg(),pg()}function pg(){if(yt!==5)return!1;var e=hi,r=Lc;Lc=0;var s=ru(zr),o=B.T,c=Y.p;try{Y.p=32>s?32:s,B.T=null,s=zc,zc=null;var h=hi,y=zr;if(yt=0,Lr=hi=null,zr=0,(Ce&6)!==0)throw Error(a(331));var x=Ce;if(Ce|=4,Xm(h.current),Zm(h,h.current,y,s),Ce=x,Qa(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(ca,h)}catch{}return!0}finally{Y.p=c,B.T=o,hg(e,r)}}function mg(e,r,s){r=Xt(s,r),r=mc(e.stateNode,r,2),e=ii(e,r,2),e!==null&&(da(e,2),xn(e))}function Ue(e,r,s){if(e.tag===3)mg(e,e,s);else for(;r!==null;){if(r.tag===3){mg(r,e,s);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(di===null||!di.has(o))){e=Xt(s,e),s=bm(2),o=ii(r,s,2),o!==null&&(xm(s,o,r,e),da(o,2),xn(o));break}}r=r.return}}function Kc(e,r,s){var o=e.pingCache;if(o===null){o=e.pingCache=new pw;var c=new Set;o.set(r,c)}else c=o.get(r),c===void 0&&(c=new Set,o.set(r,c));c.has(s)||(Oc=!0,c.add(s),e=bw.bind(null,e,r,s),r.then(e,e))}function bw(e,r,s){var o=e.pingCache;o!==null&&o.delete(r),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,qe===e&&(Ne&s)===s&&(Qe===4||Qe===3&&(Ne&62914560)===Ne&&300>mn()-Mc?(Ce&2)===0&&Ur(e,0):jc|=s,Mr===Ne&&(Mr=0)),xn(e)}function gg(e,r){r===0&&(r=dh()),e=br(e,r),e!==null&&(da(e,r),xn(e))}function xw(e){var r=e.memoizedState,s=0;r!==null&&(s=r.retryLane),gg(e,s)}function Sw(e,r){var s=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),gg(e,s)}function ww(e,r){return eu(e,r)}var Bl=null,_r=null,Vc=!1,_l=!1,Hc=!1,Ji=0;function xn(e){e!==_r&&e.next===null&&(_r===null?Bl=_r=e:_r=_r.next=e),_l=!0,Vc||(Vc=!0,kw())}function Qa(e,r){if(!Hc&&_l){Hc=!0;do for(var s=!1,o=Bl;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var h=0;else{var y=o.suspendedLanes,x=o.pingedLanes;h=(1<<31-_t(42|e)+1)-1,h&=c&~(y&~x),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,xg(o,h))}else h=Ne,h=Js(o,o===qe?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||fa(o,h)||(s=!0,xg(o,h));o=o.next}while(s);Hc=!1}}function Nw(){yg()}function yg(){_l=Vc=!1;var e=0;Ji!==0&&(jw()&&(e=Ji),Ji=0);for(var r=mn(),s=null,o=Bl;o!==null;){var c=o.next,h=vg(o,r);h===0?(o.next=null,s===null?Bl=c:s.next=c,c===null&&(_r=s)):(s=o,(e!==0||(h&3)!==0)&&(_l=!0)),o=c}Qa(e)}function vg(e,r){for(var s=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-_t(h),x=1<<y,R=c[y];R===-1?((x&s)===0||(x&o)!==0)&&(c[y]=QS(x,r)):R<=r&&(e.expiredLanes|=x),h&=~x}if(r=qe,s=Ne,s=Js(e,e===r?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,s===0||e===r&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&tu(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||fa(e,s)){if(r=s&-s,r===e.callbackPriority)return r;switch(o!==null&&tu(o),ru(s)){case 2:case 8:s=uh;break;case 32:s=Vs;break;case 268435456:s=ch;break;default:s=Vs}return o=bg.bind(null,e),s=eu(s,o),e.callbackPriority=r,e.callbackNode=s,r}return o!==null&&o!==null&&tu(o),e.callbackPriority=2,e.callbackNode=null,2}function bg(e,r){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Ul()&&e.callbackNode!==s)return null;var o=Ne;return o=Js(e,e===qe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(tg(e,o,r),vg(e,mn()),e.callbackNode!=null&&e.callbackNode===s?bg.bind(null,e):null)}function xg(e,r){if(Ul())return null;tg(e,r,!0)}function kw(){Mw(function(){(Ce&6)!==0?eu(oh,Nw):yg()})}function Gc(){return Ji===0&&(Ji=fh()),Ji}function Sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fs(""+e)}function wg(e,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,e.id&&s.setAttribute("form",e.id),r.parentNode.insertBefore(s,r),e=new FormData(e),s.parentNode.removeChild(s),e}function Rw(e,r,s,o,c){if(r==="submit"&&s&&s.stateNode===c){var h=Sg((c[Tt]||null).action),y=o.submitter;y&&(r=(r=y[Tt]||null)?Sg(r.formAction):y.getAttribute("formAction"),r!==null&&(h=r,y=null));var x=new el("action","action",null,o,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ji!==0){var R=y?wg(c,y):new FormData(c);cc(s,{pending:!0,data:R,method:c.method,action:h},null,R)}}else typeof h=="function"&&(x.preventDefault(),R=y?wg(c,y):new FormData(c),cc(s,{pending:!0,data:R,method:c.method,action:h},h,R))},currentTarget:c}]})}}for(var Jc=0;Jc<Cu.length;Jc++){var Yc=Cu[Jc],Ew=Yc.toLowerCase(),Aw=Yc[0].toUpperCase()+Yc.slice(1);on(Ew,"on"+Aw)}on(tp,"onAnimationEnd"),on(np,"onAnimationIteration"),on(ip,"onAnimationStart"),on("dblclick","onDoubleClick"),on("focusin","onFocus"),on("focusout","onBlur"),on(G1,"onTransitionRun"),on(J1,"onTransitionStart"),on(Y1,"onTransitionCancel"),on(rp,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fa="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(" "),$w=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fa));function Ng(e,r){r=(r&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],c=o.event;o=o.listeners;e:{var h=void 0;if(r)for(var y=o.length-1;0<=y;y--){var x=o[y],R=x.instance,j=x.currentTarget;if(x=x.listener,R!==h&&c.isPropagationStopped())break e;h=x,c.currentTarget=j;try{h(c)}catch(q){El(q)}c.currentTarget=null,h=R}else for(y=0;y<o.length;y++){if(x=o[y],R=x.instance,j=x.currentTarget,x=x.listener,R!==h&&c.isPropagationStopped())break e;h=x,c.currentTarget=j;try{h(c)}catch(q){El(q)}c.currentTarget=null,h=R}}}}function be(e,r){var s=r[au];s===void 0&&(s=r[au]=new Set);var o=e+"__bubble";s.has(o)||(kg(r,e,2,!1),s.add(o))}function Ic(e,r,s){var o=0;r&&(o|=4),kg(s,e,o,r)}var ql="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[ql]){e[ql]=!0,yh.forEach(function(s){s!=="selectionchange"&&($w.has(s)||Ic(s,!1,e),Ic(s,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[ql]||(r[ql]=!0,Ic("selectionchange",!1,r))}}function kg(e,r,s,o){switch(Zg(r)){case 2:var c=tN;break;case 8:c=nN;break;default:c=uf}s=c.bind(null,r,s,e),c=void 0,!gu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(r,s,{capture:!0,passive:c}):e.addEventListener(r,s,!0):c!==void 0?e.addEventListener(r,s,{passive:c}):e.addEventListener(r,s,!1)}function Qc(e,r,s,o,c){var h=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var x=o.stateNode.containerInfo;if(x===c)break;if(y===4)for(y=o.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;x!==null;){if(y=sr(x),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){o=h=y;continue e}x=x.parentNode}}o=o.return}Oh(function(){var j=h,q=pu(s),H=[];e:{var D=ap.get(e);if(D!==void 0){var L=el,ue=e;switch(e){case"keypress":if(Ps(s)===0)break e;case"keydown":case"keyup":L=w1;break;case"focusin":ue="focus",L=xu;break;case"focusout":ue="blur",L=xu;break;case"beforeblur":case"afterblur":L=xu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Mh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=c1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=R1;break;case tp:case np:case ip:L=h1;break;case rp:L=A1;break;case"scroll":case"scrollend":L=o1;break;case"wheel":L=C1;break;case"copy":case"cut":case"paste":L=m1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=zh;break;case"toggle":case"beforetoggle":L=O1}var ae=(r&4)!==0,Le=!ae&&(e==="scroll"||e==="scrollend"),C=ae?D!==null?D+"Capture":null:D;ae=[];for(var $=j,O;$!==null;){var K=$;if(O=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||O===null||C===null||(K=ma($,C),K!=null&&ae.push(Xa($,K,O))),Le)break;$=$.return}0<ae.length&&(D=new L(D,ue,null,s,q),H.push({event:D,listeners:ae}))}}if((r&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",D&&s!==hu&&(ue=s.relatedTarget||s.fromElement)&&(sr(ue)||ue[ar]))break e;if((L||D)&&(D=q.window===q?q:(D=q.ownerDocument)?D.defaultView||D.parentWindow:window,L?(ue=s.relatedTarget||s.toElement,L=j,ue=ue?sr(ue):null,ue!==null&&(Le=u(ue),ae=ue.tag,ue!==Le||ae!==5&&ae!==27&&ae!==6)&&(ue=null)):(L=null,ue=j),L!==ue)){if(ae=Mh,K="onMouseLeave",C="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ae=zh,K="onPointerLeave",C="onPointerEnter",$="pointer"),Le=L==null?D:pa(L),O=ue==null?D:pa(ue),D=new ae(K,$+"leave",L,s,q),D.target=Le,D.relatedTarget=O,K=null,sr(q)===j&&(ae=new ae(C,$+"enter",ue,s,q),ae.target=O,ae.relatedTarget=Le,K=ae),Le=K,L&&ue)t:{for(ae=L,C=ue,$=0,O=ae;O;O=qr(O))$++;for(O=0,K=C;K;K=qr(K))O++;for(;0<$-O;)ae=qr(ae),$--;for(;0<O-$;)C=qr(C),O--;for(;$--;){if(ae===C||C!==null&&ae===C.alternate)break t;ae=qr(ae),C=qr(C)}ae=null}else ae=null;L!==null&&Rg(H,D,L,ae,!1),ue!==null&&Le!==null&&Rg(H,Le,ue,ae,!0)}}e:{if(D=j?pa(j):window,L=D.nodeName&&D.nodeName.toLowerCase(),L==="select"||L==="input"&&D.type==="file")var P=Gh;else if(Vh(D))if(Jh)P=K1;else{P=_1;var ye=B1}else L=D.nodeName,!L||L.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?j&&du(j.elementType)&&(P=Gh):P=q1;if(P&&(P=P(e,j))){Hh(H,P,s,q);break e}ye&&ye(e,D,j),e==="focusout"&&j&&D.type==="number"&&j.memoizedProps.value!=null&&fu(D,"number",D.value)}switch(ye=j?pa(j):window,e){case"focusin":(Vh(ye)||ye.contentEditable==="true")&&(gr=ye,Eu=j,Na=null);break;case"focusout":Na=Eu=gr=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,Wh(H,s,q);break;case"selectionchange":if(H1)break;case"keydown":case"keyup":Wh(H,s,q)}var te;if(wu)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else mr?qh(e,s)&&(se="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(se="onCompositionStart");se&&(Uh&&s.locale!=="ko"&&(mr||se!=="onCompositionStart"?se==="onCompositionEnd"&&mr&&(te=jh()):(Wn=q,yu="value"in Wn?Wn.value:Wn.textContent,mr=!0)),ye=Kl(j,se),0<ye.length&&(se=new Lh(se,e,null,s,q),H.push({event:se,listeners:ye}),te?se.data=te:(te=Kh(s),te!==null&&(se.data=te)))),(te=D1?M1(e,s):L1(e,s))&&(se=Kl(j,"onBeforeInput"),0<se.length&&(ye=new Lh("onBeforeInput","beforeinput",null,s,q),H.push({event:ye,listeners:se}),ye.data=te)),Rw(H,e,j,s,q)}Ng(H,r)})}function Xa(e,r,s){return{instance:e,listener:r,currentTarget:s}}function Kl(e,r){for(var s=r+"Capture",o=[];e!==null;){var c=e,h=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||h===null||(c=ma(e,s),c!=null&&o.unshift(Xa(e,c,h)),c=ma(e,r),c!=null&&o.push(Xa(e,c,h))),e.tag===3)return o;e=e.return}return[]}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,r,s,o,c){for(var h=r._reactName,y=[];s!==null&&s!==o;){var x=s,R=x.alternate,j=x.stateNode;if(x=x.tag,R!==null&&R===o)break;x!==5&&x!==26&&x!==27||j===null||(R=j,c?(j=ma(s,h),j!=null&&y.unshift(Xa(s,j,R))):c||(j=ma(s,h),j!=null&&y.push(Xa(s,j,R)))),s=s.return}y.length!==0&&e.push({event:r,listeners:y})}var Cw=/\r\n?/g,Tw=/\u0000|\uFFFD/g;function Eg(e){return(typeof e=="string"?e:""+e).replace(Cw,`
59
- `).replace(Tw,"")}function Ag(e,r){return r=Eg(r),Eg(e)===r}function Vl(){}function Me(e,r,s,o,c,h){switch(s){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||dr(e,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&dr(e,""+o);break;case"className":Is(e,"class",o);break;case"tabIndex":Is(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Is(e,s,o);break;case"style":Ch(e,o,h);break;case"data":if(r!=="object"){Is(e,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||s!=="href")){e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Fs(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(s,"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 h=="function"&&(s==="formAction"?(r!=="input"&&Me(e,r,"name",c.name,c,null),Me(e,r,"formEncType",c.formEncType,c,null),Me(e,r,"formMethod",c.formMethod,c,null),Me(e,r,"formTarget",c.formTarget,c,null)):(Me(e,r,"encType",c.encType,c,null),Me(e,r,"method",c.method,c,null),Me(e,r,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Fs(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(e.onclick=Vl);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(c.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}s=Fs(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""+o):e.removeAttribute(s);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,o):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(s,o):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):e.setAttribute(s,o);break;case"popover":be("beforetoggle",e),be("toggle",e),Ys(e,"popover",o);break;case"xlinkActuate":Rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ys(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=s1.get(s)||s,Ys(e,s,o))}}function Fc(e,r,s,o,c,h){switch(s){case"style":Ch(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(c.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"children":typeof o=="string"?dr(e,o):(typeof o=="number"||typeof o=="bigint")&&dr(e,""+o);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Vl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),r=s.slice(2,c?s.length-7:void 0),h=e[Tt]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(r,h,c),typeof o=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(r,o,c);break e}s in e?e[s]=o:o===!0?e.setAttribute(s,""):Ys(e,s,o)}}}function vt(e,r,s){switch(r){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 o=!1,c=!1,h;for(h in s)if(s.hasOwnProperty(h)){var y=s[h];if(y!=null)switch(h){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(e,r,h,y,s,null)}}c&&Me(e,r,"srcSet",s.srcSet,s,null),o&&Me(e,r,"src",s.src,s,null);return;case"input":be("invalid",e);var x=h=y=c=null,R=null,j=null;for(o in s)if(s.hasOwnProperty(o)){var q=s[o];if(q!=null)switch(o){case"name":c=q;break;case"type":y=q;break;case"checked":R=q;break;case"defaultChecked":j=q;break;case"value":h=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:Me(e,r,o,q,s,null)}}Rh(e,h,x,R,j,y,c,!1),Zs(e);return;case"select":be("invalid",e),o=y=h=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":h=x;break;case"defaultValue":y=x;break;case"multiple":o=x;default:Me(e,r,c,x,s,null)}r=h,s=y,e.multiple=!!o,r!=null?fr(e,!!o,r,!1):s!=null&&fr(e,!!o,s,!0);return;case"textarea":be("invalid",e),h=c=o=null;for(y in s)if(s.hasOwnProperty(y)&&(x=s[y],x!=null))switch(y){case"value":o=x;break;case"defaultValue":c=x;break;case"children":h=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(a(91));break;default:Me(e,r,y,x,s,null)}Ah(e,o,c,h),Zs(e);return;case"option":for(R in s)if(s.hasOwnProperty(R)&&(o=s[R],o!=null))switch(R){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Me(e,r,R,o,s,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(o=0;o<Fa.length;o++)be(Fa[o],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(j in s)if(s.hasOwnProperty(j)&&(o=s[j],o!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(e,r,j,o,s,null)}return;default:if(du(r)){for(q in s)s.hasOwnProperty(q)&&(o=s[q],o!==void 0&&Fc(e,r,q,o,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(o=s[x],o!=null&&Me(e,r,x,o,s,null))}function Ow(e,r,s,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,h=null,y=null,x=null,R=null,j=null,q=null;for(L in s){var H=s[L];if(s.hasOwnProperty(L)&&H!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":R=H;default:o.hasOwnProperty(L)||Me(e,r,L,null,o,H)}}for(var D in o){var L=o[D];if(H=s[D],o.hasOwnProperty(D)&&(L!=null||H!=null))switch(D){case"type":h=L;break;case"name":c=L;break;case"checked":j=L;break;case"defaultChecked":q=L;break;case"value":y=L;break;case"defaultValue":x=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(137,r));break;default:L!==H&&Me(e,r,D,L,o,H)}}cu(e,y,x,R,j,q,h,c);return;case"select":L=y=x=D=null;for(h in s)if(R=s[h],s.hasOwnProperty(h)&&R!=null)switch(h){case"value":break;case"multiple":L=R;default:o.hasOwnProperty(h)||Me(e,r,h,null,o,R)}for(c in o)if(h=o[c],R=s[c],o.hasOwnProperty(c)&&(h!=null||R!=null))switch(c){case"value":D=h;break;case"defaultValue":x=h;break;case"multiple":y=h;default:h!==R&&Me(e,r,c,h,o,R)}r=x,s=y,o=L,D!=null?fr(e,!!s,D,!1):!!o!=!!s&&(r!=null?fr(e,!!s,r,!0):fr(e,!!s,s?[]:"",!1));return;case"textarea":L=D=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!o.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Me(e,r,x,null,o,c)}for(y in o)if(c=o[y],h=s[y],o.hasOwnProperty(y)&&(c!=null||h!=null))switch(y){case"value":D=c;break;case"defaultValue":L=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(a(91));break;default:c!==h&&Me(e,r,y,c,o,h)}Eh(e,D,L);return;case"option":for(var ue in s)if(D=s[ue],s.hasOwnProperty(ue)&&D!=null&&!o.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Me(e,r,ue,null,o,D)}for(R in o)if(D=o[R],L=s[R],o.hasOwnProperty(R)&&D!==L&&(D!=null||L!=null))switch(R){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Me(e,r,R,D,o,L)}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 ae in s)D=s[ae],s.hasOwnProperty(ae)&&D!=null&&!o.hasOwnProperty(ae)&&Me(e,r,ae,null,o,D);for(j in o)if(D=o[j],L=s[j],o.hasOwnProperty(j)&&D!==L&&(D!=null||L!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(137,r));break;default:Me(e,r,j,D,o,L)}return;default:if(du(r)){for(var Le in s)D=s[Le],s.hasOwnProperty(Le)&&D!==void 0&&!o.hasOwnProperty(Le)&&Fc(e,r,Le,void 0,o,D);for(q in o)D=o[q],L=s[q],!o.hasOwnProperty(q)||D===L||D===void 0&&L===void 0||Fc(e,r,q,D,o,L);return}}for(var C in s)D=s[C],s.hasOwnProperty(C)&&D!=null&&!o.hasOwnProperty(C)&&Me(e,r,C,null,o,D);for(H in o)D=o[H],L=s[H],!o.hasOwnProperty(H)||D===L||D==null&&L==null||Me(e,r,H,D,o,L)}var Xc=null,Pc=null;function Hl(e){return e.nodeType===9?e:e.ownerDocument}function $g(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 Cg(e,r){if(e===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&r==="foreignObject"?0:e}function Wc(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ef=null;function jw(){var e=window.event;return e&&e.type==="popstate"?e===ef?!1:(ef=e,!0):(ef=null,!1)}var Tg=typeof setTimeout=="function"?setTimeout:void 0,Dw=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,Mw=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(Lw)}:Tg;function Lw(e){setTimeout(function(){throw e})}function mi(e){return e==="head"}function jg(e,r){var s=r,o=0,c=0;do{var h=s.nextSibling;if(e.removeChild(s),h&&h.nodeType===8)if(s=h.data,s==="/$"){if(0<o&&8>o){s=o;var y=e.ownerDocument;if(s&1&&Pa(y.documentElement),s&2&&Pa(y.body),s&4)for(s=y.head,Pa(s),y=s.firstChild;y;){var x=y.nextSibling,R=y.nodeName;y[ha]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=x}}if(c===0){e.removeChild(h),ss(r);return}c--}else s==="$"||s==="$?"||s==="$!"?c++:o=s.charCodeAt(0)-48;else o=0;s=h}while(s);ss(r)}function tf(e){var r=e.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":tf(s),su(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function zw(e,r,s,o){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ha])switch(r){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(r==="input"&&e.type==="hidden"){var h=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=cn(e.nextSibling),e===null)break}return null}function Uw(e,r,s){if(r==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=cn(e.nextSibling),e===null))return null;return e}function nf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Bw(e,r){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")r();else{var o=function(){r(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function cn(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return e}var rf=null;function Dg(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return e;r--}else s==="/$"&&r++}e=e.previousSibling}return null}function Mg(e,r,s){switch(r=Hl(s),e){case"html":if(e=r.documentElement,!e)throw Error(a(452));return e;case"head":if(e=r.head,!e)throw Error(a(453));return e;case"body":if(e=r.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Pa(e){for(var r=e.attributes;r.length;)e.removeAttributeNode(r[0]);su(e)}var rn=new Map,Lg=new Set;function Gl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _n=Y.d;Y.d={f:_w,r:qw,D:Kw,C:Vw,L:Hw,m:Gw,X:Yw,S:Jw,M:Iw};function _w(){var e=_n.f(),r=Ll();return e||r}function qw(e){var r=lr(e);r!==null&&r.tag===5&&r.type==="form"?tm(r):_n.r(e)}var Kr=typeof document>"u"?null:document;function zg(e,r,s){var o=Kr;if(o&&typeof r=="string"&&r){var c=Ft(r);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Lg.has(c)||(Lg.add(c),e={rel:e,crossOrigin:s,href:r},o.querySelector(c)===null&&(r=o.createElement("link"),vt(r,"link",e),ct(r),o.head.appendChild(r)))}}function Kw(e){_n.D(e),zg("dns-prefetch",e,null)}function Vw(e,r){_n.C(e,r),zg("preconnect",e,r)}function Hw(e,r,s){_n.L(e,r,s);var o=Kr;if(o&&e&&r){var c='link[rel="preload"][as="'+Ft(r)+'"]';r==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+Ft(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+Ft(s.imageSizes)+'"]')):c+='[href="'+Ft(e)+'"]';var h=c;switch(r){case"style":h=Vr(e);break;case"script":h=Hr(e)}rn.has(h)||(e=g({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:e,as:r},s),rn.set(h,e),o.querySelector(c)!==null||r==="style"&&o.querySelector(Wa(h))||r==="script"&&o.querySelector(es(h))||(r=o.createElement("link"),vt(r,"link",e),ct(r),o.head.appendChild(r)))}}function Gw(e,r){_n.m(e,r);var s=Kr;if(s&&e){var o=r&&typeof r.as=="string"?r.as:"script",c='link[rel="modulepreload"][as="'+Ft(o)+'"][href="'+Ft(e)+'"]',h=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Hr(e)}if(!rn.has(h)&&(e=g({rel:"modulepreload",href:e},r),rn.set(h,e),s.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(es(h)))return}o=s.createElement("link"),vt(o,"link",e),ct(o),s.head.appendChild(o)}}}function Jw(e,r,s){_n.S(e,r,s);var o=Kr;if(o&&e){var c=or(o).hoistableStyles,h=Vr(e);r=r||"default";var y=c.get(h);if(!y){var x={loading:0,preload:null};if(y=o.querySelector(Wa(h)))x.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":r},s),(s=rn.get(h))&&af(e,s);var R=y=o.createElement("link");ct(R),vt(R,"link",e),R._p=new Promise(function(j,q){R.onload=j,R.onerror=q}),R.addEventListener("load",function(){x.loading|=1}),R.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Jl(y,r,o)}y={type:"stylesheet",instance:y,count:1,state:x},c.set(h,y)}}}function Yw(e,r){_n.X(e,r);var s=Kr;if(s&&e){var o=or(s).hoistableScripts,c=Hr(e),h=o.get(c);h||(h=s.querySelector(es(c)),h||(e=g({src:e,async:!0},r),(r=rn.get(c))&&sf(e,r),h=s.createElement("script"),ct(h),vt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Iw(e,r){_n.M(e,r);var s=Kr;if(s&&e){var o=or(s).hoistableScripts,c=Hr(e),h=o.get(c);h||(h=s.querySelector(es(c)),h||(e=g({src:e,async:!0,type:"module"},r),(r=rn.get(c))&&sf(e,r),h=s.createElement("script"),ct(h),vt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Ug(e,r,s,o){var c=(c=pe.current)?Gl(c):null;if(!c)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Vr(s.href),s=or(c).hoistableStyles,o=s.get(r),o||(o={type:"style",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Vr(s.href);var h=or(c).hoistableStyles,y=h.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=c.querySelector(Wa(e)))&&!h._p&&(y.instance=h,y.state.loading=5),rn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},rn.set(e,s),h||Zw(c,e,s,y.state))),r&&o===null)throw Error(a(528,""));return y}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Hr(s),s=or(c).hoistableScripts,o=s.get(r),o||(o={type:"script",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Vr(e){return'href="'+Ft(e)+'"'}function Wa(e){return'link[rel="stylesheet"]['+e+"]"}function Bg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Zw(e,r,s,o){e.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=e.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),vt(r,"link",s),ct(r),e.head.appendChild(r))}function Hr(e){return'[src="'+Ft(e)+'"]'}function es(e){return"script[async]"+e}function _g(e,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var o=e.querySelector('style[data-href~="'+Ft(s.href)+'"]');if(o)return r.instance=o,ct(o),o;var c=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ct(o),vt(o,"style",c),Jl(o,s.precedence,e),r.instance=o;case"stylesheet":c=Vr(s.href);var h=e.querySelector(Wa(c));if(h)return r.state.loading|=4,r.instance=h,ct(h),h;o=Bg(s),(c=rn.get(c))&&af(o,c),h=(e.ownerDocument||e).createElement("link"),ct(h);var y=h;return y._p=new Promise(function(x,R){y.onload=x,y.onerror=R}),vt(h,"link",o),r.state.loading|=4,Jl(h,s.precedence,e),r.instance=h;case"script":return h=Hr(s.src),(c=e.querySelector(es(h)))?(r.instance=c,ct(c),c):(o=s,(c=rn.get(h))&&(o=g({},s),sf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),ct(c),vt(c,"link",o),e.head.appendChild(c),r.instance=c);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,Jl(o,s.precedence,e));return r.instance}function Jl(e,r,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,h=c,y=0;y<o.length;y++){var x=o[y];if(x.dataset.precedence===r)h=x;else if(h!==c)break}h?h.parentNode.insertBefore(e,h.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(e,r.firstChild))}function af(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.title==null&&(e.title=r.title)}function sf(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.integrity==null&&(e.integrity=r.integrity)}var Yl=null;function qg(e,r,s){if(Yl===null){var o=new Map,c=Yl=new Map;c.set(s,o)}else c=Yl,o=c.get(s),o||(o=new Map,c.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var h=s[c];if(!(h[ha]||h[xt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(r)||"";y=e+y;var x=o.get(y);x?x.push(h):o.set(y,[h])}}return o}function Kg(e,r,s){e=e.ownerDocument||e,e.head.insertBefore(s,r==="title"?e.querySelector("head > title"):null)}function Qw(e,r,s){if(s===1||r.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return e=r.disabled,typeof r.precedence=="string"&&e==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Vg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ts=null;function Fw(){}function Xw(e,r,s){if(ts===null)throw Error(a(475));var o=ts;if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var c=Vr(s.href),h=e.querySelector(Wa(c));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Il.bind(o),e.then(o,o)),r.state.loading|=4,r.instance=h,ct(h);return}h=e.ownerDocument||e,s=Bg(s),(c=rn.get(c))&&af(s,c),h=h.createElement("link"),ct(h);var y=h;y._p=new Promise(function(x,R){y.onload=x,y.onerror=R}),vt(h,"link",s),r.instance=h}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(r,e),(e=r.state.preload)&&(r.state.loading&3)===0&&(o.count++,r=Il.bind(o),e.addEventListener("load",r),e.addEventListener("error",r))}}function Pw(){if(ts===null)throw Error(a(475));var e=ts;return e.stylesheets&&e.count===0&&lf(e,e.stylesheets),0<e.count?function(r){var s=setTimeout(function(){if(e.stylesheets&&lf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s)}}:null}function Il(){if(this.count--,this.count===0){if(this.stylesheets)lf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zl=null;function lf(e,r){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zl=new Map,r.forEach(Ww,e),Zl=null,Il.call(e))}function Ww(e,r){if(!(r.state.loading&4)){var s=Zl.get(e);if(s)var o=s.get(null);else{s=new Map,Zl.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<c.length;h++){var y=c[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),o=y)}o&&s.set(null,o)}c=r.instance,y=c.getAttribute("data-precedence"),h=s.get(y)||o,h===o&&s.set(null,c),s.set(y,c),this.count++,o=Il.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),h?h.parentNode.insertBefore(c,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),r.state.loading|=4}}var ns={$$typeof:G,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function eN(e,r,s,o,c,h,y,x){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=nu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.hiddenUpdates=nu(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Hg(e,r,s,o,c,h,y,x,R,j,q,H){return e=new eN(e,r,s,y,x,R,j,H),r=1,h===!0&&(r|=24),h=Kt(3,null,null,r),e.current=h,h.stateNode=e,r=Ku(),r.refCount++,e.pooledCache=r,r.refCount++,h.memoizedState={element:o,isDehydrated:s,cache:r},Ju(h),e}function Gg(e){return e?(e=xr,e):xr}function Jg(e,r,s,o,c,h){c=Gg(c),o.context===null?o.context=c:o.pendingContext=c,o=ni(r),o.payload={element:s},h=h===void 0?null:h,h!==null&&(o.callback=h),s=ii(e,o,r),s!==null&&(Yt(s,e,r),ja(s,e,r))}function Yg(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<r?s:r}}function of(e,r){Yg(e,r),(e=e.alternate)&&Yg(e,r)}function Ig(e){if(e.tag===13){var r=br(e,67108864);r!==null&&Yt(r,e,67108864),of(e,67108864)}}var Ql=!0;function tN(e,r,s,o){var c=B.T;B.T=null;var h=Y.p;try{Y.p=2,uf(e,r,s,o)}finally{Y.p=h,B.T=c}}function nN(e,r,s,o){var c=B.T;B.T=null;var h=Y.p;try{Y.p=8,uf(e,r,s,o)}finally{Y.p=h,B.T=c}}function uf(e,r,s,o){if(Ql){var c=cf(o);if(c===null)Qc(e,r,o,Fl,s),Qg(e,o);else if(rN(c,e,r,s,o))o.stopPropagation();else if(Qg(e,o),r&4&&-1<iN.indexOf(e)){for(;c!==null;){var h=lr(c);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=$i(h.pendingLanes);if(y!==0){var x=h;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var R=1<<31-_t(y);x.entanglements[1]|=R,y&=~R}xn(h),(Ce&6)===0&&(Dl=mn()+500,Qa(0))}}break;case 13:x=br(h,2),x!==null&&Yt(x,h,2),Ll(),of(h,2)}if(h=cf(o),h===null&&Qc(e,r,o,Fl,s),h===c)break;c=h}c!==null&&o.stopPropagation()}else Qc(e,r,o,null,s)}}function cf(e){return e=pu(e),ff(e)}var Fl=null;function ff(e){if(Fl=null,e=sr(e),e!==null){var r=u(e);if(r===null)e=null;else{var s=r.tag;if(s===13){if(e=f(r),e!==null)return e;e=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null)}}return Fl=e,null}function Zg(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(VS()){case oh:return 2;case uh:return 8;case Vs:case HS:return 32;case ch:return 268435456;default:return 32}default:return 32}}var df=!1,gi=null,yi=null,vi=null,is=new Map,rs=new Map,bi=[],iN="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 Qg(e,r){switch(e){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":is.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":rs.delete(r.pointerId)}}function as(e,r,s,o,c,h){return e===null||e.nativeEvent!==h?(e={blockedOn:r,domEventName:s,eventSystemFlags:o,nativeEvent:h,targetContainers:[c]},r!==null&&(r=lr(r),r!==null&&Ig(r)),e):(e.eventSystemFlags|=o,r=e.targetContainers,c!==null&&r.indexOf(c)===-1&&r.push(c),e)}function rN(e,r,s,o,c){switch(r){case"focusin":return gi=as(gi,e,r,s,o,c),!0;case"dragenter":return yi=as(yi,e,r,s,o,c),!0;case"mouseover":return vi=as(vi,e,r,s,o,c),!0;case"pointerover":var h=c.pointerId;return is.set(h,as(is.get(h)||null,e,r,s,o,c)),!0;case"gotpointercapture":return h=c.pointerId,rs.set(h,as(rs.get(h)||null,e,r,s,o,c)),!0}return!1}function Fg(e){var r=sr(e.target);if(r!==null){var s=u(r);if(s!==null){if(r=s.tag,r===13){if(r=f(s),r!==null){e.blockedOn=r,XS(e.priority,function(){if(s.tag===13){var o=Jt();o=iu(o);var c=br(s,o);c!==null&&Yt(c,s,o),of(s,o)}});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xl(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var s=cf(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);hu=o,s.target.dispatchEvent(o),hu=null}else return r=lr(s),r!==null&&Ig(r),e.blockedOn=s,!1;r.shift()}return!0}function Xg(e,r,s){Xl(e)&&s.delete(r)}function aN(){df=!1,gi!==null&&Xl(gi)&&(gi=null),yi!==null&&Xl(yi)&&(yi=null),vi!==null&&Xl(vi)&&(vi=null),is.forEach(Xg),rs.forEach(Xg)}function Pl(e,r){e.blockedOn===r&&(e.blockedOn=null,df||(df=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aN)))}var Wl=null;function Pg(e){Wl!==e&&(Wl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wl===e&&(Wl=null);for(var r=0;r<e.length;r+=3){var s=e[r],o=e[r+1],c=e[r+2];if(typeof o!="function"){if(ff(o||s)===null)continue;break}var h=lr(s);h!==null&&(e.splice(r,3),r-=3,cc(h,{pending:!0,data:c,method:s.method,action:o},o,c))}}))}function ss(e){function r(R){return Pl(R,e)}gi!==null&&Pl(gi,e),yi!==null&&Pl(yi,e),vi!==null&&Pl(vi,e),is.forEach(r),rs.forEach(r);for(var s=0;s<bi.length;s++){var o=bi[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<bi.length&&(s=bi[0],s.blockedOn===null);)Fg(s),s.blockedOn===null&&bi.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var c=s[o],h=s[o+1],y=c[Tt]||null;if(typeof h=="function")y||Pg(s);else if(y){var x=null;if(h&&h.hasAttribute("formAction")){if(c=h,y=h[Tt]||null)x=y.formAction;else if(ff(c)!==null)continue}else x=y.action;typeof x=="function"?s[o+1]=x:(s.splice(o,3),o-=3),Pg(s)}}}function hf(e){this._internalRoot=e}eo.prototype.render=hf.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(a(409));var s=r.current,o=Jt();Jg(s,o,e,r,null,null)},eo.prototype.unmount=hf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;Jg(e.current,2,null,e,null,null),Ll(),r[ar]=null}};function eo(e){this._internalRoot=e}eo.prototype.unstable_scheduleHydration=function(e){if(e){var r=mh();e={blockedOn:null,target:e,priority:r};for(var s=0;s<bi.length&&r!==0&&r<bi[s].priority;s++);bi.splice(s,0,e),s===0&&Fg(e)}};var Wg=n.version;if(Wg!=="19.1.0")throw Error(a(527,Wg,"19.1.0"));Y.findDOMNode=function(e){var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=m(r),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var sN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var to=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!to.isDisabled&&to.supportsFiber)try{ca=to.inject(sN),Bt=to}catch{}}return us.createRoot=function(e,r){if(!l(e))throw Error(a(299));var s=!1,o="",c=mm,h=gm,y=ym,x=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(c=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(y=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(x=r.unstable_transitionCallbacks)),r=Hg(e,1,!1,null,null,s,o,c,h,y,x,null),e[ar]=r.current,Zc(e),new hf(r)},us.hydrateRoot=function(e,r,s){if(!l(e))throw Error(a(299));var o=!1,c="",h=mm,y=gm,x=ym,R=null,j=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(R=s.unstable_transitionCallbacks),s.formState!==void 0&&(j=s.formState)),r=Hg(e,1,!0,r,s??null,o,c,h,y,x,R,j),r.context=Gg(null),s=r.current,o=Jt(),o=iu(o),c=ni(o),c.callback=null,ii(s,c,o),s=o,r.current.lanes=s,da(r,s),xn(r),e[ar]=r.current,Zc(e),new eo(r)},us.version="19.1.0",us}var Ry;function vE(){if(Ry)return yf.exports;Ry=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),yf.exports=yE(),yf.exports}var bE=vE();const xE=Zv(bE),eb=A.createContext(void 0);eb.Provider;function tb(t,n){const i=A.useContext(eb),a=A.useRef(void 0);A.useEffect(()=>{let l,u;a.current?u=a.current.then(f):u=f(),a.current=u;function f(){return t().then(d=>(l=d??(()=>{}),d),i?d=>i.error(d):void 0)}return()=>{if(l){const d=l();i&&(d==null||d.catch(m=>i.error(m)))}else{const d=u.then(m=>m==null?void 0:m());i&&d.catch(m=>i.error(m))}}},n)}var cs={},Ey;function SE(){if(Ey)return cs;Ey=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.parse=f,cs.serialize=p;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,l=Object.prototype.toString,u=(()=>{const b=function(){};return b.prototype=Object.create(null),b})();function f(b,k){const N=new u,T=b.length;if(T<2)return N;const U=(k==null?void 0:k.decode)||g;let M=0;do{const z=b.indexOf("=",M);if(z===-1)break;const G=b.indexOf(";",M),X=G===-1?T:G;if(z>X){M=b.lastIndexOf(";",z-1)+1;continue}const F=d(b,M,z),he=m(b,z,F),fe=b.slice(F,he);if(N[fe]===void 0){let re=d(b,z+1,X),ee=m(b,X,re);const oe=U(b.slice(re,ee));N[fe]=oe}M=X+1}while(M<T);return N}function d(b,k,N){do{const T=b.charCodeAt(k);if(T!==32&&T!==9)return k}while(++k<N);return N}function m(b,k,N){for(;k>N;){const T=b.charCodeAt(--k);if(T!==32&&T!==9)return k+1}return N}function p(b,k,N){const T=(N==null?void 0:N.encode)||encodeURIComponent;if(!t.test(b))throw new TypeError(`argument name is invalid: ${b}`);const U=T(k);if(!n.test(U))throw new TypeError(`argument val is invalid: ${k}`);let M=b+"="+U;if(!N)return M;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);M+="; Max-Age="+N.maxAge}if(N.domain){if(!i.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);M+="; Domain="+N.domain}if(N.path){if(!a.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);M+="; Path="+N.path}if(N.expires){if(!v(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);M+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(M+="; HttpOnly"),N.secure&&(M+="; Secure"),N.partitioned&&(M+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":M+="; Priority=Low";break;case"medium":M+="; Priority=Medium";break;case"high":M+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":M+="; SameSite=Strict";break;case"lax":M+="; SameSite=Lax";break;case"none":M+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return M}function g(b){if(b.indexOf("%")===-1)return b;try{return decodeURIComponent(b)}catch{return b}}function v(b){return l.call(b)==="[object Date]"}return cs}SE();var Ay="popstate";function wE(t={}){function n(l,u){let{pathname:f="/",search:d="",hash:m=""}=Wi(l.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),Vf("",{pathname:f,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(l,u){let f=l.document.querySelector("base"),d="";if(f&&f.getAttribute("href")){let m=l.location.href,p=m.indexOf("#");d=p===-1?m:m.slice(0,p)}return d+"#"+(typeof u=="string"?u:Ss(u))}function a(l,u){sn(l.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return kE(n,i,a,t)}function Ye(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function sn(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function NE(){return Math.random().toString(36).substring(2,10)}function $y(t,n){return{usr:t.state,key:t.key,idx:n}}function Vf(t,n,i=null,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Wi(n):n,state:i,key:n&&n.key||a||NE()}}function Ss({pathname:t="/",search:n="",hash:i=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Wi(t){let n={};if(t){let i=t.indexOf("#");i>=0&&(n.hash=t.substring(i),t=t.substring(0,i));let a=t.indexOf("?");a>=0&&(n.search=t.substring(a),t=t.substring(0,a)),t&&(n.pathname=t)}return n}function kE(t,n,i,a={}){let{window:l=document.defaultView,v5Compat:u=!1}=a,f=l.history,d="POP",m=null,p=g();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function g(){return(f.state||{idx:null}).idx}function v(){d="POP";let U=g(),M=U==null?null:U-p;p=U,m&&m({action:d,location:T.location,delta:M})}function b(U,M){d="PUSH";let z=Vf(T.location,U,M);i&&i(z,U),p=g()+1;let G=$y(z,p),X=T.createHref(z);try{f.pushState(G,"",X)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;l.location.assign(X)}u&&m&&m({action:d,location:T.location,delta:1})}function k(U,M){d="REPLACE";let z=Vf(T.location,U,M);i&&i(z,U),p=g();let G=$y(z,p),X=T.createHref(z);f.replaceState(G,"",X),u&&m&&m({action:d,location:T.location,delta:0})}function N(U){return RE(U)}let T={get action(){return d},get location(){return t(l,f)},listen(U){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(Ay,v),m=U,()=>{l.removeEventListener(Ay,v),m=null}},createHref(U){return n(l,U)},createURL:N,encodeLocation(U){let M=N(U);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:b,replace:k,go(U){return f.go(U)}};return T}function RE(t,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(i,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ss(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function nb(t,n,i="/"){return EE(t,n,i,!1)}function EE(t,n,i,a){let l=typeof n=="string"?Wi(n):n,u=Gn(l.pathname||"/",i);if(u==null)return null;let f=ib(t);AE(f);let d=null;for(let m=0;d==null&&m<f.length;++m){let p=BE(u);d=zE(f[m],p,a)}return d}function ib(t,n=[],i=[],a=""){let l=(u,f,d)=>{let m={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};m.relativePath.startsWith("/")&&(Ye(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length));let p=Hn([a,m.relativePath]),g=i.concat(m);u.children&&u.children.length>0&&(Ye(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),ib(u.children,n,g,p)),!(u.path==null&&!u.index)&&n.push({path:p,score:ME(p,u.index),routesMeta:g})};return t.forEach((u,f)=>{var d;if(u.path===""||!((d=u.path)!=null&&d.includes("?")))l(u,f);else for(let m of rb(u.path))l(u,f,m)}),n}function rb(t){let n=t.split("/");if(n.length===0)return[];let[i,...a]=n,l=i.endsWith("?"),u=i.replace(/\?$/,"");if(a.length===0)return l?[u,""]:[u];let f=rb(a.join("/")),d=[];return d.push(...f.map(m=>m===""?u:[u,m].join("/"))),l&&d.push(...f),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function AE(t){t.sort((n,i)=>n.score!==i.score?i.score-n.score:LE(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var $E=/^:[\w-]+$/,CE=3,TE=2,OE=1,jE=10,DE=-2,Cy=t=>t==="*";function ME(t,n){let i=t.split("/"),a=i.length;return i.some(Cy)&&(a+=DE),n&&(a+=TE),i.filter(l=>!Cy(l)).reduce((l,u)=>l+($E.test(u)?CE:u===""?OE:jE),a)}function LE(t,n){return t.length===n.length&&t.slice(0,-1).every((a,l)=>a===n[l])?t[t.length-1]-n[n.length-1]:0}function zE(t,n,i=!1){let{routesMeta:a}=t,l={},u="/",f=[];for(let d=0;d<a.length;++d){let m=a[d],p=d===a.length-1,g=u==="/"?n:n.slice(u.length)||"/",v=wo({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},g),b=m.route;if(!v&&p&&i&&!a[a.length-1].route.index&&(v=wo({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!v)return null;Object.assign(l,v.params),f.push({params:l,pathname:Hn([u,v.pathname]),pathnameBase:VE(Hn([u,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(u=Hn([u,v.pathnameBase]))}return f}function wo(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=UE(t.path,t.caseSensitive,t.end),l=n.match(i);if(!l)return null;let u=l[0],f=u.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:a.reduce((p,{paramName:g,isOptional:v},b)=>{if(g==="*"){let N=d[b]||"";f=u.slice(0,u.length-N.length).replace(/(.)\/+$/,"$1")}const k=d[b];return v&&!k?p[g]=void 0:p[g]=(k||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:f,pattern:t}}function UE(t,n=!1,i=!0){sn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let a=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,m)=>(a.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(a.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),a]}function BE(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return sn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),t}}function Gn(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,a=t.charAt(i);return a&&a!=="/"?null:t.slice(i)||"/"}function _E(t,n="/"){let{pathname:i,search:a="",hash:l=""}=typeof t=="string"?Wi(t):t;return{pathname:i?i.startsWith("/")?i:qE(i,n):n,search:HE(a),hash:GE(l)}}function qE(t,n){let i=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function Sf(t,n,i,a){return`Cannot include a '${t}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function KE(t){return t.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function gd(t){let n=KE(t);return n.map((i,a)=>a===n.length-1?i.pathname:i.pathnameBase)}function yd(t,n,i,a=!1){let l;typeof t=="string"?l=Wi(t):(l={...t},Ye(!l.pathname||!l.pathname.includes("?"),Sf("?","pathname","search",l)),Ye(!l.pathname||!l.pathname.includes("#"),Sf("#","pathname","hash",l)),Ye(!l.search||!l.search.includes("#"),Sf("#","search","hash",l)));let u=t===""||l.pathname==="",f=u?"/":l.pathname,d;if(f==null)d=i;else{let v=n.length-1;if(!a&&f.startsWith("..")){let b=f.split("/");for(;b[0]==="..";)b.shift(),v-=1;l.pathname=b.join("/")}d=v>=0?n[v]:"/"}let m=_E(l,d),p=f&&f!=="/"&&f.endsWith("/"),g=(u||f===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(p||g)&&(m.pathname+="/"),m}var Hn=t=>t.join("/").replace(/\/\/+/g,"/"),VE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),HE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,GE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function JE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var ab=["POST","PUT","PATCH","DELETE"];new Set(ab);var YE=["GET",...ab];new Set(YE);var ia=A.createContext(null);ia.displayName="DataRouter";var Uo=A.createContext(null);Uo.displayName="DataRouterState";var sb=A.createContext({isTransitioning:!1});sb.displayName="ViewTransition";var IE=A.createContext(new Map);IE.displayName="Fetchers";var ZE=A.createContext(null);ZE.displayName="Await";var fn=A.createContext(null);fn.displayName="Navigation";var As=A.createContext(null);As.displayName="Location";var dn=A.createContext({outlet:null,matches:[],isDataRoute:!1});dn.displayName="Route";var vd=A.createContext(null);vd.displayName="RouteError";function QE(t,{relative:n}={}){Ye(ra(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=A.useContext(fn),{hash:l,pathname:u,search:f}=$s(t,{relative:n}),d=u;return i!=="/"&&(d=u==="/"?i:Hn([i,u])),a.createHref({pathname:d,search:f,hash:l})}function ra(){return A.useContext(As)!=null}function Ei(){return Ye(ra(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(As).location}var lb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ob(t){A.useContext(fn).static||A.useLayoutEffect(t)}function aa(){let{isDataRoute:t}=A.useContext(dn);return t?uA():FE()}function FE(){Ye(ra(),"useNavigate() may be used only in the context of a <Router> component.");let t=A.useContext(ia),{basename:n,navigator:i}=A.useContext(fn),{matches:a}=A.useContext(dn),{pathname:l}=Ei(),u=JSON.stringify(gd(a)),f=A.useRef(!1);return ob(()=>{f.current=!0}),A.useCallback((m,p={})=>{if(sn(f.current,lb),!f.current)return;if(typeof m=="number"){i.go(m);return}let g=yd(m,JSON.parse(u),l,p.relative==="path");t==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:Hn([n,g.pathname])),(p.replace?i.replace:i.push)(g,p.state,p)},[n,i,u,l,t])}A.createContext(null);function XE(){let{matches:t}=A.useContext(dn),n=t[t.length-1];return n?n.params:{}}function $s(t,{relative:n}={}){let{matches:i}=A.useContext(dn),{pathname:a}=Ei(),l=JSON.stringify(gd(i));return A.useMemo(()=>yd(t,JSON.parse(l),a,n==="path"),[t,l,a,n])}function PE(t,n){return ub(t,n)}function ub(t,n,i,a){var M;Ye(ra(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=A.useContext(fn),{matches:u}=A.useContext(dn),f=u[u.length-1],d=f?f.params:{},m=f?f.pathname:"/",p=f?f.pathnameBase:"/",g=f&&f.route;{let z=g&&g.path||"";cb(m,!g||z.endsWith("*")||z.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${z}">) 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.
51
+ */var qp;function VS(){if(qp)return si;qp=1;var i=US(),n=Fo(),r=HS();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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(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 p(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 h(e){if(f(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,l=t;;){var u=a.return;if(u===null)break;var c=u.alternate;if(c===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===a)return h(u),e;if(c===l)return h(u),t;c=c.sibling}throw Error(s(188))}if(a.return!==l.return)a=u,l=c;else{for(var g=!1,y=u.child;y;){if(y===a){g=!0,a=u,l=c;break}if(y===l){g=!0,l=u,a=c;break}y=y.sibling}if(!g){for(y=c.child;y;){if(y===a){g=!0,a=c,l=u;break}if(y===l){g=!0,l=c,a=u;break}y=y.sibling}if(!g)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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),D=Symbol.for("react.consumer"),G=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function Ke(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var Xe=Symbol.for("react.client.reference");function Ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case V:return"Profiler";case L:return"StrictMode";case K:return"Suspense";case se:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case G:return(e.displayName||"Context")+".Provider";case D:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:Ge(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return Ge(e(t))}catch{}}return null}var Ye=Array.isArray,_=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ye=[],R=-1;function $(e){return{current:e}}function Z(e){0>R||(e.current=ye[R],ye[R]=null,R--)}function Q(e,t){R++,ye[R]=e.current,e.current=t}var I=$(null),me=$(null),ue=$(null),gt=$(null);function ze(e,t){switch(Q(ue,t),Q(me,e),Q(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zh(t),e=Kh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(I),Q(I,e)}function ya(){Z(I),Z(me),Z(ue)}function os(e){e.memoizedState!==null&&Q(gt,e);var t=I.current,a=Kh(t,e.type);t!==a&&(Q(me,e),Q(I,a))}function Ei(e){me.current===e&&(Z(I),Z(me)),gt.current===e&&(Z(gt),ei._currentValue=W)}var cs=Object.prototype.hasOwnProperty,fs=i.unstable_scheduleCallback,ds=i.unstable_cancelCallback,ov=i.unstable_shouldYield,cv=i.unstable_requestPaint,Qt=i.unstable_now,fv=i.unstable_getCurrentPriorityLevel,wc=i.unstable_ImmediatePriority,Tc=i.unstable_UserBlockingPriority,Ri=i.unstable_NormalPriority,dv=i.unstable_LowPriority,Cc=i.unstable_IdlePriority,hv=i.log,pv=i.unstable_setDisableYieldValue,ul=null,vt=null;function ba(e){if(typeof hv=="function"&&pv(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(ul,e)}catch{}}var yt=Math.clz32?Math.clz32:vv,mv=Math.log,gv=Math.LN2;function vv(e){return e>>>=0,e===0?32:31-(mv(e)/gv|0)|0}var wi=256,Ti=4194304;function Za(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 Ci(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var u=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~c,l!==0?u=Za(l):(g&=y,g!==0?u=Za(g):a||(a=y&~e,a!==0&&(u=Za(a))))):(y=l&~c,y!==0?u=Za(y):g!==0?u=Za(g):a||(a=l&~e,a!==0&&(u=Za(a)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:u}function ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yv(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 jc(){var e=wi;return wi<<=1,(wi&4194048)===0&&(wi=256),e}function Ac(){var e=Ti;return Ti<<=1,(Ti&62914560)===0&&(Ti=4194304),e}function hs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bv(e,t,a,l,u,c){var g=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 y=e.entanglements,N=e.expirationTimes,O=e.hiddenUpdates;for(a=g&~a;0<a;){var B=31-yt(a),q=1<<B;y[B]=0,N[B]=-1;var k=O[B];if(k!==null)for(O[B]=null,B=0;B<k.length;B++){var z=k[B];z!==null&&(z.lane&=-536870913)}a&=~q}l!==0&&Oc(e,l,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function Oc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-yt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&4194090}function kc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-yt(a),u=1<<l;u&t|e[l]&t&&(e[l]|=t),a&=~u}}function ps(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 ms(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Lc(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:dp(e.type))}function xv(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var xa=Math.random().toString(36).slice(2),nt="__reactFiber$"+xa,ct="__reactProps$"+xa,vn="__reactContainer$"+xa,gs="__reactEvents$"+xa,Sv="__reactListeners$"+xa,Nv="__reactHandles$"+xa,zc="__reactResources$"+xa,fl="__reactMarker$"+xa;function vs(e){delete e[nt],delete e[ct],delete e[gs],delete e[Sv],delete e[Nv]}function yn(e){var t=e[nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[vn]||a[nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Ph(e);e!==null;){if(a=e[nt])return a;e=Ph(e)}return t}e=a,a=e.parentNode}return null}function bn(e){if(e=e[nt]||e[vn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function xn(e){var t=e[zc];return t||(t=e[zc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[fl]=!0}var Dc=new Set,_c={};function Ka(e,t){Sn(e,t),Sn(e+"Capture",t)}function Sn(e,t){for(_c[e]=t,e=0;e<t.length;e++)Dc.add(t[e])}var Ev=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]*$"),Mc={},Uc={};function Rv(e){return cs.call(Uc,e)?!0:cs.call(Mc,e)?!1:Ev.test(e)?Uc[e]=!0:(Mc[e]=!0,!1)}function ji(e,t,a){if(Rv(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 Ai(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 It(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)}}var ys,Bc;function Nn(e){if(ys===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ys=t&&t[1]||"",Bc=-1<a.stack.indexOf(`
52
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
53
+ `+ys+e+Bc}var bs=!1;function xs(e,t){if(!e||bs)return"";bs=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(z){var k=z}Reflect.construct(e,[],q)}else{try{q.call()}catch(z){k=z}e.call(q.prototype)}}else{try{throw Error()}catch(z){k=z}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(z){if(z&&k&&typeof z.stack=="string")return[z.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),g=c[0],y=c[1];if(g&&y){var N=g.split(`
54
+ `),O=y.split(`
55
+ `);for(u=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;u<O.length&&!O[u].includes("DetermineComponentFrameRoot");)u++;if(l===N.length||u===O.length)for(l=N.length-1,u=O.length-1;1<=l&&0<=u&&N[l]!==O[u];)u--;for(;1<=l&&0<=u;l--,u--)if(N[l]!==O[u]){if(l!==1||u!==1)do if(l--,u--,0>u||N[l]!==O[u]){var B=`
56
+ `+N[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=u);break}}}finally{bs=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Nn(a):""}function wv(e){switch(e.tag){case 26:case 27:case 5:return Nn(e.type);case 16:return Nn("Lazy");case 13:return Nn("Suspense");case 19:return Nn("SuspenseList");case 0:case 15:return xs(e.type,!1);case 11:return xs(e.type.render,!1);case 1:return xs(e.type,!0);case 31:return Nn("Activity");default:return""}}function Hc(e){try{var t="";do t+=wv(e),e=e.return;while(e);return t}catch(a){return`
57
+ Error generating stack: `+a.message+`
58
+ `+a.stack}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tv(e){var t=Vc(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oi(e){e._valueTracker||(e._valueTracker=Tv(e))}function $c(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Vc(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ki(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 Cv=/[\n"\\]/g;function At(e){return e.replace(Cv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ss(e,t,a,l,u,c,g,y){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Ns(e,g,jt(t)):a!=null?Ns(e,g,jt(a)):l!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+jt(y):e.removeAttribute("name")}function qc(e,t,a,l,u,c,g,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;a=a!=null?""+jt(a):"",t=t!=null?""+jt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g)}function Ns(e,t,a){t==="number"&&ki(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function En(e,t,a,l){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Gc(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function Yc(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(Ye(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l)}function Rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var jv=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 Qc(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||jv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Zc(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 u in t)l=t[u],t.hasOwnProperty(u)&&a[u]!==l&&Qc(e,u,l)}else for(var c in t)t.hasOwnProperty(c)&&Qc(e,c,t[c])}function Es(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 Av=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"]]),Ov=/^[\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 Li(e){return Ov.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Rs=null;function ws(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function Kc(e){var t=bn(e);if(t&&(e=t.stateNode)){var a=e[ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ss(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="'+At(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var u=l[ct]||null;if(!u)throw Error(s(90));Ss(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&$c(l)}break e;case"textarea":Gc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&En(e,!!a.multiple,t,!1)}}}var Ts=!1;function Xc(e,t,a){if(Ts)return e(t,a);Ts=!0;try{var l=e(t);return l}finally{if(Ts=!1,(wn!==null||Tn!==null)&&(vr(),wn&&(t=wn,e=Tn,Tn=wn=null,Kc(t),e)))for(t=0;t<e.length;t++)Kc(e[t])}}function hl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[ct]||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 ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cs=!1;if(ea)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){Cs=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{Cs=!1}var Sa=null,js=null,zi=null;function Jc(){if(zi)return zi;var e,t=js,a=t.length,l,u="value"in Sa?Sa.value:Sa.textContent,c=u.length;for(e=0;e<a&&t[e]===u[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===u[c-l];l++);return zi=u.slice(e,1<l?1-l:void 0)}function Di(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 _i(){return!0}function Fc(){return!1}function ft(e){function t(a,l,u,c,g){this._reactName=a,this._targetInst=u,this.type=l,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?_i:Fc,this.isPropagationStopped=Fc,this}return v(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=_i)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=_i)},persist:function(){},isPersistent:_i}),t}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=ft(Xa),ml=v({},Xa,{view:0,detail:0}),kv=ft(ml),As,Os,gl,Ui=v({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ls,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!==gl&&(gl&&e.type==="mousemove"?(As=e.screenX-gl.screenX,Os=e.screenY-gl.screenY):Os=As=0,gl=e),As)},movementY:function(e){return"movementY"in e?e.movementY:Os}}),Pc=ft(Ui),Lv=v({},Ui,{dataTransfer:0}),zv=ft(Lv),Dv=v({},ml,{relatedTarget:0}),ks=ft(Dv),_v=v({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),Mv=ft(_v),Uv=v({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bv=ft(Uv),Hv=v({},Xa,{data:0}),Wc=ft(Hv),Vv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$v={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"},qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qv[e])?!!t[e]:!1}function Ls(){return Gv}var Yv=v({},ml,{key:function(e){if(e.key){var t=Vv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Di(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$v[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ls,charCode:function(e){return e.type==="keypress"?Di(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Di(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qv=ft(Yv),Zv=v({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ic=ft(Zv),Kv=v({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ls}),Xv=ft(Kv),Jv=v({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fv=ft(Jv),Pv=v({},Ui,{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}),Wv=ft(Pv),Iv=v({},Xa,{newState:0,oldState:0}),ey=ft(Iv),ty=[9,13,27,32],zs=ea&&"CompositionEvent"in window,vl=null;ea&&"documentMode"in document&&(vl=document.documentMode);var ay=ea&&"TextEvent"in window&&!vl,ef=ea&&(!zs||vl&&8<vl&&11>=vl),tf=" ",af=!1;function nf(e,t){switch(e){case"keyup":return ty.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function ny(e,t){switch(e){case"compositionend":return lf(t);case"keypress":return t.which!==32?null:(af=!0,tf);case"textInput":return e=t.data,e===tf&&af?null:e;default:return null}}function ly(e,t){if(Cn)return e==="compositionend"||!zs&&nf(e,t)?(e=Jc(),zi=js=Sa=null,Cn=!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 ef&&t.locale!=="ko"?null:t.data;default:return null}}var iy={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 rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!iy[e.type]:t==="textarea"}function sf(e,t,a,l){wn?Tn?Tn.push(l):Tn=[l]:wn=l,t=Er(t,"onChange"),0<t.length&&(a=new Mi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var yl=null,bl=null;function ry(e){$h(e,0)}function Bi(e){var t=dl(e);if($c(t))return e}function uf(e,t){if(e==="change")return t}var of=!1;if(ea){var Ds;if(ea){var _s="oninput"in document;if(!_s){var cf=document.createElement("div");cf.setAttribute("oninput","return;"),_s=typeof cf.oninput=="function"}Ds=_s}else Ds=!1;of=Ds&&(!document.documentMode||9<document.documentMode)}function ff(){yl&&(yl.detachEvent("onpropertychange",df),bl=yl=null)}function df(e){if(e.propertyName==="value"&&Bi(bl)){var t=[];sf(t,bl,e,ws(e)),Xc(ry,t)}}function sy(e,t,a){e==="focusin"?(ff(),yl=t,bl=a,yl.attachEvent("onpropertychange",df)):e==="focusout"&&ff()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bi(bl)}function oy(e,t){if(e==="click")return Bi(t)}function cy(e,t){if(e==="input"||e==="change")return Bi(t)}function fy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:fy;function xl(e,t){if(bt(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 u=a[l];if(!cs.call(t,u)||!bt(e[u],t[u]))return!1}return!0}function hf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pf(e,t){var a=hf(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=hf(a)}}function mf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ki(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=ki(e.document)}return t}function Ms(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 dy=ea&&"documentMode"in document&&11>=document.documentMode,jn=null,Us=null,Sl=null,Bs=!1;function vf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bs||jn==null||jn!==ki(l)||(l=jn,"selectionStart"in l&&Ms(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}),Sl&&xl(Sl,l)||(Sl=l,l=Er(Us,"onSelect"),0<l.length&&(t=new Mi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=jn)))}function Ja(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var An={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},Hs={},yf={};ea&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete An.animationend.animation,delete An.animationiteration.animation,delete An.animationstart.animation),"TransitionEvent"in window||delete An.transitionend.transition);function Fa(e){if(Hs[e])return Hs[e];if(!An[e])return e;var t=An[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in yf)return Hs[e]=t[a];return e}var bf=Fa("animationend"),xf=Fa("animationiteration"),Sf=Fa("animationstart"),hy=Fa("transitionrun"),py=Fa("transitionstart"),my=Fa("transitioncancel"),Nf=Fa("transitionend"),Ef=new Map,Vs="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(" ");Vs.push("scrollEnd");function Ht(e,t){Ef.set(e,t),Ka(t,[e])}var Rf=new WeakMap;function Ot(e,t){if(typeof e=="object"&&e!==null){var a=Rf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Hc(t)},Rf.set(e,t),t)}return{value:e,source:t,stack:Hc(t)}}var kt=[],On=0,$s=0;function Hi(){for(var e=On,t=$s=On=0;t<e;){var a=kt[t];kt[t++]=null;var l=kt[t];kt[t++]=null;var u=kt[t];kt[t++]=null;var c=kt[t];if(kt[t++]=null,l!==null&&u!==null){var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}c!==0&&wf(a,u,c)}}function Vi(e,t,a,l){kt[On++]=e,kt[On++]=t,kt[On++]=a,kt[On++]=l,$s|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function qs(e,t,a,l){return Vi(e,t,a,l),$i(e)}function kn(e,t){return Vi(e,null,null,t),$i(e)}function wf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var u=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-yt(a),e=c.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=a|536870912),c):null}function $i(e){if(50<Zl)throw Zl=0,Xu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ln={};function gy(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 xt(e,t,a,l){return new gy(e,t,a,l)}function Gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var a=e.alternate;return a===null?(a=xt(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 qi(e,t,a,l,u,c){var g=0;if(l=e,typeof e=="function")Gs(e)&&(g=1);else if(typeof e=="string")g=y0(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=xt(31,a,t,u),e.elementType=F,e.lanes=c,e;case E:return Pa(a.children,u,c,t);case L:g=8,u|=24;break;case V:return e=xt(12,a,t,u|2),e.elementType=V,e.lanes=c,e;case K:return e=xt(13,a,t,u),e.elementType=K,e.lanes=c,e;case se:return e=xt(19,a,t,u),e.elementType=se,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case G:g=10;break e;case D:g=9;break e;case X:g=11;break e;case re:g=14;break e;case ee:g=16,l=null;break e}g=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=xt(g,a,t,u),t.elementType=e,t.type=l,t.lanes=c,t}function Pa(e,t,a,l){return e=xt(7,e,l,t),e.lanes=a,e}function Ys(e,t,a){return e=xt(6,e,null,t),e.lanes=a,e}function Qs(e,t,a){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zn=[],Dn=0,Gi=null,Yi=0,Lt=[],zt=0,Wa=null,aa=1,na="";function Ia(e,t){zn[Dn++]=Yi,zn[Dn++]=Gi,Gi=e,Yi=t}function Cf(e,t,a){Lt[zt++]=aa,Lt[zt++]=na,Lt[zt++]=Wa,Wa=e;var l=aa;e=na;var u=32-yt(l)-1;l&=~(1<<u),a+=1;var c=32-yt(t)+u;if(30<c){var g=u-u%5;c=(l&(1<<g)-1).toString(32),l>>=g,u-=g,aa=1<<32-yt(t)+u|a<<u|l,na=c+e}else aa=1<<c|a<<u|l,na=e}function Zs(e){e.return!==null&&(Ia(e,1),Cf(e,1,0))}function Ks(e){for(;e===Gi;)Gi=zn[--Dn],zn[Dn]=null,Yi=zn[--Dn],zn[Dn]=null;for(;e===Wa;)Wa=Lt[--zt],Lt[zt]=null,na=Lt[--zt],Lt[zt]=null,aa=Lt[--zt],Lt[zt]=null}var st=null,Ue=null,xe=!1,en=null,Zt=!1,Xs=Error(s(519));function tn(e){var t=Error(s(418,""));throw Rl(Ot(t,e)),Xs}function jf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[nt]=e,t[ct]=l,a){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(a=0;a<Xl.length;a++)he(Xl[a],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),qc(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Oi(t);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Yc(t,l.value,l.defaultValue,l.children),Oi(t)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Qh(t.textContent,a)?(l.popover!=null&&(he("beforetoggle",t),he("toggle",t)),l.onScroll!=null&&he("scroll",t),l.onScrollEnd!=null&&he("scrollend",t),l.onClick!=null&&(t.onclick=Rr),t=!0):t=!1,t||tn(e)}function Af(e){for(st=e.return;st;)switch(st.tag){case 5:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:st=st.return}}function Nl(e){if(e!==st)return!1;if(!xe)return Af(e),xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||co(e.type,e.memoizedProps)),a=!a),a&&Ue&&tn(e),Af(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ue=$t(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ue=null}}else t===27?(t=Ue,Ua(e.type)?(e=mo,mo=null,Ue=e):Ue=t):Ue=st?$t(e.stateNode.nextSibling):null;return!0}function El(){Ue=st=null,xe=!1}function Of(){var e=en;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),en=null),e}function Rl(e){en===null?en=[e]:en.push(e)}var Js=$(null),an=null,la=null;function Na(e,t,a){Q(Js,t._currentValue),t._currentValue=a}function ia(e){e._currentValue=Js.current,Z(Js)}function Fs(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 Ps(e,t,a,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var g=u.child;c=c.firstContext;e:for(;c!==null;){var y=c;c=u;for(var N=0;N<t.length;N++)if(y.context===t[N]){c.lanes|=a,y=c.alternate,y!==null&&(y.lanes|=a),Fs(c.return,a,e),l||(g=null);break e}c=y.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(s(341));g.lanes|=a,c=g.alternate,c!==null&&(c.lanes|=a),Fs(g,a,e),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===e){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function wl(e,t,a,l){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(s(387));if(g=g.memoizedProps,g!==null){var y=u.type;bt(u.pendingProps.value,g.value)||(e!==null?e.push(y):e=[y])}}else if(u===gt.current){if(g=u.alternate,g===null)throw Error(s(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}u=u.return}e!==null&&Ps(t,e,a,l),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nn(e){an=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return kf(an,e)}function Zi(e,t){return an===null&&nn(e),kf(e,t)}function kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},la===null){if(e===null)throw Error(s(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return a}var vy=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()})}},yy=i.unstable_scheduleCallback,by=i.unstable_NormalPriority,Qe={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ws(){return{controller:new vy,data:new Map,refCount:0}}function Tl(e){e.refCount--,e.refCount===0&&yy(by,function(){e.controller.abort()})}var Cl=null,Is=0,_n=0,Mn=null;function xy(e,t){if(Cl===null){var a=Cl=[];Is=0,_n=to(),Mn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Is++,t.then(Lf,Lf),t}function Lf(){if(--Is===0&&Cl!==null){Mn!==null&&(Mn.status="fulfilled");var e=Cl;Cl=null,_n=0,Mn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sy(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),l}var zf=_.S;_.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&xy(e,t),zf!==null&&zf(e,t)};var ln=$(null);function eu(){var e=ln.current;return e!==null?e:ke.pooledCache}function Ki(e,t){t===null?Q(ln,ln.current):Q(ln,t.pool)}function Df(){var e=eu();return e===null?null:{parent:Qe._currentValue,pool:e}}var jl=Error(s(460)),_f=Error(s(474)),Xi=Error(s(542)),tu={then:function(){}};function Mf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ji(){}function Uf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ji,Ji),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hf(e),e;default:if(typeof t.status=="string")t.then(Ji,Ji);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hf(e),e}throw Al=t,jl}}var Al=null;function Bf(){if(Al===null)throw Error(s(459));var e=Al;return Al=null,e}function Hf(e){if(e===jl||e===Xi)throw Error(s(483))}var Ea=!1;function au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nu(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=$i(e),wf(e,null,a),t}return Vi(e,l,t,a),$i(e)}function Ol(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,kc(e,a)}}function lu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var u=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?u=c=g:c=c.next=g,a=a.next}while(a!==null);c===null?u=c=t:c=c.next=t}else u=c=t;a={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:c,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 iu=!1;function kl(){if(iu){var e=Mn;if(e!==null)throw e}}function Ll(e,t,a,l){iu=!1;var u=e.updateQueue;Ea=!1;var c=u.firstBaseUpdate,g=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var N=y,O=N.next;N.next=null,g===null?c=O:g.next=O,g=N;var B=e.alternate;B!==null&&(B=B.updateQueue,y=B.lastBaseUpdate,y!==g&&(y===null?B.firstBaseUpdate=O:y.next=O,B.lastBaseUpdate=N))}if(c!==null){var q=u.baseState;g=0,B=O=N=null,y=c;do{var k=y.lane&-536870913,z=k!==y.lane;if(z?(ve&k)===k:(l&k)===k){k!==0&&k===_n&&(iu=!0),B!==null&&(B=B.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var le=e,te=y;k=t;var je=a;switch(te.tag){case 1:if(le=te.payload,typeof le=="function"){q=le.call(je,q,k);break e}q=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=te.payload,k=typeof le=="function"?le.call(je,q,k):le,k==null)break e;q=v({},q,k);break e;case 2:Ea=!0}}k=y.callback,k!==null&&(e.flags|=64,z&&(e.flags|=8192),z=u.callbacks,z===null?u.callbacks=[k]:z.push(k))}else z={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},B===null?(O=B=z,N=q):B=B.next=z,g|=k;if(y=y.next,y===null){if(y=u.shared.pending,y===null)break;z=y,y=z.next,z.next=null,u.lastBaseUpdate=z,u.shared.pending=null}}while(!0);B===null&&(N=q),u.baseState=N,u.firstBaseUpdate=O,u.lastBaseUpdate=B,c===null&&(u.shared.lanes=0),za|=g,e.lanes=g,e.memoizedState=q}}function Vf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function $f(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Vf(a[e],t)}var Un=$(null),Fi=$(0);function qf(e,t){e=da,Q(Fi,e),Q(Un,t),da=e|t.baseLanes}function ru(){Q(Fi,da),Q(Un,Un.current)}function su(){da=Fi.current,Z(Un),Z(Fi)}var Ta=0,ce=null,Te=null,$e=null,Pi=!1,Bn=!1,rn=!1,Wi=0,zl=0,Hn=null,Ny=0;function He(){throw Error(s(321))}function uu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!bt(e[a],t[a]))return!1;return!0}function ou(e,t,a,l,u,c){return Ta=c,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?wd:Td,rn=!1,c=a(l,u),rn=!1,Bn&&(c=Yf(t,a,l,u)),Gf(e),c}function Gf(e){_.H=lr;var t=Te!==null&&Te.next!==null;if(Ta=0,$e=Te=ce=null,Pi=!1,zl=0,Hn=null,t)throw Error(s(300));e===null||Fe||(e=e.dependencies,e!==null&&Qi(e)&&(Fe=!0))}function Yf(e,t,a,l){ce=e;var u=0;do{if(Bn&&(Hn=null),zl=0,Bn=!1,25<=u)throw Error(s(301));if(u+=1,$e=Te=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}_.H=Ay,c=t(a,l)}while(Bn);return c}function Ey(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?Dl(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(ce.flags|=1024),t}function cu(){var e=Wi!==0;return Wi=0,e}function fu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function du(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Ta=0,$e=Te=ce=null,Bn=!1,zl=Wi=0,Hn=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?ce.memoizedState=$e=e:$e=$e.next=e,$e}function qe(){if(Te===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=$e===null?ce.memoizedState:$e.next;if(t!==null)$e=t,Te=e;else{if(e===null)throw ce.alternate===null?Error(s(467)):Error(s(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},$e===null?ce.memoizedState=$e=e:$e=$e.next=e}return $e}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dl(e){var t=zl;return zl+=1,Hn===null&&(Hn=[]),e=Uf(Hn,e,t),t=ce,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?wd:Td),e}function Ii(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Dl(e);if(e.$$typeof===G)return lt(e)}throw Error(s(438,String(e)))}function pu(e){var t=null,a=ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=hu(),ce.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]=ne;return t.index++,a}function ra(e,t){return typeof t=="function"?t(e):t}function er(e){var t=qe();return mu(t,Te,e)}function mu(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var u=e.baseQueue,c=l.pending;if(c!==null){if(u!==null){var g=u.next;u.next=c.next,c.next=g}t.baseQueue=u=c,l.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var y=g=null,N=null,O=t,B=!1;do{var q=O.lane&-536870913;if(q!==O.lane?(ve&q)===q:(Ta&q)===q){var k=O.revertLane;if(k===0)N!==null&&(N=N.next={lane:0,revertLane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),q===_n&&(B=!0);else if((Ta&k)===k){O=O.next,k===_n&&(B=!0);continue}else q={lane:0,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},N===null?(y=N=q,g=c):N=N.next=q,ce.lanes|=k,za|=k;q=O.action,rn&&a(c,q),c=O.hasEagerState?O.eagerState:a(c,q)}else k={lane:q,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},N===null?(y=N=k,g=c):N=N.next=k,ce.lanes|=q,za|=q;O=O.next}while(O!==null&&O!==t);if(N===null?g=c:N.next=y,!bt(c,e.memoizedState)&&(Fe=!0,B&&(a=Mn,a!==null)))throw a;e.memoizedState=c,e.baseState=g,e.baseQueue=N,l.lastRenderedState=c}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function gu(e){var t=qe(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,u=a.pending,c=t.memoizedState;if(u!==null){a.pending=null;var g=u=u.next;do c=e(c,g.action),g=g.next;while(g!==u);bt(c,t.memoizedState)||(Fe=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Qf(e,t,a){var l=ce,u=qe(),c=xe;if(c){if(a===void 0)throw Error(s(407));a=a()}else a=t();var g=!bt((Te||u).memoizedState,a);g&&(u.memoizedState=a,Fe=!0),u=u.queue;var y=Xf.bind(null,l,u,e);if(_l(2048,8,y,[e]),u.getSnapshot!==t||g||$e!==null&&$e.memoizedState.tag&1){if(l.flags|=2048,Vn(9,tr(),Kf.bind(null,l,u,a,t),null),ke===null)throw Error(s(349));c||(Ta&124)!==0||Zf(l,t,a)}return a}function Zf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ce.updateQueue,t===null?(t=hu(),ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Kf(e,t,a,l){t.value=a,t.getSnapshot=l,Jf(t)&&Ff(e)}function Xf(e,t,a){return a(function(){Jf(t)&&Ff(e)})}function Jf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!bt(e,a)}catch{return!0}}function Ff(e){var t=kn(e,2);t!==null&&wt(t,e,2)}function vu(e){var t=dt();if(typeof e=="function"){var a=e;if(e=a(),rn){ba(!0);try{a()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Pf(e,t,a,l){return e.baseState=a,mu(e,Te,typeof l=="function"?l:ra)}function Ry(e,t,a,l,u){if(nr(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};_.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,Wf(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Wf(e,t){var a=t.action,l=t.payload,u=e.state;if(t.isTransition){var c=_.T,g={};_.T=g;try{var y=a(u,l),N=_.S;N!==null&&N(g,y),If(e,t,y)}catch(O){yu(e,t,O)}finally{_.T=c}}else try{c=a(u,l),If(e,t,c)}catch(O){yu(e,t,O)}}function If(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){ed(e,t,l)},function(l){return yu(e,t,l)}):ed(e,t,a)}function ed(e,t,a){t.status="fulfilled",t.value=a,td(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Wf(e,a)))}function yu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,td(t),t=t.next;while(t!==l)}e.action=null}function td(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ad(e,t){return t}function nd(e,t){if(xe){var a=ke.formState;if(a!==null){e:{var l=ce;if(xe){if(Ue){t:{for(var u=Ue,c=Zt;u.nodeType!==8;){if(!c){u=null;break t}if(u=$t(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Ue=$t(u.nextSibling),l=u.data==="F!";break e}}tn(l)}l=!1}l&&(t=a[0])}}return a=dt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ad,lastRenderedState:t},a.queue=l,a=Nd.bind(null,ce,l),l.dispatch=a,l=vu(!1),c=Eu.bind(null,ce,!1,l.queue),l=dt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,a=Ry.bind(null,ce,u,c,a),u.dispatch=a,l.memoizedState=e,[t,a,!1]}function ld(e){var t=qe();return id(t,Te,e)}function id(e,t,a){if(t=mu(e,t,ad)[0],e=er(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Dl(t)}catch(g){throw g===jl?Xi:g}else l=t;t=qe();var u=t.queue,c=u.dispatch;return a!==t.memoizedState&&(ce.flags|=2048,Vn(9,tr(),wy.bind(null,u,a),null)),[l,c,e]}function wy(e,t){e.action=t}function rd(e){var t=qe(),a=Te;if(a!==null)return id(t,a,e);qe(),t=t.memoizedState,a=qe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Vn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ce.updateQueue,t===null&&(t=hu(),ce.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 tr(){return{destroy:void 0,resource:void 0}}function sd(){return qe().memoizedState}function ar(e,t,a,l){var u=dt();l=l===void 0?null:l,ce.flags|=e,u.memoizedState=Vn(1|t,tr(),a,l)}function _l(e,t,a,l){var u=qe();l=l===void 0?null:l;var c=u.memoizedState.inst;Te!==null&&l!==null&&uu(l,Te.memoizedState.deps)?u.memoizedState=Vn(t,c,a,l):(ce.flags|=e,u.memoizedState=Vn(1|t,c,a,l))}function ud(e,t){ar(8390656,8,e,t)}function od(e,t){_l(2048,8,e,t)}function cd(e,t){return _l(4,2,e,t)}function fd(e,t){return _l(4,4,e,t)}function dd(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 hd(e,t,a){a=a!=null?a.concat([e]):null,_l(4,4,dd.bind(null,t,e),a)}function bu(){}function pd(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&uu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function md(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&uu(t,l[1]))return l[0];if(l=e(),rn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[l,t],l}function xu(e,t,a){return a===void 0||(Ta&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=yh(),ce.lanes|=e,za|=e,a)}function gd(e,t,a,l){return bt(a,t)?a:Un.current!==null?(e=xu(e,a,l),bt(e,t)||(Fe=!0),e):(Ta&42)===0?(Fe=!0,e.memoizedState=a):(e=yh(),ce.lanes|=e,za|=e,t)}function vd(e,t,a,l,u){var c=Y.p;Y.p=c!==0&&8>c?c:8;var g=_.T,y={};_.T=y,Eu(e,!1,t,a);try{var N=u(),O=_.S;if(O!==null&&O(y,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var B=Sy(N,l);Ml(e,t,B,Rt(e))}else Ml(e,t,l,Rt(e))}catch(q){Ml(e,t,{then:function(){},status:"rejected",reason:q},Rt())}finally{Y.p=c,_.T=g}}function Ty(){}function Su(e,t,a,l){if(e.tag!==5)throw Error(s(476));var u=yd(e).queue;vd(e,u,t,W,a===null?Ty:function(){return bd(e),a(l)})}function yd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bd(e){var t=yd(e).next.queue;Ml(e,t,{},Rt())}function Nu(){return lt(ei)}function xd(){return qe().memoizedState}function Sd(){return qe().memoizedState}function Cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Rt();e=Ra(a);var l=wa(t,e,a);l!==null&&(wt(l,t,a),Ol(l,t,a)),t={cache:Ws()},e.payload=t;return}t=t.return}}function jy(e,t,a){var l=Rt();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},nr(e)?Ed(t,a):(a=qs(e,t,a,l),a!==null&&(wt(a,e,l),Rd(a,t,l)))}function Nd(e,t,a){var l=Rt();Ml(e,t,a,l)}function Ml(e,t,a,l){var u={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(nr(e))Ed(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,y=c(g,a);if(u.hasEagerState=!0,u.eagerState=y,bt(y,g))return Vi(e,t,u,0),ke===null&&Hi(),!1}catch{}finally{}if(a=qs(e,t,u,l),a!==null)return wt(a,e,l),Rd(a,t,l),!0}return!1}function Eu(e,t,a,l){if(l={lane:2,revertLane:to(),action:l,hasEagerState:!1,eagerState:null,next:null},nr(e)){if(t)throw Error(s(479))}else t=qs(e,a,l,2),t!==null&&wt(t,e,2)}function nr(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Ed(e,t){Bn=Pi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Rd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kc(e,a)}}var lr={readContext:lt,use:Ii,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He},wd={readContext:lt,use:Ii,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:ud,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ar(4194308,4,dd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ar(4194308,4,e,t)},useInsertionEffect:function(e,t){ar(4,2,e,t)},useMemo:function(e,t){var a=dt();t=t===void 0?null:t;var l=e();if(rn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=dt();if(a!==void 0){var u=a(t);if(rn){ba(!0);try{a(t)}finally{ba(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=jy.bind(null,ce,e),[l.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=vu(e);var t=e.queue,a=Nd.bind(null,ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:bu,useDeferredValue:function(e,t){var a=dt();return xu(a,e,t)},useTransition:function(){var e=vu(!1);return e=vd.bind(null,ce,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ce,u=dt();if(xe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),ke===null)throw Error(s(349));(ve&124)!==0||Zf(l,t,a)}u.memoizedState=a;var c={value:a,getSnapshot:t};return u.queue=c,ud(Xf.bind(null,l,c,e),[e]),l.flags|=2048,Vn(9,tr(),Kf.bind(null,l,c,a,t),null),a},useId:function(){var e=dt(),t=ke.identifierPrefix;if(xe){var a=na,l=aa;a=(l&~(1<<32-yt(l)-1)).toString(32)+a,t="«"+t+"R"+a,a=Wi++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Ny++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Nu,useFormState:nd,useActionState:nd,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Eu.bind(null,ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:pu,useCacheRefresh:function(){return dt().memoizedState=Cy.bind(null,ce)}},Td={readContext:lt,use:Ii,useCallback:pd,useContext:lt,useEffect:od,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:fd,useMemo:md,useReducer:er,useRef:sd,useState:function(){return er(ra)},useDebugValue:bu,useDeferredValue:function(e,t){var a=qe();return gd(a,Te.memoizedState,e,t)},useTransition:function(){var e=er(ra)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:Dl(e),t]},useSyncExternalStore:Qf,useId:xd,useHostTransitionStatus:Nu,useFormState:ld,useActionState:ld,useOptimistic:function(e,t){var a=qe();return Pf(a,Te,e,t)},useMemoCache:pu,useCacheRefresh:Sd},Ay={readContext:lt,use:Ii,useCallback:pd,useContext:lt,useEffect:od,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:fd,useMemo:md,useReducer:gu,useRef:sd,useState:function(){return gu(ra)},useDebugValue:bu,useDeferredValue:function(e,t){var a=qe();return Te===null?xu(a,e,t):gd(a,Te.memoizedState,e,t)},useTransition:function(){var e=gu(ra)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:Dl(e),t]},useSyncExternalStore:Qf,useId:xd,useHostTransitionStatus:Nu,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var a=qe();return Te!==null?Pf(a,Te,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:pu,useCacheRefresh:Sd},$n=null,Ul=0;function ir(e){var t=Ul;return Ul+=1,$n===null&&($n=[]),Uf($n,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rr(e,t){throw t.$$typeof===S?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cd(e){var t=e._init;return t(e._payload)}function jd(e){function t(j,T){if(e){var A=j.deletions;A===null?(j.deletions=[T],j.flags|=16):A.push(T)}}function a(j,T){if(!e)return null;for(;T!==null;)t(j,T),T=T.sibling;return null}function l(j){for(var T=new Map;j!==null;)j.key!==null?T.set(j.key,j):T.set(j.index,j),j=j.sibling;return T}function u(j,T){return j=ta(j,T),j.index=0,j.sibling=null,j}function c(j,T,A){return j.index=A,e?(A=j.alternate,A!==null?(A=A.index,A<T?(j.flags|=67108866,T):A):(j.flags|=67108866,T)):(j.flags|=1048576,T)}function g(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function y(j,T,A,H){return T===null||T.tag!==6?(T=Ys(A,j.mode,H),T.return=j,T):(T=u(T,A),T.return=j,T)}function N(j,T,A,H){var J=A.type;return J===E?B(j,T,A.props.children,H,A.key):T!==null&&(T.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===ee&&Cd(J)===T.type)?(T=u(T,A.props),Bl(T,A),T.return=j,T):(T=qi(A.type,A.key,A.props,null,j.mode,H),Bl(T,A),T.return=j,T)}function O(j,T,A,H){return T===null||T.tag!==4||T.stateNode.containerInfo!==A.containerInfo||T.stateNode.implementation!==A.implementation?(T=Qs(A,j.mode,H),T.return=j,T):(T=u(T,A.children||[]),T.return=j,T)}function B(j,T,A,H,J){return T===null||T.tag!==7?(T=Pa(A,j.mode,H,J),T.return=j,T):(T=u(T,A),T.return=j,T)}function q(j,T,A){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Ys(""+T,j.mode,A),T.return=j,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case x:return A=qi(T.type,T.key,T.props,null,j.mode,A),Bl(A,T),A.return=j,A;case C:return T=Qs(T,j.mode,A),T.return=j,T;case ee:var H=T._init;return T=H(T._payload),q(j,T,A)}if(Ye(T)||Ke(T))return T=Pa(T,j.mode,A,null),T.return=j,T;if(typeof T.then=="function")return q(j,ir(T),A);if(T.$$typeof===G)return q(j,Zi(j,T),A);rr(j,T)}return null}function k(j,T,A,H){var J=T!==null?T.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return J!==null?null:y(j,T,""+A,H);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case x:return A.key===J?N(j,T,A,H):null;case C:return A.key===J?O(j,T,A,H):null;case ee:return J=A._init,A=J(A._payload),k(j,T,A,H)}if(Ye(A)||Ke(A))return J!==null?null:B(j,T,A,H,null);if(typeof A.then=="function")return k(j,T,ir(A),H);if(A.$$typeof===G)return k(j,T,Zi(j,A),H);rr(j,A)}return null}function z(j,T,A,H,J){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return j=j.get(A)||null,y(T,j,""+H,J);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return j=j.get(H.key===null?A:H.key)||null,N(T,j,H,J);case C:return j=j.get(H.key===null?A:H.key)||null,O(T,j,H,J);case ee:var fe=H._init;return H=fe(H._payload),z(j,T,A,H,J)}if(Ye(H)||Ke(H))return j=j.get(A)||null,B(T,j,H,J,null);if(typeof H.then=="function")return z(j,T,A,ir(H),J);if(H.$$typeof===G)return z(j,T,A,Zi(T,H),J);rr(T,H)}return null}function le(j,T,A,H){for(var J=null,fe=null,P=T,ae=T=0,We=null;P!==null&&ae<A.length;ae++){P.index>ae?(We=P,P=null):We=P.sibling;var be=k(j,P,A[ae],H);if(be===null){P===null&&(P=We);break}e&&P&&be.alternate===null&&t(j,P),T=c(be,T,ae),fe===null?J=be:fe.sibling=be,fe=be,P=We}if(ae===A.length)return a(j,P),xe&&Ia(j,ae),J;if(P===null){for(;ae<A.length;ae++)P=q(j,A[ae],H),P!==null&&(T=c(P,T,ae),fe===null?J=P:fe.sibling=P,fe=P);return xe&&Ia(j,ae),J}for(P=l(P);ae<A.length;ae++)We=z(P,j,ae,A[ae],H),We!==null&&(e&&We.alternate!==null&&P.delete(We.key===null?ae:We.key),T=c(We,T,ae),fe===null?J=We:fe.sibling=We,fe=We);return e&&P.forEach(function(qa){return t(j,qa)}),xe&&Ia(j,ae),J}function te(j,T,A,H){if(A==null)throw Error(s(151));for(var J=null,fe=null,P=T,ae=T=0,We=null,be=A.next();P!==null&&!be.done;ae++,be=A.next()){P.index>ae?(We=P,P=null):We=P.sibling;var qa=k(j,P,be.value,H);if(qa===null){P===null&&(P=We);break}e&&P&&qa.alternate===null&&t(j,P),T=c(qa,T,ae),fe===null?J=qa:fe.sibling=qa,fe=qa,P=We}if(be.done)return a(j,P),xe&&Ia(j,ae),J;if(P===null){for(;!be.done;ae++,be=A.next())be=q(j,be.value,H),be!==null&&(T=c(be,T,ae),fe===null?J=be:fe.sibling=be,fe=be);return xe&&Ia(j,ae),J}for(P=l(P);!be.done;ae++,be=A.next())be=z(P,j,ae,be.value,H),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?ae:be.key),T=c(be,T,ae),fe===null?J=be:fe.sibling=be,fe=be);return e&&P.forEach(function(O0){return t(j,O0)}),xe&&Ia(j,ae),J}function je(j,T,A,H){if(typeof A=="object"&&A!==null&&A.type===E&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case x:e:{for(var J=A.key;T!==null;){if(T.key===J){if(J=A.type,J===E){if(T.tag===7){a(j,T.sibling),H=u(T,A.props.children),H.return=j,j=H;break e}}else if(T.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===ee&&Cd(J)===T.type){a(j,T.sibling),H=u(T,A.props),Bl(H,A),H.return=j,j=H;break e}a(j,T);break}else t(j,T);T=T.sibling}A.type===E?(H=Pa(A.props.children,j.mode,H,A.key),H.return=j,j=H):(H=qi(A.type,A.key,A.props,null,j.mode,H),Bl(H,A),H.return=j,j=H)}return g(j);case C:e:{for(J=A.key;T!==null;){if(T.key===J)if(T.tag===4&&T.stateNode.containerInfo===A.containerInfo&&T.stateNode.implementation===A.implementation){a(j,T.sibling),H=u(T,A.children||[]),H.return=j,j=H;break e}else{a(j,T);break}else t(j,T);T=T.sibling}H=Qs(A,j.mode,H),H.return=j,j=H}return g(j);case ee:return J=A._init,A=J(A._payload),je(j,T,A,H)}if(Ye(A))return le(j,T,A,H);if(Ke(A)){if(J=Ke(A),typeof J!="function")throw Error(s(150));return A=J.call(A),te(j,T,A,H)}if(typeof A.then=="function")return je(j,T,ir(A),H);if(A.$$typeof===G)return je(j,T,Zi(j,A),H);rr(j,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,T!==null&&T.tag===6?(a(j,T.sibling),H=u(T,A),H.return=j,j=H):(a(j,T),H=Ys(A,j.mode,H),H.return=j,j=H),g(j)):a(j,T)}return function(j,T,A,H){try{Ul=0;var J=je(j,T,A,H);return $n=null,J}catch(P){if(P===jl||P===Xi)throw P;var fe=xt(29,P,null,j.mode);return fe.lanes=H,fe.return=j,fe}finally{}}}var qn=jd(!0),Ad=jd(!1),Dt=$(null),Kt=null;function Ca(e){var t=e.alternate;Q(Ze,Ze.current&1),Q(Dt,e),Kt===null&&(t===null||Un.current!==null||t.memoizedState!==null)&&(Kt=e)}function Od(e){if(e.tag===22){if(Q(Ze,Ze.current),Q(Dt,e),Kt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Kt=e)}}else ja()}function ja(){Q(Ze,Ze.current),Q(Dt,Dt.current)}function sa(e){Z(Dt),Kt===e&&(Kt=null),Z(Ze)}var Ze=$(0);function sr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||po(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Ru(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var wu={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Rt(),u=Ra(l);u.payload=t,a!=null&&(u.callback=a),t=wa(e,u,l),t!==null&&(wt(t,e,l),Ol(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Rt(),u=Ra(l);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=wa(e,u,l),t!==null&&(wt(t,e,l),Ol(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Rt(),l=Ra(a);l.tag=2,t!=null&&(l.callback=t),t=wa(e,l,a),t!==null&&(wt(t,e,a),Ol(t,e,a))}};function kd(e,t,a,l,u,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,g):t.prototype&&t.prototype.isPureReactComponent?!xl(a,l)||!xl(u,c):!0}function Ld(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&&wu.enqueueReplaceState(t,t.state,null)}function sn(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=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}var ur=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)};function zd(e){ur(e)}function Dd(e){console.error(e)}function _d(e){ur(e)}function or(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Md(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Tu(e,t,a){return a=Ra(a),a.tag=3,a.payload={element:null},a.callback=function(){or(e,t)},a}function Ud(e){return e=Ra(e),e.tag=3,e}function Bd(e,t,a,l){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var c=l.value;e.payload=function(){return u(c)},e.callback=function(){Md(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Md(t,a,l),typeof u!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function Oy(e,t,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&wl(t,a,u,!0),a=Dt.current,a!==null){switch(a.tag){case 13:return Kt===null?Fu():a.alternate===null&&Be===0&&(Be=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===tu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Wu(e,l,u)),!1;case 22:return a.flags|=65536,l===tu?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)),Wu(e,l,u)),!1}throw Error(s(435,a.tag))}return Wu(e,l,u),Fu(),!1}if(xe)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Xs&&(e=Error(s(422),{cause:l}),Rl(Ot(e,a)))):(l!==Xs&&(t=Error(s(423),{cause:l}),Rl(Ot(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Ot(l,a),u=Tu(e.stateNode,l,u),lu(e,u),Be!==4&&(Be=2)),!1;var c=Error(s(520),{cause:l});if(c=Ot(c,a),Ql===null?Ql=[c]:Ql.push(c),Be!==4&&(Be=2),t===null)return!0;l=Ot(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Tu(a.stateNode,l,e),lu(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Da===null||!Da.has(c))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Ud(u),Bd(u,e,a,l),lu(a,u),!1}a=a.return}while(a!==null);return!1}var Hd=Error(s(461)),Fe=!1;function Ie(e,t,a,l){t.child=e===null?Ad(t,null,a,l):qn(t,e.child,a,l)}function Vd(e,t,a,l,u){a=a.render;var c=t.ref;if("ref"in l){var g={};for(var y in l)y!=="ref"&&(g[y]=l[y])}else g=l;return nn(t),l=ou(e,t,a,g,c,u),y=cu(),e!==null&&!Fe?(fu(e,t,u),ua(e,t,u)):(xe&&y&&Zs(t),t.flags|=1,Ie(e,t,l,u),t.child)}function $d(e,t,a,l,u){if(e===null){var c=a.type;return typeof c=="function"&&!Gs(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,qd(e,t,c,l,u)):(e=qi(a.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Du(e,u)){var g=c.memoizedProps;if(a=a.compare,a=a!==null?a:xl,a(g,l)&&e.ref===t.ref)return ua(e,t,u)}return t.flags|=1,e=ta(c,l),e.ref=t.ref,e.return=t,t.child=e}function qd(e,t,a,l,u){if(e!==null){var c=e.memoizedProps;if(xl(c,l)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=l=c,Du(e,u))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,ua(e,t,u)}return Cu(e,t,a,l,u)}function Gd(e,t,a){var l=t.pendingProps,u=l.children,c=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=c!==null?c.baseLanes|a:a,e!==null){for(u=t.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;t.childLanes=c&~l}else t.childLanes=0,t.child=null;return Yd(e,t,l,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ki(t,c!==null?c.cachePool:null),c!==null?qf(t,c):ru(),Od(t);else return t.lanes=t.childLanes=536870912,Yd(e,t,c!==null?c.baseLanes|a:a,a)}else c!==null?(Ki(t,c.cachePool),qf(t,c),ja(),t.memoizedState=null):(e!==null&&Ki(t,null),ru(),ja());return Ie(e,t,u,a),t.child}function Yd(e,t,a,l){var u=eu();return u=u===null?null:{parent:Qe._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Ki(t,null),ru(),Od(t),e!==null&&wl(e,t,l,!0),null}function cr(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 Cu(e,t,a,l,u){return nn(t),a=ou(e,t,a,l,void 0,u),l=cu(),e!==null&&!Fe?(fu(e,t,u),ua(e,t,u)):(xe&&l&&Zs(t),t.flags|=1,Ie(e,t,a,u),t.child)}function Qd(e,t,a,l,u,c){return nn(t),t.updateQueue=null,a=Yf(t,l,a,u),Gf(e),l=cu(),e!==null&&!Fe?(fu(e,t,c),ua(e,t,c)):(xe&&l&&Zs(t),t.flags|=1,Ie(e,t,a,c),t.child)}function Zd(e,t,a,l,u){if(nn(t),t.stateNode===null){var c=Ln,g=a.contextType;typeof g=="object"&&g!==null&&(c=lt(g)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=wu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},au(t),g=a.contextType,c.context=typeof g=="object"&&g!==null?lt(g):Ln,c.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Ru(t,a,g,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&wu.enqueueReplaceState(c,c.state,null),Ll(t,l,c,u),kl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var y=t.memoizedProps,N=sn(a,y);c.props=N;var O=c.context,B=a.contextType;g=Ln,typeof B=="object"&&B!==null&&(g=lt(B));var q=a.getDerivedStateFromProps;B=typeof q=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,B||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||O!==g)&&Ld(t,c,l,g),Ea=!1;var k=t.memoizedState;c.state=k,Ll(t,l,c,u),kl(),O=t.memoizedState,y||k!==O||Ea?(typeof q=="function"&&(Ru(t,a,q,l),O=t.memoizedState),(N=Ea||kd(t,a,N,l,k,O,g))?(B||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),c.props=l,c.state=O,c.context=g,l=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,nu(e,t),g=t.memoizedProps,B=sn(a,g),c.props=B,q=t.pendingProps,k=c.context,O=a.contextType,N=Ln,typeof O=="object"&&O!==null&&(N=lt(O)),y=a.getDerivedStateFromProps,(O=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==q||k!==N)&&Ld(t,c,l,N),Ea=!1,k=t.memoizedState,c.state=k,Ll(t,l,c,u),kl();var z=t.memoizedState;g!==q||k!==z||Ea||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof y=="function"&&(Ru(t,a,y,l),z=t.memoizedState),(B=Ea||kd(t,a,B,l,k,z,N)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(O||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,z,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,z,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),c.props=l,c.state=z,c.context=N,l=B):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,cr(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=qn(t,e.child,null,u),t.child=qn(t,null,a,u)):Ie(e,t,a,u),t.memoizedState=c.state,e=t.child):e=ua(e,t,u),e}function Kd(e,t,a,l){return El(),t.flags|=256,Ie(e,t,a,l),t.child}var ju={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Au(e){return{baseLanes:e,cachePool:Df()}}function Ou(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_t),e}function Xd(e,t,a){var l=t.pendingProps,u=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),g&&(u=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(u?Ca(t):ja(),xe){var y=Ue,N;if(N=y){e:{for(N=y,y=Zt;N.nodeType!==8;){if(!y){y=null;break e}if(N=$t(N.nextSibling),N===null){y=null;break e}}y=N}y!==null?(t.memoizedState={dehydrated:y,treeContext:Wa!==null?{id:aa,overflow:na}:null,retryLane:536870912,hydrationErrors:null},N=xt(18,null,null,0),N.stateNode=y,N.return=t,t.child=N,st=t,Ue=null,N=!0):N=!1}N||tn(t)}if(y=t.memoizedState,y!==null&&(y=y.dehydrated,y!==null))return po(y)?t.lanes=32:t.lanes=536870912,null;sa(t)}return y=l.children,l=l.fallback,u?(ja(),u=t.mode,y=fr({mode:"hidden",children:y},u),l=Pa(l,u,a,null),y.return=t,l.return=t,y.sibling=l,t.child=y,u=t.child,u.memoizedState=Au(a),u.childLanes=Ou(e,g,a),t.memoizedState=ju,l):(Ca(t),ku(t,y))}if(N=e.memoizedState,N!==null&&(y=N.dehydrated,y!==null)){if(c)t.flags&256?(Ca(t),t.flags&=-257,t=Lu(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),u=l.fallback,y=t.mode,l=fr({mode:"visible",children:l.children},y),u=Pa(u,y,a,null),u.flags|=2,l.return=t,u.return=t,l.sibling=u,t.child=l,qn(t,e.child,null,a),l=t.child,l.memoizedState=Au(a),l.childLanes=Ou(e,g,a),t.memoizedState=ju,t=u);else if(Ca(t),po(y)){if(g=y.nextSibling&&y.nextSibling.dataset,g)var O=g.dgst;g=O,l=Error(s(419)),l.stack="",l.digest=g,Rl({value:l,source:null,stack:null}),t=Lu(e,t,a)}else if(Fe||wl(e,t,a,!1),g=(a&e.childLanes)!==0,Fe||g){if(g=ke,g!==null&&(l=a&-a,l=(l&42)!==0?1:ps(l),l=(l&(g.suspendedLanes|a))!==0?0:l,l!==0&&l!==N.retryLane))throw N.retryLane=l,kn(e,l),wt(g,e,l),Hd;y.data==="$?"||Fu(),t=Lu(e,t,a)}else y.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ue=$t(y.nextSibling),st=t,xe=!0,en=null,Zt=!1,e!==null&&(Lt[zt++]=aa,Lt[zt++]=na,Lt[zt++]=Wa,aa=e.id,na=e.overflow,Wa=t),t=ku(t,l.children),t.flags|=4096);return t}return u?(ja(),u=l.fallback,y=t.mode,N=e.child,O=N.sibling,l=ta(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,O!==null?u=ta(O,u):(u=Pa(u,y,a,null),u.flags|=2),u.return=t,l.return=t,l.sibling=u,t.child=l,l=u,u=t.child,y=e.child.memoizedState,y===null?y=Au(a):(N=y.cachePool,N!==null?(O=Qe._currentValue,N=N.parent!==O?{parent:O,pool:O}:N):N=Df(),y={baseLanes:y.baseLanes|a,cachePool:N}),u.memoizedState=y,u.childLanes=Ou(e,g,a),t.memoizedState=ju,l):(Ca(t),a=e.child,e=a.sibling,a=ta(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function ku(e,t){return t=fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fr(e,t){return e=xt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Lu(e,t,a){return qn(t,e.child,null,a),e=ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jd(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Fs(e.return,t,a)}function zu(e,t,a,l,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=a,c.tailMode=u)}function Fd(e,t,a){var l=t.pendingProps,u=l.revealOrder,c=l.tail;if(Ie(e,t,l.children,a),l=Ze.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jd(e,a,t);else if(e.tag===19)Jd(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}l&=1}switch(Q(Ze,l),u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&sr(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),zu(t,!1,u,a,c);break;case"backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&sr(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}zu(t,!0,a,null,c);break;case"together":zu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ua(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(wl(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=ta(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ta(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Du(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qi(e)))}function ky(e,t,a){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Na(t,Qe,e.memoizedState.cache),El();break;case 27:case 5:os(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ca(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Xd(e,t,a):(Ca(t),e=ua(e,t,a),e!==null?e.sibling:null);Ca(t);break;case 19:var u=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(wl(e,t,a,!1),l=(a&t.childLanes)!==0),u){if(l)return Fd(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Q(Ze,Ze.current),l)break;return null;case 22:case 23:return t.lanes=0,Gd(e,t,a);case 24:Na(t,Qe,e.memoizedState.cache)}return ua(e,t,a)}function Pd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!Du(e,a)&&(t.flags&128)===0)return Fe=!1,ky(e,t,a);Fe=(e.flags&131072)!==0}else Fe=!1,xe&&(t.flags&1048576)!==0&&Cf(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,u=l._init;if(l=u(l._payload),t.type=l,typeof l=="function")Gs(l)?(e=sn(l,e),t.tag=1,t=Zd(null,t,l,e,a)):(t.tag=0,t=Cu(null,t,l,e,a));else{if(l!=null){if(u=l.$$typeof,u===X){t.tag=11,t=Vd(null,t,l,e,a);break e}else if(u===re){t.tag=14,t=$d(null,t,l,e,a);break e}}throw t=Ge(l)||l,Error(s(306,t,""))}}return t;case 0:return Cu(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,u=sn(l,t.pendingProps),Zd(e,t,l,u,a);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var c=t.memoizedState;u=c.element,nu(e,t),Ll(t,l,null,a);var g=t.memoizedState;if(l=g.cache,Na(t,Qe,l),l!==c.cache&&Ps(t,[Qe],a,!0),kl(),l=g.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Kd(e,t,l,a);break e}else if(l!==u){u=Ot(Error(s(424)),t),Rl(u),t=Kd(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=$t(e.firstChild),st=t,xe=!0,en=null,Zt=!0,a=Ad(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(El(),l===u){t=ua(e,t,a);break e}Ie(e,t,l,a)}t=t.child}return t;case 26:return cr(e,t),e===null?(a=tp(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,l=wr(ue.current).createElement(a),l[nt]=t,l[ct]=e,tt(l,a,e),Je(l),t.stateNode=l):t.memoizedState=tp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return os(t),e===null&&xe&&(l=t.stateNode=Wh(t.type,t.pendingProps,ue.current),st=t,Zt=!0,u=Ue,Ua(t.type)?(mo=u,Ue=$t(l.firstChild)):Ue=u),Ie(e,t,t.pendingProps.children,a),cr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((u=l=Ue)&&(l=i0(l,t.type,t.pendingProps,Zt),l!==null?(t.stateNode=l,st=t,Ue=$t(l.firstChild),Zt=!1,u=!0):u=!1),u||tn(t)),os(t),u=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,l=c.children,co(u,c)?l=null:g!==null&&co(u,g)&&(t.flags|=32),t.memoizedState!==null&&(u=ou(e,t,Ey,null,null,a),ei._currentValue=u),cr(e,t),Ie(e,t,l,a),t.child;case 6:return e===null&&xe&&((e=a=Ue)&&(a=r0(a,t.pendingProps,Zt),a!==null?(t.stateNode=a,st=t,Ue=null,e=!0):e=!1),e||tn(t)),null;case 13:return Xd(e,t,a);case 4:return ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=qn(t,null,l,a):Ie(e,t,l,a),t.child;case 11:return Vd(e,t,t.type,t.pendingProps,a);case 7:return Ie(e,t,t.pendingProps,a),t.child;case 8:return Ie(e,t,t.pendingProps.children,a),t.child;case 12:return Ie(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Na(t,t.type,l.value),Ie(e,t,l.children,a),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,nn(t),u=lt(u),l=l(u),t.flags|=1,Ie(e,t,l,a),t.child;case 14:return $d(e,t,t.type,t.pendingProps,a);case 15:return qd(e,t,t.type,t.pendingProps,a);case 19:return Fd(e,t,a);case 31:return l=t.pendingProps,a=t.mode,l={mode:l.mode,children:l.children},e===null?(a=fr(l,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ta(e.child,l),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Gd(e,t,a);case 24:return nn(t),l=lt(Qe),e===null?(u=eu(),u===null&&(u=ke,c=Ws(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=a),u=c),t.memoizedState={parent:l,cache:u},au(t),Na(t,Qe,u)):((e.lanes&a)!==0&&(nu(e,t),Ll(t,null,null,a),kl()),u=e.memoizedState,c=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Na(t,Qe,l)):(l=c.cache,Na(t,Qe,l),l!==u.cache&&Ps(t,[Qe],a,!0))),Ie(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function oa(e){e.flags|=4}function Wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t)){if(t=Dt.current,t!==null&&((ve&4194048)===ve?Kt!==null:(ve&62914560)!==ve&&(ve&536870912)===0||t!==Kt))throw Al=tu,_f;e.flags|=8192}}function dr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ac():536870912,e.lanes|=t,Zn|=t)}function Hl(e,t){if(!xe)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 Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Ly(e,t,a){var l=t.pendingProps;switch(Ks(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Me(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ia(Qe),ya(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Of())),Me(t),null;case 26:return a=t.memoizedState,e===null?(oa(t),a!==null?(Me(t),Wd(t,a)):(Me(t),t.flags&=-16777217)):a?a!==e.memoizedState?(oa(t),Me(t),Wd(t,a)):(Me(t),t.flags&=-16777217):(e.memoizedProps!==l&&oa(t),Me(t),t.flags&=-16777217),null;case 27:Ei(t),a=ue.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Me(t),null}e=I.current,Nl(t)?jf(t):(e=Wh(u,l,a),t.stateNode=e,oa(t))}return Me(t),null;case 5:if(Ei(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Me(t),null}if(e=I.current,Nl(t))jf(t);else{switch(u=wr(ue.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?u.createElement(a,{is:l.is}):u.createElement(a)}}e[nt]=t,e[ct]=l;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(tt(e,a,l),a){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&oa(t)}}return Me(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=ue.current,Nl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,u=st,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[nt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Qh(e.nodeValue,a)),e||tn(t)}else e=wr(e).createTextNode(l),e[nt]=t,t.stateNode=e}return Me(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Nl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[nt]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),u=!1}else u=Of(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(sa(t),t):(sa(t),null)}if(sa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=l!==null,e=e!==null&&e.memoizedState!==null,a){l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool);var c=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==u&&(l.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),dr(t,t.updateQueue),Me(t),null;case 4:return ya(),e===null&&io(t.stateNode.containerInfo),Me(t),null;case 10:return ia(t.type),Me(t),null;case 19:if(Z(Ze),u=t.memoizedState,u===null)return Me(t),null;if(l=(t.flags&128)!==0,c=u.rendering,c===null)if(l)Hl(u,!1);else{if(Be!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=sr(e),c!==null){for(t.flags|=128,Hl(u,!1),e=c.updateQueue,t.updateQueue=e,dr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Tf(a,e),a=a.sibling;return Q(Ze,Ze.current&1|2),t.child}e=e.sibling}u.tail!==null&&Qt()>mr&&(t.flags|=128,l=!0,Hl(u,!1),t.lanes=4194304)}else{if(!l)if(e=sr(c),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,dr(t,e),Hl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!c.alternate&&!xe)return Me(t),null}else 2*Qt()-u.renderingStartTime>mr&&a!==536870912&&(t.flags|=128,l=!0,Hl(u,!1),t.lanes=4194304);u.isBackwards?(c.sibling=t.child,t.child=c):(e=u.last,e!==null?e.sibling=c:t.child=c,u.last=c)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Qt(),t.sibling=null,e=Ze.current,Q(Ze,l?e&1|2:e&1),t):(Me(t),null);case 22:case 23:return sa(t),su(),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&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),a=t.updateQueue,a!==null&&dr(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&&Z(ln),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ia(Qe),Me(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function zy(e,t){switch(Ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(Qe),ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ei(t),null;case 13:if(sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(Ze),null;case 4:return ya(),null;case 10:return ia(t.type),null;case 22:case 23:return sa(t),su(),e!==null&&Z(ln),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(Qe),null;case 25:return null;default:return null}}function Id(e,t){switch(Ks(t),t.tag){case 3:ia(Qe),ya();break;case 26:case 27:case 5:Ei(t);break;case 4:ya();break;case 13:sa(t);break;case 19:Z(Ze);break;case 10:ia(t.type);break;case 22:case 23:sa(t),su(),e!==null&&Z(ln);break;case 24:ia(Qe)}}function Vl(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){l=void 0;var c=a.create,g=a.inst;l=c(),g.destroy=l}a=a.next}while(a!==u)}}catch(y){Ae(t,t.return,y)}}function Aa(e,t,a){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var c=u.next;l=c;do{if((l.tag&e)===e){var g=l.inst,y=g.destroy;if(y!==void 0){g.destroy=void 0,u=t;var N=a,O=y;try{O()}catch(B){Ae(u,N,B)}}}l=l.next}while(l!==c)}}catch(B){Ae(t,t.return,B)}}function eh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{$f(t,a)}catch(l){Ae(e,e.return,l)}}}function th(e,t,a){a.props=sn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ae(e,t,l)}}function $l(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(u){Ae(e,t,u)}}function Xt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Ae(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ae(e,t,u)}else a.current=null}function ah(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(u){Ae(e,e.return,u)}}function _u(e,t,a){try{var l=e.stateNode;e0(l,e.type,a,t),l[ct]=t}catch(u){Ae(e,e.return,u)}}function nh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function Mu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nh(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&&Ua(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 Uu(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=Rr));else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,a),e=e.sibling;e!==null;)Uu(e,t,a),e=e.sibling}function hr(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&&Ua(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hr(e,t,a),e=e.sibling;e!==null;)hr(e,t,a),e=e.sibling}function lh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);tt(t,l,a),t[nt]=e,t[ct]=a}catch(c){Ae(e,e.return,c)}}var ca=!1,Ve=!1,Bu=!1,ih=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Dy(e,t){if(e=e.containerInfo,uo=kr,e=gf(e),Ms(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 u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var g=0,y=-1,N=-1,O=0,B=0,q=e,k=null;t:for(;;){for(var z;q!==a||u!==0&&q.nodeType!==3||(y=g+u),q!==c||l!==0&&q.nodeType!==3||(N=g+l),q.nodeType===3&&(g+=q.nodeValue.length),(z=q.firstChild)!==null;)k=q,q=z;for(;;){if(q===e)break t;if(k===a&&++O===u&&(y=g),k===c&&++B===l&&(N=g),(z=q.nextSibling)!==null)break;q=k,k=q.parentNode}q=z}a=y===-1||N===-1?null:{start:y,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(oo={focusedElem:e,selectionRange:a},kr=!1,Pe=t;Pe!==null;)if(t=Pe,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Pe=e;else for(;Pe!==null;){switch(t=Pe,c=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,u=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var le=sn(a.type,u,a.elementType===a.type);e=l.getSnapshotBeforeUpdate(le,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){Ae(a,a.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)ho(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ho(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,Pe=e;break}Pe=t.return}}function rh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Oa(e,a),l&4&&Vl(5,a);break;case 1:if(Oa(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Ae(a,a.return,g)}else{var u=sn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ae(a,a.return,g)}}l&64&&eh(a),l&512&&$l(a,a.return);break;case 3:if(Oa(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{$f(e,t)}catch(g){Ae(a,a.return,g)}}break;case 27:t===null&&l&4&&lh(a);case 26:case 5:Oa(e,a),t===null&&l&4&&ah(a),l&512&&$l(a,a.return);break;case 12:Oa(e,a);break;case 13:Oa(e,a),l&4&&oh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Gy.bind(null,a),s0(e,a))));break;case 22:if(l=a.memoizedState!==null||ca,!l){t=t!==null&&t.memoizedState!==null||Ve,u=ca;var c=Ve;ca=l,(Ve=t)&&!c?ka(e,a,(a.subtreeFlags&8772)!==0):Oa(e,a),ca=u,Ve=c}break;case 30:break;default:Oa(e,a)}}function sh(e){var t=e.alternate;t!==null&&(e.alternate=null,sh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vs(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 De=null,ht=!1;function fa(e,t,a){for(a=a.child;a!==null;)uh(e,t,a),a=a.sibling}function uh(e,t,a){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(ul,a)}catch{}switch(a.tag){case 26:Ve||Xt(a,t),fa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ve||Xt(a,t);var l=De,u=ht;Ua(a.type)&&(De=a.stateNode,ht=!1),fa(e,t,a),Fl(a.stateNode),De=l,ht=u;break;case 5:Ve||Xt(a,t);case 6:if(l=De,u=ht,De=null,fa(e,t,a),De=l,ht=u,De!==null)if(ht)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(a.stateNode)}catch(c){Ae(a,t,c)}else try{De.removeChild(a.stateNode)}catch(c){Ae(a,t,c)}break;case 18:De!==null&&(ht?(e=De,Fh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),li(e)):Fh(De,a.stateNode));break;case 4:l=De,u=ht,De=a.stateNode.containerInfo,ht=!0,fa(e,t,a),De=l,ht=u;break;case 0:case 11:case 14:case 15:Ve||Aa(2,a,t),Ve||Aa(4,a,t),fa(e,t,a);break;case 1:Ve||(Xt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&th(a,t,l)),fa(e,t,a);break;case 21:fa(e,t,a);break;case 22:Ve=(l=Ve)||a.memoizedState!==null,fa(e,t,a),Ve=l;break;default:fa(e,t,a)}}function oh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(a){Ae(t,t.return,a)}}function _y(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ih),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ih),t;default:throw Error(s(435,e.tag))}}function Hu(e,t){var a=_y(e);t.forEach(function(l){var u=Yy.bind(null,e,l);a.has(l)||(a.add(l),l.then(u,u))})}function St(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var u=a[l],c=e,g=t,y=g;e:for(;y!==null;){switch(y.tag){case 27:if(Ua(y.type)){De=y.stateNode,ht=!1;break e}break;case 5:De=y.stateNode,ht=!1;break e;case 3:case 4:De=y.stateNode.containerInfo,ht=!0;break e}y=y.return}if(De===null)throw Error(s(160));uh(c,g,u),De=null,ht=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ch(t,e),t=t.sibling}var Vt=null;function ch(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),Nt(e),l&4&&(Aa(3,e,e.return),Vl(3,e),Aa(5,e,e.return));break;case 1:St(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),l&64&&ca&&(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 u=Vt;if(St(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),l&4){var c=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,u=u.ownerDocument||u;t:switch(l){case"title":c=u.getElementsByTagName("title")[0],(!c||c[fl]||c[nt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(l),u.head.insertBefore(c,u.querySelector("head > title"))),tt(c,l,a),c[nt]=e,Je(c),l=c;break e;case"link":var g=lp("link","href",u).get(l+(a.href||""));if(g){for(var y=0;y<g.length;y++)if(c=g[y],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(y,1);break t}}c=u.createElement(l),tt(c,l,a),u.head.appendChild(c);break;case"meta":if(g=lp("meta","content",u).get(l+(a.content||""))){for(y=0;y<g.length;y++)if(c=g[y],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(y,1);break t}}c=u.createElement(l),tt(c,l,a),u.head.appendChild(c);break;default:throw Error(s(468,l))}c[nt]=e,Je(c),l=c}e.stateNode=l}else ip(u,e.type,e.stateNode);else e.stateNode=np(u,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?ip(u,e.type,e.stateNode):np(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_u(e,e.memoizedProps,a.memoizedProps)}break;case 27:St(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),a!==null&&l&4&&_u(e,e.memoizedProps,a.memoizedProps);break;case 5:if(St(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),e.flags&32){u=e.stateNode;try{Rn(u,"")}catch(z){Ae(e,e.return,z)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,_u(e,u,a!==null?a.memoizedProps:u)),l&1024&&(Bu=!0);break;case 6:if(St(t,e),Nt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(z){Ae(e,e.return,z)}}break;case 3:if(jr=null,u=Vt,Vt=Tr(t.containerInfo),St(t,e),Vt=u,Nt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(z){Ae(e,e.return,z)}Bu&&(Bu=!1,fh(e));break;case 4:l=Vt,Vt=Tr(e.stateNode.containerInfo),St(t,e),Nt(e),Vt=l;break;case 12:St(t,e),Nt(e);break;case 13:St(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Qu=Qt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hu(e,l)));break;case 22:u=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,O=ca,B=Ve;if(ca=O||u,Ve=B||N,St(t,e),Ve=B,ca=O,Nt(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||N||ca||Ve||un(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(c=N.stateNode,u)g=c.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{y=N.stateNode;var q=N.memoizedProps.style,k=q!=null&&q.hasOwnProperty("display")?q.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(z){Ae(N,N.return,z)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=u?"":N.memoizedProps}catch(z){Ae(N,N.return,z)}}}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,Hu(e,a))));break;case 19:St(t,e),Nt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hu(e,l)));break;case 30:break;case 21:break;default:St(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(nh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var u=a.stateNode,c=Mu(e);hr(e,c,u);break;case 5:var g=a.stateNode;a.flags&32&&(Rn(g,""),a.flags&=-33);var y=Mu(e);hr(e,y,g);break;case 3:case 4:var N=a.stateNode.containerInfo,O=Mu(e);Uu(e,O,N);break;default:throw Error(s(161))}}catch(B){Ae(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Oa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rh(e,t.alternate,t),t=t.sibling}function un(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),un(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&th(t,t.return,a),un(t);break;case 27:Fl(t.stateNode);case 26:case 5:Xt(t,t.return),un(t);break;case 22:t.memoizedState===null&&un(t);break;case 30:un(t);break;default:un(t)}e=e.sibling}}function ka(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,c=t,g=c.flags;switch(c.tag){case 0:case 11:case 15:ka(u,c,a),Vl(4,c);break;case 1:if(ka(u,c,a),l=c,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(O){Ae(l,l.return,O)}if(l=c,u=l.updateQueue,u!==null){var y=l.stateNode;try{var N=u.shared.hiddenCallbacks;if(N!==null)for(u.shared.hiddenCallbacks=null,u=0;u<N.length;u++)Vf(N[u],y)}catch(O){Ae(l,l.return,O)}}a&&g&64&&eh(c),$l(c,c.return);break;case 27:lh(c);case 26:case 5:ka(u,c,a),a&&l===null&&g&4&&ah(c),$l(c,c.return);break;case 12:ka(u,c,a);break;case 13:ka(u,c,a),a&&g&4&&oh(u,c);break;case 22:c.memoizedState===null&&ka(u,c,a),$l(c,c.return);break;case 30:break;default:ka(u,c,a)}t=t.sibling}}function Vu(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&&Tl(a))}function $u(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Tl(e))}function Jt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dh(e,t,a,l),t=t.sibling}function dh(e,t,a,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,a,l),u&2048&&Vl(9,t);break;case 1:Jt(e,t,a,l);break;case 3:Jt(e,t,a,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Tl(e)));break;case 12:if(u&2048){Jt(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,g=c.id,y=c.onPostCommit;typeof y=="function"&&y(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ae(t,t.return,N)}}else Jt(e,t,a,l);break;case 13:Jt(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,g=t.alternate,t.memoizedState!==null?c._visibility&2?Jt(e,t,a,l):ql(e,t):c._visibility&2?Jt(e,t,a,l):(c._visibility|=2,Gn(e,t,a,l,(t.subtreeFlags&10256)!==0)),u&2048&&Vu(g,t);break;case 24:Jt(e,t,a,l),u&2048&&$u(t.alternate,t);break;default:Jt(e,t,a,l)}}function Gn(e,t,a,l,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var c=e,g=t,y=a,N=l,O=g.flags;switch(g.tag){case 0:case 11:case 15:Gn(c,g,y,N,u),Vl(8,g);break;case 23:break;case 22:var B=g.stateNode;g.memoizedState!==null?B._visibility&2?Gn(c,g,y,N,u):ql(c,g):(B._visibility|=2,Gn(c,g,y,N,u)),u&&O&2048&&Vu(g.alternate,g);break;case 24:Gn(c,g,y,N,u),u&&O&2048&&$u(g.alternate,g);break;default:Gn(c,g,y,N,u)}t=t.sibling}}function ql(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,u=l.flags;switch(l.tag){case 22:ql(a,l),u&2048&&Vu(l.alternate,l);break;case 24:ql(a,l),u&2048&&$u(l.alternate,l);break;default:ql(a,l)}t=t.sibling}}var Gl=8192;function Yn(e){if(e.subtreeFlags&Gl)for(e=e.child;e!==null;)hh(e),e=e.sibling}function hh(e){switch(e.tag){case 26:Yn(e),e.flags&Gl&&e.memoizedState!==null&&x0(Vt,e.memoizedState,e.memoizedProps);break;case 5:Yn(e);break;case 3:case 4:var t=Vt;Vt=Tr(e.stateNode.containerInfo),Yn(e),Vt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gl,Gl=16777216,Yn(e),Gl=t):Yn(e));break;default:Yn(e)}}function ph(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 Yl(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];Pe=l,gh(l,e)}ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mh(e),e=e.sibling}function mh(e){switch(e.tag){case 0:case 11:case 15:Yl(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:Yl(e);break;case 12:Yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,pr(e)):Yl(e);break;default:Yl(e)}}function pr(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];Pe=l,gh(l,e)}ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),pr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,pr(t));break;default:pr(t)}e=e.sibling}}function gh(e,t){for(;Pe!==null;){var a=Pe;switch(a.tag){case 0:case 11:case 15:Aa(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:Tl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Pe=l;else e:for(a=e;Pe!==null;){l=Pe;var u=l.sibling,c=l.return;if(sh(l),l===a){Pe=null;break e}if(u!==null){u.return=c,Pe=u;break e}Pe=c}}}var My={getCacheForType:function(e){var t=lt(Qe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Uy=typeof WeakMap=="function"?WeakMap:Map,Ne=0,ke=null,de=null,ve=0,Ee=0,Et=null,La=!1,Qn=!1,qu=!1,da=0,Be=0,za=0,on=0,Gu=0,_t=0,Zn=0,Ql=null,pt=null,Yu=!1,Qu=0,mr=1/0,gr=null,Da=null,et=0,_a=null,Kn=null,Xn=0,Zu=0,Ku=null,vh=null,Zl=0,Xu=null;function Rt(){if((Ne&2)!==0&&ve!==0)return ve&-ve;if(_.T!==null){var e=_n;return e!==0?e:to()}return Lc()}function yh(){_t===0&&(_t=(ve&536870912)===0||xe?jc():536870912);var e=Dt.current;return e!==null&&(e.flags|=32),_t}function wt(e,t,a){(e===ke&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Jn(e,0),Ma(e,ve,_t,!1)),cl(e,a),((Ne&2)===0||e!==ke)&&(e===ke&&((Ne&2)===0&&(on|=a),Be===4&&Ma(e,ve,_t,!1)),Ft(e))}function bh(e,t,a){if((Ne&6)!==0)throw Error(s(327));var l=!a&&(t&124)===0&&(t&e.expiredLanes)===0||ol(e,t),u=l?Vy(e,t):Pu(e,t,!0),c=l;do{if(u===0){Qn&&!l&&Ma(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!By(a)){u=Pu(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var y=e;u=Ql;var N=y.current.memoizedState.isDehydrated;if(N&&(Jn(y,g).flags|=256),g=Pu(y,g,!1),g!==2){if(qu&&!N){y.errorRecoveryDisabledLanes|=c,on|=c,u=4;break e}c=pt,pt=u,c!==null&&(pt===null?pt=c:pt.push.apply(pt,c))}u=g}if(c=!1,u!==2)continue}}if(u===1){Jn(e,0),Ma(e,t,0,!0);break}e:{switch(l=e,c=u,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ma(l,t,_t,!La);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(u=Qu+300-Qt(),10<u)){if(Ma(l,t,_t,!La),Ci(l,0,!0)!==0)break e;l.timeoutHandle=Xh(xh.bind(null,l,a,pt,gr,Yu,t,_t,on,Zn,La,c,2,-0,0),u);break e}xh(l,a,pt,gr,Yu,t,_t,on,Zn,La,c,0,-0,0)}}break}while(!0);Ft(e)}function xh(e,t,a,l,u,c,g,y,N,O,B,q,k,z){if(e.timeoutHandle=-1,q=t.subtreeFlags,(q&8192||(q&16785408)===16785408)&&(Il={stylesheets:null,count:0,unsuspend:b0},hh(t),q=S0(),q!==null)){e.cancelPendingCommit=q(Ch.bind(null,e,t,c,a,l,u,g,y,N,B,1,k,z)),Ma(e,c,g,!O);return}Ch(e,t,c,a,l,u,g,y,N)}function By(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 u=a[l],c=u.getSnapshot;u=u.value;try{if(!bt(c(),u))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 Ma(e,t,a,l){t&=~Gu,t&=~on,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var c=31-yt(u),g=1<<c;l[c]=-1,u&=~g}a!==0&&Oc(e,a,t)}function vr(){return(Ne&6)===0?(Kl(0),!1):!0}function Ju(){if(de!==null){if(Ee===0)var e=de.return;else e=de,la=an=null,du(e),$n=null,Ul=0,e=de;for(;e!==null;)Id(e.alternate,e),e=e.return;de=null}}function Jn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,a0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ju(),ke=e,de=a=ta(e.current,null),ve=t,Ee=0,Et=null,La=!1,Qn=ol(e,t),qu=!1,Zn=_t=Gu=on=za=Be=0,pt=Ql=null,Yu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var u=31-yt(l),c=1<<u;t|=e[u],l&=~c}return da=t,Hi(),a}function Sh(e,t){ce=null,_.H=lr,t===jl||t===Xi?(t=Bf(),Ee=3):t===_f?(t=Bf(),Ee=4):Ee=t===Hd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Et=t,de===null&&(Be=1,or(e,Ot(t,e.current)))}function Nh(){var e=_.H;return _.H=lr,e===null?lr:e}function Eh(){var e=_.A;return _.A=My,e}function Fu(){Be=4,La||(ve&4194048)!==ve&&Dt.current!==null||(Qn=!0),(za&134217727)===0&&(on&134217727)===0||ke===null||Ma(ke,ve,_t,!1)}function Pu(e,t,a){var l=Ne;Ne|=2;var u=Nh(),c=Eh();(ke!==e||ve!==t)&&(gr=null,Jn(e,t)),t=!1;var g=Be;e:do try{if(Ee!==0&&de!==null){var y=de,N=Et;switch(Ee){case 8:Ju(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var O=Ee;if(Ee=0,Et=null,Fn(e,y,N,O),a&&Qn){g=0;break e}break;default:O=Ee,Ee=0,Et=null,Fn(e,y,N,O)}}Hy(),g=Be;break}catch(B){Sh(e,B)}while(!0);return t&&e.shellSuspendCounter++,la=an=null,Ne=l,_.H=u,_.A=c,de===null&&(ke=null,ve=0,Hi()),g}function Hy(){for(;de!==null;)Rh(de)}function Vy(e,t){var a=Ne;Ne|=2;var l=Nh(),u=Eh();ke!==e||ve!==t?(gr=null,mr=Qt()+500,Jn(e,t)):Qn=ol(e,t);e:do try{if(Ee!==0&&de!==null){t=de;var c=Et;t:switch(Ee){case 1:Ee=0,Et=null,Fn(e,t,c,1);break;case 2:case 9:if(Mf(c)){Ee=0,Et=null,wh(t);break}t=function(){Ee!==2&&Ee!==9||ke!==e||(Ee=7),Ft(e)},c.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Mf(c)?(Ee=0,Et=null,wh(t)):(Ee=0,Et=null,Fn(e,t,c,7));break;case 5:var g=null;switch(de.tag){case 26:g=de.memoizedState;case 5:case 27:var y=de;if(!g||rp(g)){Ee=0,Et=null;var N=y.sibling;if(N!==null)de=N;else{var O=y.return;O!==null?(de=O,yr(O)):de=null}break t}}Ee=0,Et=null,Fn(e,t,c,5);break;case 6:Ee=0,Et=null,Fn(e,t,c,6);break;case 8:Ju(),Be=6;break e;default:throw Error(s(462))}}$y();break}catch(B){Sh(e,B)}while(!0);return la=an=null,_.H=l,_.A=u,Ne=a,de!==null?0:(ke=null,ve=0,Hi(),Be)}function $y(){for(;de!==null&&!ov();)Rh(de)}function Rh(e){var t=Pd(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?yr(e):de=t}function wh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Qd(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Qd(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:du(t);default:Id(a,t),t=de=Tf(t,da),t=Pd(a,t,da)}e.memoizedProps=e.pendingProps,t===null?yr(e):de=t}function Fn(e,t,a,l){la=an=null,du(t),$n=null,Ul=0;var u=t.return;try{if(Oy(e,u,t,a,ve)){Be=1,or(e,Ot(a,e.current)),de=null;return}}catch(c){if(u!==null)throw de=u,c;Be=1,or(e,Ot(a,e.current)),de=null;return}t.flags&32768?(xe||l===1?e=!0:Qn||(ve&536870912)!==0?e=!1:(La=e=!0,(l===2||l===9||l===3||l===6)&&(l=Dt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Th(t,e)):yr(t)}function yr(e){var t=e;do{if((t.flags&32768)!==0){Th(t,La);return}e=t.return;var a=Ly(t.alternate,t,da);if(a!==null){de=a;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Be===0&&(Be=5)}function Th(e,t){do{var a=zy(e.alternate,e);if(a!==null){a.flags&=32767,de=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=a}while(e!==null);Be=6,de=null}function Ch(e,t,a,l,u,c,g,y,N){e.cancelPendingCommit=null;do br();while(et!==0);if((Ne&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=$s,bv(e,a,c,g,y,N),e===ke&&(de=ke=null,ve=0),Kn=t,_a=e,Xn=a,Zu=c,Ku=u,vh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qy(Ri,function(){return Lh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=_.T,_.T=null,u=Y.p,Y.p=2,g=Ne,Ne|=4;try{Dy(e,t,a)}finally{Ne=g,Y.p=u,_.T=l}}et=1,jh(),Ah(),Oh()}}function jh(){if(et===1){et=0;var e=_a,t=Kn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=_.T,_.T=null;var l=Y.p;Y.p=2;var u=Ne;Ne|=4;try{ch(t,e);var c=oo,g=gf(e.containerInfo),y=c.focusedElem,N=c.selectionRange;if(g!==y&&y&&y.ownerDocument&&mf(y.ownerDocument.documentElement,y)){if(N!==null&&Ms(y)){var O=N.start,B=N.end;if(B===void 0&&(B=O),"selectionStart"in y)y.selectionStart=O,y.selectionEnd=Math.min(B,y.value.length);else{var q=y.ownerDocument||document,k=q&&q.defaultView||window;if(k.getSelection){var z=k.getSelection(),le=y.textContent.length,te=Math.min(N.start,le),je=N.end===void 0?te:Math.min(N.end,le);!z.extend&&te>je&&(g=je,je=te,te=g);var j=pf(y,te),T=pf(y,je);if(j&&T&&(z.rangeCount!==1||z.anchorNode!==j.node||z.anchorOffset!==j.offset||z.focusNode!==T.node||z.focusOffset!==T.offset)){var A=q.createRange();A.setStart(j.node,j.offset),z.removeAllRanges(),te>je?(z.addRange(A),z.extend(T.node,T.offset)):(A.setEnd(T.node,T.offset),z.addRange(A))}}}}for(q=[],z=y;z=z.parentNode;)z.nodeType===1&&q.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<q.length;y++){var H=q[y];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}kr=!!uo,oo=uo=null}finally{Ne=u,Y.p=l,_.T=a}}e.current=t,et=2}}function Ah(){if(et===2){et=0;var e=_a,t=Kn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=_.T,_.T=null;var l=Y.p;Y.p=2;var u=Ne;Ne|=4;try{rh(e,t.alternate,t)}finally{Ne=u,Y.p=l,_.T=a}}et=3}}function Oh(){if(et===4||et===3){et=0,cv();var e=_a,t=Kn,a=Xn,l=vh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Kn=_a=null,kh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Da=null),ms(a),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(ul,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=_.T,u=Y.p,Y.p=2,_.T=null;try{for(var c=e.onRecoverableError,g=0;g<l.length;g++){var y=l[g];c(y.value,{componentStack:y.stack})}}finally{_.T=t,Y.p=u}}(Xn&3)!==0&&br(),Ft(e),u=e.pendingLanes,(a&4194090)!==0&&(u&42)!==0?e===Xu?Zl++:(Zl=0,Xu=e):Zl=0,Kl(0)}}function kh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Tl(t)))}function br(e){return jh(),Ah(),Oh(),Lh()}function Lh(){if(et!==5)return!1;var e=_a,t=Zu;Zu=0;var a=ms(Xn),l=_.T,u=Y.p;try{Y.p=32>a?32:a,_.T=null,a=Ku,Ku=null;var c=_a,g=Xn;if(et=0,Kn=_a=null,Xn=0,(Ne&6)!==0)throw Error(s(331));var y=Ne;if(Ne|=4,mh(c.current),dh(c,c.current,g,a),Ne=y,Kl(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(ul,c)}catch{}return!0}finally{Y.p=u,_.T=l,kh(e,t)}}function zh(e,t,a){t=Ot(a,t),t=Tu(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(cl(e,2),Ft(e))}function Ae(e,t,a){if(e.tag===3)zh(e,e,a);else for(;t!==null;){if(t.tag===3){zh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Da===null||!Da.has(l))){e=Ot(a,e),a=Ud(2),l=wa(t,a,2),l!==null&&(Bd(a,l,t,e),cl(l,2),Ft(l));break}}t=t.return}}function Wu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Uy;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(a)||(qu=!0,u.add(a),e=qy.bind(null,e,t,a),t.then(e,e))}function qy(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ke===e&&(ve&a)===a&&(Be===4||Be===3&&(ve&62914560)===ve&&300>Qt()-Qu?(Ne&2)===0&&Jn(e,0):Gu|=a,Zn===ve&&(Zn=0)),Ft(e)}function Dh(e,t){t===0&&(t=Ac()),e=kn(e,t),e!==null&&(cl(e,t),Ft(e))}function Gy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Dh(e,a)}function Yy(e,t){var a=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(a=u.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),Dh(e,a)}function Qy(e,t){return fs(e,t)}var xr=null,Pn=null,Iu=!1,Sr=!1,eo=!1,cn=0;function Ft(e){e!==Pn&&e.next===null&&(Pn===null?xr=Pn=e:Pn=Pn.next=e),Sr=!0,Iu||(Iu=!0,Ky())}function Kl(e,t){if(!eo&&Sr){eo=!0;do for(var a=!1,l=xr;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var c=0;else{var g=l.suspendedLanes,y=l.pingedLanes;c=(1<<31-yt(42|e)+1)-1,c&=u&~(g&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Bh(l,c))}else c=ve,c=Ci(l,l===ke?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||ol(l,c)||(a=!0,Bh(l,c));l=l.next}while(a);eo=!1}}function Zy(){_h()}function _h(){Sr=Iu=!1;var e=0;cn!==0&&(t0()&&(e=cn),cn=0);for(var t=Qt(),a=null,l=xr;l!==null;){var u=l.next,c=Mh(l,t);c===0?(l.next=null,a===null?xr=u:a.next=u,u===null&&(Pn=a)):(a=l,(e!==0||(c&3)!==0)&&(Sr=!0)),l=u}Kl(e)}function Mh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-yt(c),y=1<<g,N=u[g];N===-1?((y&a)===0||(y&l)!==0)&&(u[g]=yv(y,t)):N<=t&&(e.expiredLanes|=y),c&=~y}if(t=ke,a=ve,a=Ci(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ds(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&ds(l),ms(a)){case 2:case 8:a=Tc;break;case 32:a=Ri;break;case 268435456:a=Cc;break;default:a=Ri}return l=Uh.bind(null,e),a=fs(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&ds(l),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(br()&&e.callbackNode!==a)return null;var l=ve;return l=Ci(e,e===ke?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(bh(e,l,t),Mh(e,Qt()),e.callbackNode!=null&&e.callbackNode===a?Uh.bind(null,e):null)}function Bh(e,t){if(br())return null;bh(e,t,!0)}function Ky(){n0(function(){(Ne&6)!==0?fs(wc,Zy):_h()})}function to(){return cn===0&&(cn=jc()),cn}function Hh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Li(""+e)}function Vh(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 Xy(e,t,a,l,u){if(t==="submit"&&a&&a.stateNode===u){var c=Hh((u[ct]||null).action),g=l.submitter;g&&(t=(t=g[ct]||null)?Hh(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var y=new Mi("action","action",null,l,u);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(cn!==0){var N=g?Vh(u,g):new FormData(u);Su(a,{pending:!0,data:N,method:u.method,action:c},null,N)}}else typeof c=="function"&&(y.preventDefault(),N=g?Vh(u,g):new FormData(u),Su(a,{pending:!0,data:N,method:u.method,action:c},c,N))},currentTarget:u}]})}}for(var ao=0;ao<Vs.length;ao++){var no=Vs[ao],Jy=no.toLowerCase(),Fy=no[0].toUpperCase()+no.slice(1);Ht(Jy,"on"+Fy)}Ht(bf,"onAnimationEnd"),Ht(xf,"onAnimationIteration"),Ht(Sf,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(hy,"onTransitionRun"),Ht(py,"onTransitionStart"),Ht(my,"onTransitionCancel"),Ht(Nf,"onTransitionEnd"),Sn("onMouseEnter",["mouseout","mouseover"]),Sn("onMouseLeave",["mouseout","mouseover"]),Sn("onPointerEnter",["pointerout","pointerover"]),Sn("onPointerLeave",["pointerout","pointerover"]),Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="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(" "),Py=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xl));function $h(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],u=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var g=l.length-1;0<=g;g--){var y=l[g],N=y.instance,O=y.currentTarget;if(y=y.listener,N!==c&&u.isPropagationStopped())break e;c=y,u.currentTarget=O;try{c(u)}catch(B){ur(B)}u.currentTarget=null,c=N}else for(g=0;g<l.length;g++){if(y=l[g],N=y.instance,O=y.currentTarget,y=y.listener,N!==c&&u.isPropagationStopped())break e;c=y,u.currentTarget=O;try{c(u)}catch(B){ur(B)}u.currentTarget=null,c=N}}}}function he(e,t){var a=t[gs];a===void 0&&(a=t[gs]=new Set);var l=e+"__bubble";a.has(l)||(qh(t,e,2,!1),a.add(l))}function lo(e,t,a){var l=0;t&&(l|=4),qh(a,e,l,t)}var Nr="_reactListening"+Math.random().toString(36).slice(2);function io(e){if(!e[Nr]){e[Nr]=!0,Dc.forEach(function(a){a!=="selectionchange"&&(Py.has(a)||lo(a,!1,e),lo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nr]||(t[Nr]=!0,lo("selectionchange",!1,t))}}function qh(e,t,a,l){switch(dp(t)){case 2:var u=R0;break;case 8:u=w0;break;default:u=xo}a=u.bind(null,t,a,e),u=void 0,!Cs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function ro(e,t,a,l,u){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var y=l.stateNode.containerInfo;if(y===u)break;if(g===4)for(g=l.return;g!==null;){var N=g.tag;if((N===3||N===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;y!==null;){if(g=yn(y),g===null)return;if(N=g.tag,N===5||N===6||N===26||N===27){l=c=g;continue e}y=y.parentNode}}l=l.return}Xc(function(){var O=c,B=ws(a),q=[];e:{var k=Ef.get(e);if(k!==void 0){var z=Mi,le=e;switch(e){case"keypress":if(Di(a)===0)break e;case"keydown":case"keyup":z=Qv;break;case"focusin":le="focus",z=ks;break;case"focusout":le="blur",z=ks;break;case"beforeblur":case"afterblur":z=ks;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":z=Pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=zv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Xv;break;case bf:case xf:case Sf:z=Mv;break;case Nf:z=Fv;break;case"scroll":case"scrollend":z=kv;break;case"wheel":z=Wv;break;case"copy":case"cut":case"paste":z=Bv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Ic;break;case"toggle":case"beforetoggle":z=ey}var te=(t&4)!==0,je=!te&&(e==="scroll"||e==="scrollend"),j=te?k!==null?k+"Capture":null:k;te=[];for(var T=O,A;T!==null;){var H=T;if(A=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||A===null||j===null||(H=hl(T,j),H!=null&&te.push(Jl(T,H,A))),je)break;T=T.return}0<te.length&&(k=new z(k,le,null,a,B),q.push({event:k,listeners:te}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",k&&a!==Rs&&(le=a.relatedTarget||a.fromElement)&&(yn(le)||le[vn]))break e;if((z||k)&&(k=B.window===B?B:(k=B.ownerDocument)?k.defaultView||k.parentWindow:window,z?(le=a.relatedTarget||a.toElement,z=O,le=le?yn(le):null,le!==null&&(je=f(le),te=le.tag,le!==je||te!==5&&te!==27&&te!==6)&&(le=null)):(z=null,le=O),z!==le)){if(te=Pc,H="onMouseLeave",j="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(te=Ic,H="onPointerLeave",j="onPointerEnter",T="pointer"),je=z==null?k:dl(z),A=le==null?k:dl(le),k=new te(H,T+"leave",z,a,B),k.target=je,k.relatedTarget=A,H=null,yn(B)===O&&(te=new te(j,T+"enter",le,a,B),te.target=A,te.relatedTarget=je,H=te),je=H,z&&le)t:{for(te=z,j=le,T=0,A=te;A;A=Wn(A))T++;for(A=0,H=j;H;H=Wn(H))A++;for(;0<T-A;)te=Wn(te),T--;for(;0<A-T;)j=Wn(j),A--;for(;T--;){if(te===j||j!==null&&te===j.alternate)break t;te=Wn(te),j=Wn(j)}te=null}else te=null;z!==null&&Gh(q,k,z,te,!1),le!==null&&je!==null&&Gh(q,je,le,te,!0)}}e:{if(k=O?dl(O):window,z=k.nodeName&&k.nodeName.toLowerCase(),z==="select"||z==="input"&&k.type==="file")var J=uf;else if(rf(k))if(of)J=cy;else{J=uy;var fe=sy}else z=k.nodeName,!z||z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?O&&Es(O.elementType)&&(J=uf):J=oy;if(J&&(J=J(e,O))){sf(q,J,a,B);break e}fe&&fe(e,k,O),e==="focusout"&&O&&k.type==="number"&&O.memoizedProps.value!=null&&Ns(k,"number",k.value)}switch(fe=O?dl(O):window,e){case"focusin":(rf(fe)||fe.contentEditable==="true")&&(jn=fe,Us=O,Sl=null);break;case"focusout":Sl=Us=jn=null;break;case"mousedown":Bs=!0;break;case"contextmenu":case"mouseup":case"dragend":Bs=!1,vf(q,a,B);break;case"selectionchange":if(dy)break;case"keydown":case"keyup":vf(q,a,B)}var P;if(zs)e:{switch(e){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Cn?nf(e,a)&&(ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ae="onCompositionStart");ae&&(ef&&a.locale!=="ko"&&(Cn||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Cn&&(P=Jc()):(Sa=B,js="value"in Sa?Sa.value:Sa.textContent,Cn=!0)),fe=Er(O,ae),0<fe.length&&(ae=new Wc(ae,e,null,a,B),q.push({event:ae,listeners:fe}),P?ae.data=P:(P=lf(a),P!==null&&(ae.data=P)))),(P=ay?ny(e,a):ly(e,a))&&(ae=Er(O,"onBeforeInput"),0<ae.length&&(fe=new Wc("onBeforeInput","beforeinput",null,a,B),q.push({event:fe,listeners:ae}),fe.data=P)),Xy(q,e,O,a,B)}$h(q,t)})}function Jl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Er(e,t){for(var a=t+"Capture",l=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=hl(e,a),u!=null&&l.unshift(Jl(e,u,c)),u=hl(e,t),u!=null&&l.push(Jl(e,u,c))),e.tag===3)return l;e=e.return}return[]}function Wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gh(e,t,a,l,u){for(var c=t._reactName,g=[];a!==null&&a!==l;){var y=a,N=y.alternate,O=y.stateNode;if(y=y.tag,N!==null&&N===l)break;y!==5&&y!==26&&y!==27||O===null||(N=O,u?(O=hl(a,c),O!=null&&g.unshift(Jl(a,O,N))):u||(O=hl(a,c),O!=null&&g.push(Jl(a,O,N)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var Wy=/\r\n?/g,Iy=/\u0000|\uFFFD/g;function Yh(e){return(typeof e=="string"?e:""+e).replace(Wy,`
59
+ `).replace(Iy,"")}function Qh(e,t){return t=Yh(t),Yh(e)===t}function Rr(){}function Ce(e,t,a,l,u,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Rn(e,""+l);break;case"className":Ai(e,"class",l);break;case"tabIndex":Ai(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ai(e,a,l);break;case"style":Zc(e,l,c);break;case"data":if(t!=="object"){Ai(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=Li(""+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 c=="function"&&(a==="formAction"?(t!=="input"&&Ce(e,t,"name",u.name,u,null),Ce(e,t,"formEncType",u.formEncType,u,null),Ce(e,t,"formMethod",u.formMethod,u,null),Ce(e,t,"formTarget",u.formTarget,u,null)):(Ce(e,t,"encType",u.encType,u,null),Ce(e,t,"method",u.method,u,null),Ce(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Li(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Rr);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("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(u.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=Li(""+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":he("beforetoggle",e),he("toggle",e),ji(e,"popover",l);break;case"xlinkActuate":It(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":It(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":It(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":It(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":It(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":It(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":It(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":It(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":It(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ji(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=Av.get(a)||a,ji(e,a,l))}}function so(e,t,a,l,u,c){switch(a){case"style":Zc(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&Rn(e,""+l);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Rr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_c.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),c=e[ct]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,u);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ji(e,a,l)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var l=!1,u=!1,c;for(c in a)if(a.hasOwnProperty(c)){var g=a[c];if(g!=null)switch(c){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ce(e,t,c,g,a,null)}}u&&Ce(e,t,"srcSet",a.srcSet,a,null),l&&Ce(e,t,"src",a.src,a,null);return;case"input":he("invalid",e);var y=c=g=u=null,N=null,O=null;for(l in a)if(a.hasOwnProperty(l)){var B=a[l];if(B!=null)switch(l){case"name":u=B;break;case"type":g=B;break;case"checked":N=B;break;case"defaultChecked":O=B;break;case"value":c=B;break;case"defaultValue":y=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Ce(e,t,l,B,a,null)}}qc(e,c,y,N,O,g,u,!1),Oi(e);return;case"select":he("invalid",e),l=g=c=null;for(u in a)if(a.hasOwnProperty(u)&&(y=a[u],y!=null))switch(u){case"value":c=y;break;case"defaultValue":g=y;break;case"multiple":l=y;default:Ce(e,t,u,y,a,null)}t=c,a=g,e.multiple=!!l,t!=null?En(e,!!l,t,!1):a!=null&&En(e,!!l,a,!0);return;case"textarea":he("invalid",e),c=u=l=null;for(g in a)if(a.hasOwnProperty(g)&&(y=a[g],y!=null))switch(g){case"value":l=y;break;case"defaultValue":u=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(s(91));break;default:Ce(e,t,g,y,a,null)}Yc(e,l,u,c),Oi(e);return;case"option":for(N in a)if(a.hasOwnProperty(N)&&(l=a[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ce(e,t,N,l,a,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(l=0;l<Xl.length;l++)he(Xl[l],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ce(e,t,O,l,a,null)}return;default:if(Es(t)){for(B in a)a.hasOwnProperty(B)&&(l=a[B],l!==void 0&&so(e,t,B,l,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null&&Ce(e,t,y,l,a,null))}function e0(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 u=null,c=null,g=null,y=null,N=null,O=null,B=null;for(z in a){var q=a[z];if(a.hasOwnProperty(z)&&q!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":N=q;default:l.hasOwnProperty(z)||Ce(e,t,z,null,l,q)}}for(var k in l){var z=l[k];if(q=a[k],l.hasOwnProperty(k)&&(z!=null||q!=null))switch(k){case"type":c=z;break;case"name":u=z;break;case"checked":O=z;break;case"defaultChecked":B=z;break;case"value":g=z;break;case"defaultValue":y=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,t));break;default:z!==q&&Ce(e,t,k,z,l,q)}}Ss(e,g,y,N,O,B,c,u);return;case"select":z=g=y=k=null;for(c in a)if(N=a[c],a.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":z=N;default:l.hasOwnProperty(c)||Ce(e,t,c,null,l,N)}for(u in l)if(c=l[u],N=a[u],l.hasOwnProperty(u)&&(c!=null||N!=null))switch(u){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":g=c;default:c!==N&&Ce(e,t,u,c,l,N)}t=y,a=g,l=z,k!=null?En(e,!!a,k,!1):!!l!=!!a&&(t!=null?En(e,!!a,t,!0):En(e,!!a,a?[]:"",!1));return;case"textarea":z=k=null;for(y in a)if(u=a[y],a.hasOwnProperty(y)&&u!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ce(e,t,y,null,l,u)}for(g in l)if(u=l[g],c=a[g],l.hasOwnProperty(g)&&(u!=null||c!=null))switch(g){case"value":k=u;break;case"defaultValue":z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==c&&Ce(e,t,g,u,l,c)}Gc(e,k,z);return;case"option":for(var le in a)if(k=a[le],a.hasOwnProperty(le)&&k!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Ce(e,t,le,null,l,k)}for(N in l)if(k=l[N],z=a[N],l.hasOwnProperty(N)&&k!==z&&(k!=null||z!=null))switch(N){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ce(e,t,N,k,l,z)}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 te in a)k=a[te],a.hasOwnProperty(te)&&k!=null&&!l.hasOwnProperty(te)&&Ce(e,t,te,null,l,k);for(O in l)if(k=l[O],z=a[O],l.hasOwnProperty(O)&&k!==z&&(k!=null||z!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(137,t));break;default:Ce(e,t,O,k,l,z)}return;default:if(Es(t)){for(var je in a)k=a[je],a.hasOwnProperty(je)&&k!==void 0&&!l.hasOwnProperty(je)&&so(e,t,je,void 0,l,k);for(B in l)k=l[B],z=a[B],!l.hasOwnProperty(B)||k===z||k===void 0&&z===void 0||so(e,t,B,k,l,z);return}}for(var j in a)k=a[j],a.hasOwnProperty(j)&&k!=null&&!l.hasOwnProperty(j)&&Ce(e,t,j,null,l,k);for(q in l)k=l[q],z=a[q],!l.hasOwnProperty(q)||k===z||k==null&&z==null||Ce(e,t,q,k,l,z)}var uo=null,oo=null;function wr(e){return e.nodeType===9?e:e.ownerDocument}function Zh(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 Kh(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 co(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 fo=null;function t0(){var e=window.event;return e&&e.type==="popstate"?e===fo?!1:(fo=e,!0):(fo=null,!1)}var Xh=typeof setTimeout=="function"?setTimeout:void 0,a0=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,n0=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(e){return Jh.resolve(null).then(e).catch(l0)}:Xh;function l0(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Fh(e,t){var a=t,l=0,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(0<l&&8>l){a=l;var g=e.ownerDocument;if(a&1&&Fl(g.documentElement),a&2&&Fl(g.body),a&4)for(a=g.head,Fl(a),g=a.firstChild;g;){var y=g.nextSibling,N=g.nodeName;g[fl]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=y}}if(u===0){e.removeChild(c),li(t);return}u--}else a==="$"||a==="$?"||a==="$!"?u++:l=a.charCodeAt(0)-48;else l=0;a=c}while(a);li(t)}function ho(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":ho(a),vs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function i0(e,t,a,l){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[fl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function r0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=$t(e.nextSibling),e===null))return null;return e}function po(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function s0(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function $t(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var mo=null;function Ph(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function Wh(e,t,a){switch(t=wr(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 Fl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vs(e)}var Mt=new Map,Ih=new Set;function Tr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ha=Y.d;Y.d={f:u0,r:o0,D:c0,C:f0,L:d0,m:h0,X:m0,S:p0,M:g0};function u0(){var e=ha.f(),t=vr();return e||t}function o0(e){var t=bn(e);t!==null&&t.tag===5&&t.type==="form"?bd(t):ha.r(e)}var In=typeof document>"u"?null:document;function ep(e,t,a){var l=In;if(l&&typeof t=="string"&&t){var u=At(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Ih.has(u)||(Ih.add(u),e={rel:e,crossOrigin:a,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),tt(t,"link",e),Je(t),l.head.appendChild(t)))}}function c0(e){ha.D(e),ep("dns-prefetch",e,null)}function f0(e,t){ha.C(e,t),ep("preconnect",e,t)}function d0(e,t,a){ha.L(e,t,a);var l=In;if(l&&e&&t){var u='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+At(a.imageSizes)+'"]')):u+='[href="'+At(e)+'"]';var c=u;switch(t){case"style":c=el(e);break;case"script":c=tl(e)}Mt.has(c)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Mt.set(c,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Pl(c))||t==="script"&&l.querySelector(Wl(c))||(t=l.createElement("link"),tt(t,"link",e),Je(t),l.head.appendChild(t)))}}function h0(e,t){ha.m(e,t);var a=In;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+At(l)+'"][href="'+At(e)+'"]',c=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=tl(e)}if(!Mt.has(c)&&(e=v({rel:"modulepreload",href:e},t),Mt.set(c,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wl(c)))return}l=a.createElement("link"),tt(l,"link",e),Je(l),a.head.appendChild(l)}}}function p0(e,t,a){ha.S(e,t,a);var l=In;if(l&&e){var u=xn(l).hoistableStyles,c=el(e);t=t||"default";var g=u.get(c);if(!g){var y={loading:0,preload:null};if(g=l.querySelector(Pl(c)))y.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Mt.get(c))&&go(e,a);var N=g=l.createElement("link");Je(N),tt(N,"link",e),N._p=new Promise(function(O,B){N.onload=O,N.onerror=B}),N.addEventListener("load",function(){y.loading|=1}),N.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Cr(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:y},u.set(c,g)}}}function m0(e,t){ha.X(e,t);var a=In;if(a&&e){var l=xn(a).hoistableScripts,u=tl(e),c=l.get(u);c||(c=a.querySelector(Wl(u)),c||(e=v({src:e,async:!0},t),(t=Mt.get(u))&&vo(e,t),c=a.createElement("script"),Je(c),tt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function g0(e,t){ha.M(e,t);var a=In;if(a&&e){var l=xn(a).hoistableScripts,u=tl(e),c=l.get(u);c||(c=a.querySelector(Wl(u)),c||(e=v({src:e,async:!0,type:"module"},t),(t=Mt.get(u))&&vo(e,t),c=a.createElement("script"),Je(c),tt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function tp(e,t,a,l){var u=(u=ue.current)?Tr(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=el(a.href),a=xn(u).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=el(a.href);var c=xn(u).hoistableStyles,g=c.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=u.querySelector(Pl(e)))&&!c._p&&(g.instance=c,g.state.loading=5),Mt.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},Mt.set(e,a),c||v0(u,e,a,g.state))),t&&l===null)throw Error(s(528,""));return g}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=tl(a),a=xn(u).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 el(e){return'href="'+At(e)+'"'}function Pl(e){return'link[rel="stylesheet"]['+e+"]"}function ap(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function v0(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}),tt(t,"link",a),Je(t),e.head.appendChild(t))}function tl(e){return'[src="'+At(e)+'"]'}function Wl(e){return"script[async]"+e}function np(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(l)return t.instance=l,Je(l),l;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Je(l),tt(l,"style",u),Cr(l,a.precedence,e),t.instance=l;case"stylesheet":u=el(a.href);var c=e.querySelector(Pl(u));if(c)return t.state.loading|=4,t.instance=c,Je(c),c;l=ap(a),(u=Mt.get(u))&&go(l,u),c=(e.ownerDocument||e).createElement("link"),Je(c);var g=c;return g._p=new Promise(function(y,N){g.onload=y,g.onerror=N}),tt(c,"link",l),t.state.loading|=4,Cr(c,a.precedence,e),t.instance=c;case"script":return c=tl(a.src),(u=e.querySelector(Wl(c)))?(t.instance=u,Je(u),u):(l=a,(u=Mt.get(c))&&(l=v({},a),vo(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Je(u),tt(u,"link",l),e.head.appendChild(u),t.instance=u);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,Cr(l,a.precedence,e));return t.instance}function Cr(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,c=u,g=0;g<l.length;g++){var y=l[g];if(y.dataset.precedence===t)c=y;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jr=null;function lp(e,t,a){if(jr===null){var l=new Map,u=jr=new Map;u.set(a,l)}else u=jr,l=u.get(a),l||(l=new Map,u.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var c=a[u];if(!(c[fl]||c[nt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var y=l.get(g);y?y.push(c):l.set(g,[c])}}return l}function ip(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function y0(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function rp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Il=null;function b0(){}function x0(e,t,a){if(Il===null)throw Error(s(475));var l=Il;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=el(a.href),c=e.querySelector(Pl(u));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Ar.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=c,Je(c);return}c=e.ownerDocument||e,a=ap(a),(u=Mt.get(u))&&go(a,u),c=c.createElement("link"),Je(c);var g=c;g._p=new Promise(function(y,N){g.onload=y,g.onerror=N}),tt(c,"link",a),t.instance=c}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Ar.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function S0(){if(Il===null)throw Error(s(475));var e=Il;return e.stylesheets&&e.count===0&&yo(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&yo(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ar(){if(this.count--,this.count===0){if(this.stylesheets)yo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Or=null;function yo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Or=new Map,t.forEach(N0,e),Or=null,Ar.call(e))}function N0(e,t){if(!(t.state.loading&4)){var a=Or.get(e);if(a)var l=a.get(null);else{a=new Map,Or.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var g=u[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}u=t.instance,g=u.getAttribute("data-precedence"),c=a.get(g)||l,c===l&&a.set(null,u),a.set(g,u),this.count++,l=Ar.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:G,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function E0(e,t,a,l,u,c,g,y){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=hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hs(0),this.hiddenUpdates=hs(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function sp(e,t,a,l,u,c,g,y,N,O,B,q){return e=new E0(e,t,a,g,y,N,O,q),t=1,c===!0&&(t|=24),c=xt(3,null,null,t),e.current=c,c.stateNode=e,t=Ws(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},au(c),e}function up(e){return e?(e=Ln,e):Ln}function op(e,t,a,l,u,c){u=up(u),l.context===null?l.context=u:l.pendingContext=u,l=Ra(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=wa(e,l,t),a!==null&&(wt(a,e,t),Ol(a,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bo(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function fp(e){if(e.tag===13){var t=kn(e,67108864);t!==null&&wt(t,e,67108864),bo(e,67108864)}}var kr=!0;function R0(e,t,a,l){var u=_.T;_.T=null;var c=Y.p;try{Y.p=2,xo(e,t,a,l)}finally{Y.p=c,_.T=u}}function w0(e,t,a,l){var u=_.T;_.T=null;var c=Y.p;try{Y.p=8,xo(e,t,a,l)}finally{Y.p=c,_.T=u}}function xo(e,t,a,l){if(kr){var u=So(l);if(u===null)ro(e,t,l,Lr,a),hp(e,l);else if(C0(u,e,t,a,l))l.stopPropagation();else if(hp(e,l),t&4&&-1<T0.indexOf(e)){for(;u!==null;){var c=bn(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=Za(c.pendingLanes);if(g!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;g;){var N=1<<31-yt(g);y.entanglements[1]|=N,g&=~N}Ft(c),(Ne&6)===0&&(mr=Qt()+500,Kl(0))}}break;case 13:y=kn(c,2),y!==null&&wt(y,c,2),vr(),bo(c,2)}if(c=So(l),c===null&&ro(e,t,l,Lr,a),c===u)break;u=c}u!==null&&l.stopPropagation()}else ro(e,t,l,null,a)}}function So(e){return e=ws(e),No(e)}var Lr=null;function No(e){if(Lr=null,e=yn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){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 Lr=e,null}function dp(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(fv()){case wc:return 2;case Tc:return 8;case Ri:case dv:return 32;case Cc:return 268435456;default:return 32}default:return 32}}var Eo=!1,Ba=null,Ha=null,Va=null,ti=new Map,ai=new Map,$a=[],T0="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 hp(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function ni(e,t,a,l,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[u]},t!==null&&(t=bn(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function C0(e,t,a,l,u){switch(t){case"focusin":return Ba=ni(Ba,e,t,a,l,u),!0;case"dragenter":return Ha=ni(Ha,e,t,a,l,u),!0;case"mouseover":return Va=ni(Va,e,t,a,l,u),!0;case"pointerover":var c=u.pointerId;return ti.set(c,ni(ti.get(c)||null,e,t,a,l,u)),!0;case"gotpointercapture":return c=u.pointerId,ai.set(c,ni(ai.get(c)||null,e,t,a,l,u)),!0}return!1}function pp(e){var t=yn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=p(a),t!==null){e.blockedOn=t,xv(e.priority,function(){if(a.tag===13){var l=Rt();l=ps(l);var u=kn(a,l);u!==null&&wt(u,a,l),bo(a,l)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=So(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Rs=l,a.target.dispatchEvent(l),Rs=null}else return t=bn(a),t!==null&&fp(t),e.blockedOn=a,!1;t.shift()}return!0}function mp(e,t,a){zr(e)&&a.delete(t)}function j0(){Eo=!1,Ba!==null&&zr(Ba)&&(Ba=null),Ha!==null&&zr(Ha)&&(Ha=null),Va!==null&&zr(Va)&&(Va=null),ti.forEach(mp),ai.forEach(mp)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,j0)))}var _r=null;function gp(e){_r!==e&&(_r=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){_r===e&&(_r=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(No(l||a)===null)continue;break}var c=bn(a);c!==null&&(e.splice(t,3),t-=3,Su(c,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function li(e){function t(N){return Dr(N,e)}Ba!==null&&Dr(Ba,e),Ha!==null&&Dr(Ha,e),Va!==null&&Dr(Va,e),ti.forEach(t),ai.forEach(t);for(var a=0;a<$a.length;a++){var l=$a[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<$a.length&&(a=$a[0],a.blockedOn===null);)pp(a),a.blockedOn===null&&$a.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var u=a[l],c=a[l+1],g=u[ct]||null;if(typeof c=="function")g||gp(a);else if(g){var y=null;if(c&&c.hasAttribute("formAction")){if(u=c,g=c[ct]||null)y=g.formAction;else if(No(u)!==null)continue}else y=g.action;typeof y=="function"?a[l+1]=y:(a.splice(l,3),l-=3),gp(a)}}}function Ro(e){this._internalRoot=e}Mr.prototype.render=Ro.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=Rt();op(a,l,e,t,null,null)},Mr.prototype.unmount=Ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),vr(),t[vn]=null}};function Mr(e){this._internalRoot=e}Mr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<$a.length&&t!==0&&t<$a[a].priority;a++);$a.splice(a,0,e),a===0&&pp(e)}};var vp=n.version;if(vp!=="19.1.0")throw Error(s(527,vp,"19.1.0"));Y.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?d(e):null,e=e===null?null:e.stateNode,e};var A0={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ur=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ur.isDisabled&&Ur.supportsFiber)try{ul=Ur.inject(A0),vt=Ur}catch{}}return si.createRoot=function(e,t){if(!o(e))throw Error(s(299));var a=!1,l="",u=zd,c=Dd,g=_d,y=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(y=t.unstable_transitionCallbacks)),t=sp(e,1,!1,null,null,a,l,u,c,g,y,null),e[vn]=t.current,io(e),new Ro(t)},si.hydrateRoot=function(e,t,a){if(!o(e))throw Error(s(299));var l=!1,u="",c=zd,g=Dd,y=_d,N=null,O=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(N=a.unstable_transitionCallbacks),a.formState!==void 0&&(O=a.formState)),t=sp(e,1,!0,t,a??null,l,u,c,g,y,N,O),t.context=up(null),a=t.current,l=Rt(),l=ps(l),u=Ra(l),u.callback=null,wa(a,u,l),a=l,t.current.lanes=a,cl(t,a),Ft(t),e[vn]=t.current,io(e),new Mr(t)},si.version="19.1.0",si}var Gp;function $S(){if(Gp)return jo.exports;Gp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),jo.exports=VS(),jo.exports}var qS=$S();const GS=rm(qS),dm=w.createContext(void 0);dm.Provider;function hm(i,n){const r=w.useContext(dm),s=w.useRef(void 0);w.useEffect(()=>{let o,f;s.current?f=s.current.then(p):f=p(),s.current=f;function p(){return i().then(h=>(o=h??(()=>{}),h),r?h=>r.error(h):void 0)}return()=>{if(o){const h=o();r&&(h==null||h.catch(m=>r.error(m)))}else{const h=f.then(m=>m==null?void 0:m());r&&h.catch(m=>r.error(m))}}},n)}var ui={},Yp;function YS(){if(Yp)return ui;Yp=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.parse=p,ui.serialize=d;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,f=(()=>{const x=function(){};return x.prototype=Object.create(null),x})();function p(x,C){const E=new f,L=x.length;if(L<2)return E;const V=(C==null?void 0:C.decode)||v;let M=0;do{const D=x.indexOf("=",M);if(D===-1)break;const G=x.indexOf(";",M),X=G===-1?L:G;if(D>X){M=x.lastIndexOf(";",D-1)+1;continue}const K=h(x,M,D),se=m(x,D,K),re=x.slice(K,se);if(E[re]===void 0){let ee=h(x,D+1,X),F=m(x,X,ee);const ne=V(x.slice(ee,F));E[re]=ne}M=X+1}while(M<L);return E}function h(x,C,E){do{const L=x.charCodeAt(C);if(L!==32&&L!==9)return C}while(++C<E);return E}function m(x,C,E){for(;C>E;){const L=x.charCodeAt(--C);if(L!==32&&L!==9)return C+1}return E}function d(x,C,E){const L=(E==null?void 0:E.encode)||encodeURIComponent;if(!i.test(x))throw new TypeError(`argument name is invalid: ${x}`);const V=L(C);if(!n.test(V))throw new TypeError(`argument val is invalid: ${C}`);let M=x+"="+V;if(!E)return M;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);M+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);M+="; Domain="+E.domain}if(E.path){if(!s.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);M+="; Path="+E.path}if(E.expires){if(!S(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);M+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(M+="; HttpOnly"),E.secure&&(M+="; Secure"),E.partitioned&&(M+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.priority.toLowerCase():void 0){case"low":M+="; Priority=Low";break;case"medium":M+="; Priority=Medium";break;case"high":M+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.sameSite){case!0:case"strict":M+="; SameSite=Strict";break;case"lax":M+="; SameSite=Lax";break;case"none":M+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${E.sameSite}`)}return M}function v(x){if(x.indexOf("%")===-1)return x;try{return decodeURIComponent(x)}catch{return x}}function S(x){return o.call(x)==="[object Date]"}return ui}YS();var Qp="popstate";function QS(i={}){function n(o,f){let{pathname:p="/",search:h="",hash:m=""}=hn(o.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),qo("",{pathname:p,search:h,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function r(o,f){let p=o.document.querySelector("base"),h="";if(p&&p.getAttribute("href")){let m=o.location.href,d=m.indexOf("#");h=d===-1?m:m.slice(0,d)}return h+"#"+(typeof f=="string"?f:gi(f))}function s(o,f){Ut(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return KS(n,r,s,i)}function _e(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}function Ut(i,n){if(!i){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function ZS(){return Math.random().toString(36).substring(2,10)}function Zp(i,n){return{usr:i.state,key:i.key,idx:n}}function qo(i,n,r=null,s){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof n=="string"?hn(n):n,state:r,key:n&&n.key||s||ZS()}}function gi({pathname:i="/",search:n="",hash:r=""}){return n&&n!=="?"&&(i+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i}function hn(i){let n={};if(i){let r=i.indexOf("#");r>=0&&(n.hash=i.substring(r),i=i.substring(0,r));let s=i.indexOf("?");s>=0&&(n.search=i.substring(s),i=i.substring(0,s)),i&&(n.pathname=i)}return n}function KS(i,n,r,s={}){let{window:o=document.defaultView,v5Compat:f=!1}=s,p=o.history,h="POP",m=null,d=v();d==null&&(d=0,p.replaceState({...p.state,idx:d},""));function v(){return(p.state||{idx:null}).idx}function S(){h="POP";let V=v(),M=V==null?null:V-d;d=V,m&&m({action:h,location:L.location,delta:M})}function x(V,M){h="PUSH";let D=qo(L.location,V,M);r&&r(D,V),d=v()+1;let G=Zp(D,d),X=L.createHref(D);try{p.pushState(G,"",X)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;o.location.assign(X)}f&&m&&m({action:h,location:L.location,delta:1})}function C(V,M){h="REPLACE";let D=qo(L.location,V,M);r&&r(D,V),d=v();let G=Zp(D,d),X=L.createHref(D);p.replaceState(G,"",X),f&&m&&m({action:h,location:L.location,delta:0})}function E(V){return XS(V)}let L={get action(){return h},get location(){return i(o,p)},listen(V){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(Qp,S),m=V,()=>{o.removeEventListener(Qp,S),m=null}},createHref(V){return n(o,V)},createURL:E,encodeLocation(V){let M=E(V);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:x,replace:C,go(V){return p.go(V)}};return L}function XS(i,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),_e(r,"No window.location.(origin|href) available to create URL");let s=typeof i=="string"?i:gi(i);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function pm(i,n,r="/"){return JS(i,n,r,!1)}function JS(i,n,r,s){let o=typeof n=="string"?hn(n):n,f=va(o.pathname||"/",r);if(f==null)return null;let p=mm(i);FS(p);let h=null;for(let m=0;h==null&&m<p.length;++m){let d=s1(f);h=i1(p[m],d,s)}return h}function mm(i,n=[],r=[],s=""){let o=(f,p,h)=>{let m={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};m.relativePath.startsWith("/")&&(_e(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length));let d=ga([s,m.relativePath]),v=r.concat(m);f.children&&f.children.length>0&&(_e(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),mm(f.children,n,v,d)),!(f.path==null&&!f.index)&&n.push({path:d,score:n1(d,f.index),routesMeta:v})};return i.forEach((f,p)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))o(f,p);else for(let m of gm(f.path))o(f,p,m)}),n}function gm(i){let n=i.split("/");if(n.length===0)return[];let[r,...s]=n,o=r.endsWith("?"),f=r.replace(/\?$/,"");if(s.length===0)return o?[f,""]:[f];let p=gm(s.join("/")),h=[];return h.push(...p.map(m=>m===""?f:[f,m].join("/"))),o&&h.push(...p),h.map(m=>i.startsWith("/")&&m===""?"/":m)}function FS(i){i.sort((n,r)=>n.score!==r.score?r.score-n.score:l1(n.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var PS=/^:[\w-]+$/,WS=3,IS=2,e1=1,t1=10,a1=-2,Kp=i=>i==="*";function n1(i,n){let r=i.split("/"),s=r.length;return r.some(Kp)&&(s+=a1),n&&(s+=IS),r.filter(o=>!Kp(o)).reduce((o,f)=>o+(PS.test(f)?WS:f===""?e1:t1),s)}function l1(i,n){return i.length===n.length&&i.slice(0,-1).every((s,o)=>s===n[o])?i[i.length-1]-n[n.length-1]:0}function i1(i,n,r=!1){let{routesMeta:s}=i,o={},f="/",p=[];for(let h=0;h<s.length;++h){let m=s[h],d=h===s.length-1,v=f==="/"?n:n.slice(f.length)||"/",S=Wr({path:m.relativePath,caseSensitive:m.caseSensitive,end:d},v),x=m.route;if(!S&&d&&r&&!s[s.length-1].route.index&&(S=Wr({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!S)return null;Object.assign(o,S.params),p.push({params:o,pathname:ga([f,S.pathname]),pathnameBase:f1(ga([f,S.pathnameBase])),route:x}),S.pathnameBase!=="/"&&(f=ga([f,S.pathnameBase]))}return p}function Wr(i,n){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[r,s]=r1(i.path,i.caseSensitive,i.end),o=n.match(r);if(!o)return null;let f=o[0],p=f.replace(/(.)\/+$/,"$1"),h=o.slice(1);return{params:s.reduce((d,{paramName:v,isOptional:S},x)=>{if(v==="*"){let E=h[x]||"";p=f.slice(0,f.length-E.length).replace(/(.)\/+$/,"$1")}const C=h[x];return S&&!C?d[v]=void 0:d[v]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:f,pathnameBase:p,pattern:i}}function r1(i,n=!1,r=!0){Ut(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let s=[],o="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,h,m)=>(s.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(s.push({paramName:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),s]}function s1(i){try{return i.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ut(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),i}}function va(i,n){if(n==="/")return i;if(!i.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,s=i.charAt(r);return s&&s!=="/"?null:i.slice(r)||"/"}function u1(i,n="/"){let{pathname:r,search:s="",hash:o=""}=typeof i=="string"?hn(i):i;return{pathname:r?r.startsWith("/")?r:o1(r,n):n,search:d1(s),hash:h1(o)}}function o1(i,n){let r=n.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Lo(i,n,r,s){return`Cannot include a '${i}' character in a manually specified \`to.${n}\` 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 c1(i){return i.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Po(i){let n=c1(i);return n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase)}function Wo(i,n,r,s=!1){let o;typeof i=="string"?o=hn(i):(o={...i},_e(!o.pathname||!o.pathname.includes("?"),Lo("?","pathname","search",o)),_e(!o.pathname||!o.pathname.includes("#"),Lo("#","pathname","hash",o)),_e(!o.search||!o.search.includes("#"),Lo("#","search","hash",o)));let f=i===""||o.pathname==="",p=f?"/":o.pathname,h;if(p==null)h=r;else{let S=n.length-1;if(!s&&p.startsWith("..")){let x=p.split("/");for(;x[0]==="..";)x.shift(),S-=1;o.pathname=x.join("/")}h=S>=0?n[S]:"/"}let m=u1(o,h),d=p&&p!=="/"&&p.endsWith("/"),v=(f||p===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(d||v)&&(m.pathname+="/"),m}var ga=i=>i.join("/").replace(/\/\/+/g,"/"),f1=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),d1=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,h1=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function p1(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}var vm=["POST","PUT","PATCH","DELETE"];new Set(vm);var m1=["GET",...vm];new Set(m1);var ll=w.createContext(null);ll.displayName="DataRouter";var ns=w.createContext(null);ns.displayName="DataRouterState";var ym=w.createContext({isTransitioning:!1});ym.displayName="ViewTransition";var g1=w.createContext(new Map);g1.displayName="Fetchers";var v1=w.createContext(null);v1.displayName="Await";var qt=w.createContext(null);qt.displayName="Navigation";var bi=w.createContext(null);bi.displayName="Location";var Gt=w.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var Io=w.createContext(null);Io.displayName="RouteError";function y1(i,{relative:n}={}){_e(il(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=w.useContext(qt),{hash:o,pathname:f,search:p}=xi(i,{relative:n}),h=f;return r!=="/"&&(h=f==="/"?r:ga([r,f])),s.createHref({pathname:h,search:p,hash:o})}function il(){return w.useContext(bi)!=null}function Ya(){return _e(il(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(bi).location}var bm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xm(i){w.useContext(qt).static||w.useLayoutEffect(i)}function rl(){let{isDataRoute:i}=w.useContext(Gt);return i?L1():b1()}function b1(){_e(il(),"useNavigate() may be used only in the context of a <Router> component.");let i=w.useContext(ll),{basename:n,navigator:r}=w.useContext(qt),{matches:s}=w.useContext(Gt),{pathname:o}=Ya(),f=JSON.stringify(Po(s)),p=w.useRef(!1);return xm(()=>{p.current=!0}),w.useCallback((m,d={})=>{if(Ut(p.current,bm),!p.current)return;if(typeof m=="number"){r.go(m);return}let v=Wo(m,JSON.parse(f),o,d.relative==="path");i==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:ga([n,v.pathname])),(d.replace?r.replace:r.push)(v,d.state,d)},[n,r,f,o,i])}w.createContext(null);function x1(){let{matches:i}=w.useContext(Gt),n=i[i.length-1];return n?n.params:{}}function xi(i,{relative:n}={}){let{matches:r}=w.useContext(Gt),{pathname:s}=Ya(),o=JSON.stringify(Po(r));return w.useMemo(()=>Wo(i,JSON.parse(o),s,n==="path"),[i,o,s,n])}function S1(i,n){return Sm(i,n)}function Sm(i,n,r,s){var M;_e(il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=w.useContext(qt),{matches:f}=w.useContext(Gt),p=f[f.length-1],h=p?p.params:{},m=p?p.pathname:"/",d=p?p.pathnameBase:"/",v=p&&p.route;{let D=v&&v.path||"";Nm(m,!v||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${D}">) 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.
60
60
 
61
- Please change the parent <Route path="${z}"> to <Route path="${z==="/"?"*":`${z}/*`}">.`)}let v=Ei(),b;if(n){let z=typeof n=="string"?Wi(n):n;Ye(p==="/"||((M=z.pathname)==null?void 0:M.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${z.pathname}" was given in the \`location\` prop.`),b=z}else b=v;let k=b.pathname||"/",N=k;if(p!=="/"){let z=p.replace(/^\//,"").split("/");N="/"+k.replace(/^\//,"").split("/").slice(z.length).join("/")}let T=nb(t,{pathname:N});sn(g||T!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),sn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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.`);let U=iA(T&&T.map(z=>Object.assign({},z,{params:Object.assign({},d,z.params),pathname:Hn([p,l.encodeLocation?l.encodeLocation(z.pathname).pathname:z.pathname]),pathnameBase:z.pathnameBase==="/"?p:Hn([p,l.encodeLocation?l.encodeLocation(z.pathnameBase).pathname:z.pathnameBase])})),u,i,a);return n&&U?A.createElement(As.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},U):U}function WE(){let t=oA(),n=JE(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:u},"ErrorBoundary")," or"," ",A.createElement("code",{style:u},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},n),i?A.createElement("pre",{style:l},i):null,f)}var eA=A.createElement(WE,null),tA=class extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?A.createElement(dn.Provider,{value:this.props.routeContext},A.createElement(vd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function nA({routeContext:t,match:n,children:i}){let a=A.useContext(ia);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),A.createElement(dn.Provider,{value:t},i)}function iA(t,n=[],i=null,a=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let l=t,u=i==null?void 0:i.errors;if(u!=null){let m=l.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);Ye(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,m+1))}let f=!1,d=-1;if(i)for(let m=0;m<l.length;m++){let p=l[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=m),p.route.id){let{loaderData:g,errors:v}=i,b=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||b){f=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((m,p,g)=>{let v,b=!1,k=null,N=null;i&&(v=u&&p.route.id?u[p.route.id]:void 0,k=p.route.errorElement||eA,f&&(d<0&&g===0?(cb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,N=null):d===g&&(b=!0,N=p.route.hydrateFallbackElement||null)));let T=n.concat(l.slice(0,g+1)),U=()=>{let M;return v?M=k:b?M=N:p.route.Component?M=A.createElement(p.route.Component,null):p.route.element?M=p.route.element:M=m,A.createElement(nA,{match:p,routeContext:{outlet:m,matches:T,isDataRoute:i!=null},children:M})};return i&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?A.createElement(tA,{location:i.location,revalidation:i.revalidation,component:k,error:v,children:U(),routeContext:{outlet:null,matches:T,isDataRoute:!0}}):U()},null)}function bd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rA(t){let n=A.useContext(ia);return Ye(n,bd(t)),n}function aA(t){let n=A.useContext(Uo);return Ye(n,bd(t)),n}function sA(t){let n=A.useContext(dn);return Ye(n,bd(t)),n}function xd(t){let n=sA(t),i=n.matches[n.matches.length-1];return Ye(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function lA(){return xd("useRouteId")}function oA(){var a;let t=A.useContext(vd),n=aA("useRouteError"),i=xd("useRouteError");return t!==void 0?t:(a=n.errors)==null?void 0:a[i]}function uA(){let{router:t}=rA("useNavigate"),n=xd("useNavigate"),i=A.useRef(!1);return ob(()=>{i.current=!0}),A.useCallback(async(l,u={})=>{sn(i.current,lb),i.current&&(typeof l=="number"?t.navigate(l):await t.navigate(l,{fromRouteId:n,...u}))},[t,n])}var Ty={};function cb(t,n,i){!n&&!Ty[t]&&(Ty[t]=!0,sn(!1,i))}A.memo(cA);function cA({routes:t,future:n,state:i}){return ub(t,void 0,i,n)}function fA({to:t,replace:n,state:i,relative:a}){Ye(ra(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=A.useContext(fn);sn(!l,"<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:u}=A.useContext(dn),{pathname:f}=Ei(),d=aa(),m=yd(t,gd(u),f,a==="path"),p=JSON.stringify(m);return A.useEffect(()=>{d(JSON.parse(p),{replace:n,state:i,relative:a})},[d,p,a,n,i]),null}function fo(t){Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function dA({basename:t="/",children:n=null,location:i,navigationType:a="POP",navigator:l,static:u=!1}){Ye(!ra(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),d=A.useMemo(()=>({basename:f,navigator:l,static:u,future:{}}),[f,l,u]);typeof i=="string"&&(i=Wi(i));let{pathname:m="/",search:p="",hash:g="",state:v=null,key:b="default"}=i,k=A.useMemo(()=>{let N=Gn(m,f);return N==null?null:{location:{pathname:N,search:p,hash:g,state:v,key:b},navigationType:a}},[f,m,p,g,v,b,a]);return sn(k!=null,`<Router basename="${f}"> is not able to match the URL "${m}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:A.createElement(fn.Provider,{value:d},A.createElement(As.Provider,{children:n,value:k}))}function hA({children:t,location:n}){return PE(Hf(t),n)}function Hf(t,n=[]){let i=[];return A.Children.forEach(t,(a,l)=>{if(!A.isValidElement(a))return;let u=[...n,l];if(a.type===A.Fragment){i.push.apply(i,Hf(a.props.children,u));return}Ye(a.type===fo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!a.props.index||!a.props.children,"An index route cannot have child routes.");let f={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(f.children=Hf(a.props.children,u)),i.push(f)}),i}var ho="get",po="application/x-www-form-urlencoded";function Bo(t){return t!=null&&typeof t.tagName=="string"}function pA(t){return Bo(t)&&t.tagName.toLowerCase()==="button"}function mA(t){return Bo(t)&&t.tagName.toLowerCase()==="form"}function gA(t){return Bo(t)&&t.tagName.toLowerCase()==="input"}function yA(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function vA(t,n){return t.button===0&&(!n||n==="_self")&&!yA(t)}var io=null;function bA(){if(io===null)try{new FormData(document.createElement("form"),0),io=!1}catch{io=!0}return io}var xA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wf(t){return t!=null&&!xA.has(t)?(sn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${po}"`),null):t}function SA(t,n){let i,a,l,u,f;if(mA(t)){let d=t.getAttribute("action");a=d?Gn(d,n):null,i=t.getAttribute("method")||ho,l=wf(t.getAttribute("enctype"))||po,u=new FormData(t)}else if(pA(t)||gA(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(a=m?Gn(m,n):null,i=t.getAttribute("formmethod")||d.getAttribute("method")||ho,l=wf(t.getAttribute("formenctype"))||wf(d.getAttribute("enctype"))||po,u=new FormData(d,t),!bA()){let{name:p,type:g,value:v}=t;if(g==="image"){let b=p?`${p}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else p&&u.append(p,v)}}else{if(Bo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=ho,a=null,l=po,f=t}return u&&l==="text/plain"&&(f=u,u=void 0),{action:a,method:i.toLowerCase(),encType:l,formData:u,body:f}}function Sd(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}async function wA(t,n){if(t.id in n)return n[t.id];try{let i=await import(t.module);return n[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function NA(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function kA(t,n,i){let a=await Promise.all(t.map(async l=>{let u=n.routes[l.route.id];if(u){let f=await wA(u,i);return f.links?f.links():[]}return[]}));return $A(a.flat(1).filter(NA).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Oy(t,n,i,a,l,u){let f=(m,p)=>i[p]?m.route.id!==i[p].route.id:!0,d=(m,p)=>{var g;return i[p].pathname!==m.pathname||((g=i[p].route.path)==null?void 0:g.endsWith("*"))&&i[p].params["*"]!==m.params["*"]};return u==="assets"?n.filter((m,p)=>f(m,p)||d(m,p)):u==="data"?n.filter((m,p)=>{var v;let g=a.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(f(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let b=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function RA(t,n,{includeHydrateFallback:i}={}){return EA(t.map(a=>{let l=n.routes[a.route.id];if(!l)return[];let u=[l.module];return l.clientActionModule&&(u=u.concat(l.clientActionModule)),l.clientLoaderModule&&(u=u.concat(l.clientLoaderModule)),i&&l.hydrateFallbackModule&&(u=u.concat(l.hydrateFallbackModule)),l.imports&&(u=u.concat(l.imports)),u}).flat(1))}function EA(t){return[...new Set(t)]}function AA(t){let n={},i=Object.keys(t).sort();for(let a of i)n[a]=t[a];return n}function $A(t,n){let i=new Set;return new Set(n),t.reduce((a,l)=>{let u=JSON.stringify(AA(l));return i.has(u)||(i.add(u),a.push({key:u,link:l})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var CA=new Set([100,101,204,205]);function TA(t,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i.pathname==="/"?i.pathname="_root.data":n&&Gn(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function fb(){let t=A.useContext(ia);return Sd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function OA(){let t=A.useContext(Uo);return Sd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var wd=A.createContext(void 0);wd.displayName="FrameworkContext";function db(){let t=A.useContext(wd);return Sd(t,"You must render this element inside a <HydratedRouter> element"),t}function jA(t,n){let i=A.useContext(wd),[a,l]=A.useState(!1),[u,f]=A.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:g,onTouchStart:v}=n,b=A.useRef(null);A.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let T=M=>{M.forEach(z=>{f(z.isIntersecting)})},U=new IntersectionObserver(T,{threshold:.5});return b.current&&U.observe(b.current),()=>{U.disconnect()}}},[t]),A.useEffect(()=>{if(a){let T=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(T)}}},[a]);let k=()=>{l(!0)},N=()=>{l(!1),f(!1)};return i?t!=="intent"?[u,b,{}]:[u,b,{onFocus:fs(d,k),onBlur:fs(m,N),onMouseEnter:fs(p,k),onMouseLeave:fs(g,N),onTouchStart:fs(v,k)}]:[!1,b,{}]}function fs(t,n){return i=>{t&&t(i),i.defaultPrevented||n(i)}}function DA({page:t,...n}){let{router:i}=fb(),a=A.useMemo(()=>nb(i.routes,t,i.basename),[i.routes,t,i.basename]);return a?A.createElement(LA,{page:t,matches:a,...n}):null}function MA(t){let{manifest:n,routeModules:i}=db(),[a,l]=A.useState([]);return A.useEffect(()=>{let u=!1;return kA(t,n,i).then(f=>{u||l(f)}),()=>{u=!0}},[t,n,i]),a}function LA({page:t,matches:n,...i}){let a=Ei(),{manifest:l,routeModules:u}=db(),{basename:f}=fb(),{loaderData:d,matches:m}=OA(),p=A.useMemo(()=>Oy(t,n,m,l,a,"data"),[t,n,m,l,a]),g=A.useMemo(()=>Oy(t,n,m,l,a,"assets"),[t,n,m,l,a]),v=A.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let N=new Set,T=!1;if(n.forEach(M=>{var G;let z=l.routes[M.route.id];!z||!z.hasLoader||(!p.some(X=>X.route.id===M.route.id)&&M.route.id in d&&((G=u[M.route.id])!=null&&G.shouldRevalidate)||z.hasClientLoader?T=!0:N.add(M.route.id))}),N.size===0)return[];let U=TA(t,f);return T&&N.size>0&&U.searchParams.set("_routes",n.filter(M=>N.has(M.route.id)).map(M=>M.route.id).join(",")),[U.pathname+U.search]},[f,d,a,l,p,n,t,u]),b=A.useMemo(()=>RA(g,l),[g,l]),k=MA(g);return A.createElement(A.Fragment,null,v.map(N=>A.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...i})),b.map(N=>A.createElement("link",{key:N,rel:"modulepreload",href:N,...i})),k.map(({key:N,link:T})=>A.createElement("link",{key:N,...T})))}function zA(...t){return n=>{t.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var hb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hb&&(window.__reactRouterVersion="7.6.3")}catch{}function UA({basename:t,children:n,window:i}){let a=A.useRef();a.current==null&&(a.current=wE({window:i,v5Compat:!0}));let l=a.current,[u,f]=A.useState({action:l.action,location:l.location}),d=A.useCallback(m=>{A.startTransition(()=>f(m))},[f]);return A.useLayoutEffect(()=>l.listen(d),[l,d]),A.createElement(dA,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l})}var pb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mb=A.forwardRef(function({onClick:n,discover:i="render",prefetch:a="none",relative:l,reloadDocument:u,replace:f,state:d,target:m,to:p,preventScrollReset:g,viewTransition:v,...b},k){let{basename:N}=A.useContext(fn),T=typeof p=="string"&&pb.test(p),U,M=!1;if(typeof p=="string"&&T&&(U=p,hb))try{let ee=new URL(window.location.href),oe=p.startsWith("//")?new URL(ee.protocol+p):new URL(p),xe=Gn(oe.pathname,N);oe.origin===ee.origin&&xe!=null?p=xe+oe.search+oe.hash:M=!0}catch{sn(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let z=QE(p,{relative:l}),[G,X,F]=jA(a,b),he=KA(p,{replace:f,state:d,target:m,preventScrollReset:g,relative:l,viewTransition:v});function fe(ee){n&&n(ee),ee.defaultPrevented||he(ee)}let re=A.createElement("a",{...b,...F,href:U||z,onClick:M||u?n:fe,ref:zA(k,X),target:m,"data-discover":!T&&i==="render"?"true":void 0});return G&&!T?A.createElement(A.Fragment,null,re,A.createElement(DA,{page:z})):re});mb.displayName="Link";var BA=A.forwardRef(function({"aria-current":n="page",caseSensitive:i=!1,className:a="",end:l=!1,style:u,to:f,viewTransition:d,children:m,...p},g){let v=$s(f,{relative:p.relative}),b=Ei(),k=A.useContext(Uo),{navigator:N,basename:T}=A.useContext(fn),U=k!=null&&YA(v)&&d===!0,M=N.encodeLocation?N.encodeLocation(v).pathname:v.pathname,z=b.pathname,G=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;i||(z=z.toLowerCase(),G=G?G.toLowerCase():null,M=M.toLowerCase()),G&&T&&(G=Gn(G,T)||G);const X=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let F=z===M||!l&&z.startsWith(M)&&z.charAt(X)==="/",he=G!=null&&(G===M||!l&&G.startsWith(M)&&G.charAt(M.length)==="/"),fe={isActive:F,isPending:he,isTransitioning:U},re=F?n:void 0,ee;typeof a=="function"?ee=a(fe):ee=[a,F?"active":null,he?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let oe=typeof u=="function"?u(fe):u;return A.createElement(mb,{...p,"aria-current":re,className:ee,ref:g,style:oe,to:f,viewTransition:d},typeof m=="function"?m(fe):m)});BA.displayName="NavLink";var _A=A.forwardRef(({discover:t="render",fetcherKey:n,navigate:i,reloadDocument:a,replace:l,state:u,method:f=ho,action:d,onSubmit:m,relative:p,preventScrollReset:g,viewTransition:v,...b},k)=>{let N=GA(),T=JA(d,{relative:p}),U=f.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&pb.test(d),z=G=>{if(m&&m(G),G.defaultPrevented)return;G.preventDefault();let X=G.nativeEvent.submitter,F=(X==null?void 0:X.getAttribute("formmethod"))||f;N(X||G.currentTarget,{fetcherKey:n,method:F,navigate:i,replace:l,state:u,relative:p,preventScrollReset:g,viewTransition:v})};return A.createElement("form",{ref:k,method:U,action:T,onSubmit:a?m:z,...b,"data-discover":!M&&t==="render"?"true":void 0})});_A.displayName="Form";function qA(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gb(t){let n=A.useContext(ia);return Ye(n,qA(t)),n}function KA(t,{target:n,replace:i,state:a,preventScrollReset:l,relative:u,viewTransition:f}={}){let d=aa(),m=Ei(),p=$s(t,{relative:u});return A.useCallback(g=>{if(vA(g,n)){g.preventDefault();let v=i!==void 0?i:Ss(m)===Ss(p);d(t,{replace:v,state:a,preventScrollReset:l,relative:u,viewTransition:f})}},[m,d,p,i,a,n,t,l,u,f])}var VA=0,HA=()=>`__${String(++VA)}__`;function GA(){let{router:t}=gb("useSubmit"),{basename:n}=A.useContext(fn),i=lA();return A.useCallback(async(a,l={})=>{let{action:u,method:f,encType:d,formData:m,body:p}=SA(a,n);if(l.navigate===!1){let g=l.fetcherKey||HA();await t.fetch(g,i,l.action||u,{preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await t.navigate(l.action||u,{preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:i,flushSync:l.flushSync,viewTransition:l.viewTransition})},[t,n,i])}function JA(t,{relative:n}={}){let{basename:i}=A.useContext(fn),a=A.useContext(dn);Ye(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),u={...$s(t||".",{relative:n})},f=Ei();if(t==null){u.search=f.search;let d=new URLSearchParams(u.search),m=d.getAll("index");if(m.some(g=>g==="")){d.delete("index"),m.filter(v=>v).forEach(v=>d.append("index",v));let g=d.toString();u.search=g?`?${g}`:""}}return(!t||t===".")&&l.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Hn([i,u.pathname])),Ss(u)}function YA(t,n={}){let i=A.useContext(sb);Ye(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=gb("useViewTransitionState"),l=$s(t,{relative:n.relative});if(!i.isTransitioning)return!1;let u=Gn(i.currentLocation.pathname,a)||i.currentLocation.pathname,f=Gn(i.nextLocation.pathname,a)||i.nextLocation.pathname;return wo(l.pathname,f)!=null||wo(l.pathname,u)!=null}[...CA];function IA(t){if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Error)return t.message;switch(typeof t){case"bigint":case"number":case"boolean":return String(t);case"string":return t;case"symbol":return`Symbol(${t.description??""})`;case"object":return String("message"in t?t.message:t);case"function":return`function ${t.name}`;default:return"invalid error type"}}const Cs=t=>Array.isArray(t)?t:[t],ZA=(t,n)=>{const i=[[],[]];for(const a of t)n(a)?i[0].push(a):i[1].push(a);return i},yb=Array,Yi=(t,n)=>t.includes(n),QA=(t,n=0)=>[...new Array(t)].map((i,a)=>a+n),Be=(t,n,i)=>t===void 0?n===void 0?[]:Array.isArray(n)?n:[n]:(Array.isArray(n)?t.push(...n):t.push(n),t),Zi=(t,n)=>n==null?t??[]:t==null?Cs(n):t.concat(n),FA=(...t)=>t.reduce(Zi,[]),Fi=(t,n,i)=>{if(t===void 0)return Array.isArray(n)?n:[n];const a=(i==null?void 0:i.isEqual)??((l,u)=>l===u);for(const l of Cs(n))t.some(u=>a(u,l))||t.push(l);return t},XA=(t,n)=>t.reduce((i,a)=>{const l=a[n];return i[l]=Be(i[l],a),i},{}),Xr=(t,n,i)=>t.length===n.length&&t.every(i!=null&&i.isEqual?(a,l)=>i.isEqual(a,n[l]):(a,l)=>a===n[l]),er=(t,n)=>hn(t)===n,hn=t=>{const n=typeof t;return n==="object"?t===null?"null":"object":n==="function"?"object":n},Jn={boolean:"boolean",null:"null",undefined:"undefined",bigint:"a bigint",number:"a number",object:"an object",string:"a string",symbol:"a symbol"},PA={...Jn,function:"a function"};class WA extends Error{}const nt=t=>Pr(t,WA),Pr=(t,n=Error)=>{throw new n(t)};class e$ extends Error{constructor(){super(...arguments);w(this,"name","ParseError")}}const J=t=>Pr(t,e$),vb=t=>` ${t}`,_e=(t,n)=>{const i={},a=Array.isArray(t);let l=!1;for(const[u,f]of Object.entries(t).entries()){const d=a?n(u,f[1]):n(...f,u);l||(l=typeof d[0]=="number");const m=Array.isArray(d[0])||d.length===0?d:[d];for(const[p,g]of m)typeof p=="object"?i[p.group]=Be(i[p.group],g):i[p]=g}return l?Object.values(i):i},bb=Object.entries,Nn=(t,n)=>t in n,Nd=(t,n)=>n in t;class t${constructor(n){Object.assign(this,n)}}const n$=class{};class xb extends n${}const i$=(t,n)=>{const i={},a={};let l;for(l in t)l in n?i[l]=t[l]:a[l]=t[l];return[i,a]},r$=(t,n)=>i$(t,n)[1],Ts=t=>Object.keys(t).length===0,No=t=>[...Object.entries(t),...Object.getOwnPropertySymbols(t).map(n=>[n,t[n]])],a$=(t,n)=>Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)),s$=t=>{const n=Object.keys(t).sort(),i={};for(let a=0;a<n.length;a++)i[n[a]]=t[n[a]];return i},qn=vb("represents an uninitialized value"),l$=t=>Object.values(t).filter(n=>typeof n=="number"?!0:typeof t[n]!="number"),Sb={Array,Boolean,Date,Error,Function,Map,Number,Promise,RegExp,Set,String,WeakMap,WeakSet},wb=globalThis.File??Blob,Nb={ArrayBuffer,Blob,File:wb,FormData,Headers,Request,Response,URL},o$={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array},Wr={...Sb,...Nb,...o$,String,Number,Boolean},kd=t=>{var a;let n=Object.getPrototypeOf(t);for(;n!=null&&n.constructor&&(!Nn(n.constructor.name,Wr)||!(t instanceof Wr[n.constructor.name]));)n=Object.getPrototypeOf(n);const i=(a=n==null?void 0:n.constructor)==null?void 0:a.name;if(!(i===void 0||i==="Object"))return i},Gf=t=>typeof t=="object"&&t!==null?kd(t)??"object":hn(t),kt=Array.isArray,u$={Array:"an array",Function:"a function",Date:"a Date",RegExp:"a RegExp",Error:"an Error",Map:"a Map",Set:"a Set",String:"a String object",Number:"a Number object",Boolean:"a Boolean object",Promise:"a Promise",WeakMap:"a WeakMap",WeakSet:"a WeakSet"},c$={ArrayBuffer:"an ArrayBuffer instance",Blob:"a Blob instance",File:"a File instance",FormData:"a FormData instance",Headers:"a Headers instance",Request:"a Request instance",Response:"a Response instance",URL:"a URL instance"},f$={Int8Array:"an Int8Array",Uint8Array:"a Uint8Array",Uint8ClampedArray:"a Uint8ClampedArray",Int16Array:"an Int16Array",Uint16Array:"a Uint16Array",Int32Array:"an Int32Array",Uint32Array:"a Uint32Array",Float32Array:"a Float32Array",Float64Array:"a Float64Array",BigInt64Array:"a BigInt64Array",BigUint64Array:"a BigUint64Array"},d$={...u$,...c$,...f$},Rd=t=>{const n=Object(t).name??null;return n&&Nn(n,Wr)&&Wr[n]===t?n:null},jy=(t,n)=>{let i=t.prototype;for(;i!==null;){if(i===n.prototype)return!0;i=Object.getPrototypeOf(i)}return!1},h$=t=>kb(t,new Map),kb=(t,n)=>{if(typeof t!="object"||t===null)return t;if(n!=null&&n.has(t))return n.get(t);const i=Rd(t.constructor);if(i==="Date")return new Date(t.getTime());if(i&&i!=="Array")return t;const a=Array.isArray(t)?t.slice():Object.create(Object.getPrototypeOf(t)),l=Object.getOwnPropertyDescriptors(t);if(n){n.set(t,a);for(const u in l){const f=l[u];"get"in f||"set"in f||(f.value=kb(f.value,n))}}return Object.defineProperties(a,l),a},p$=t=>{let n=qn;return()=>n===qn?n=t():n},_o=t=>typeof t=="function"&&t.length===0,m$=class extends Function{constructor(...t){const n=t.slice(0,-1),i=t.at(-1);try{super(...n,i)}catch(a){return nt(`Encountered an unexpected error while compiling your definition:
62
- Message: ${a}
63
- Source: (${t.slice(0,-1)}) => {
64
- ${t.at(-1)}
65
- }`)}}};class sa{constructor(n,...[i]){return Object.assign(Object.setPrototypeOf(n.bind((i==null?void 0:i.bind)??this),this.constructor.prototype),i==null?void 0:i.attach)}}const g$=p$(()=>{try{return new Function("return false")()}catch{return!0}});class kn{constructor(){}}const y$=()=>{var t,n,i;try{return(((i=(((n=(t=new Error().stack)==null?void 0:t.split(`
66
- `)[2])==null?void 0:n.trim())||"").match(/\(?(.+?)(?::\d+:\d+)?\)?$/))==null?void 0:i[1])||"unknown").replace(/^file:\/\//,"")}catch{return"unknown"}};var Lv;const v$=((Lv=globalThis.process)==null?void 0:Lv.env)??{},b$={fileName:y$,env:v$},x$=t=>t[0].toUpperCase()+t.slice(1),Rb=t=>new RegExp(S$(t),typeof t=="string"?"":t.flags),S$=t=>`^(?:${typeof t=="string"?t:t.source})$`,wi={negativeLookahead:t=>`(?!${t})`,nonCapturingGroup:t=>`(?:${t})`},Jf="\\",qo={" ":1,"\n":1," ":1},w$=/^-0\.?0*$/.source,Eb=/[1-9]\d*/.source,N$=/\.\d+/.source,k$=/\.\d*[1-9]/.source,Ab=t=>Rb(wi.negativeLookahead(w$)+wi.nonCapturingGroup("-?"+wi.nonCapturingGroup(wi.nonCapturingGroup("0|"+Eb)+wi.nonCapturingGroup(t.decimalPattern)+"?")+(t.allowDecimalOnly?"|"+t.decimalPattern:"")+"?")),Dy=Ab({decimalPattern:k$,allowDecimalOnly:!1}),R$=Dy.test.bind(Dy),Yf=Ab({decimalPattern:N$,allowDecimalOnly:!0});Yf.test.bind(Yf);const E$=/^-?\d*\.?\d*$/,A$=t=>t.length!==0&&E$.test(t),ko=Rb(wi.negativeLookahead("^-0$")+"-?"+wi.nonCapturingGroup(wi.nonCapturingGroup("0|"+Eb))),$$=ko.test.bind(ko),If=/^-?\d+$/,C$=If.test.bind(If),$b={number:"a number",bigint:"a bigint",integer:"an integer"},Cb=(t,n)=>`'${t}' was parsed as ${$b[n]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`,T$=(t,n)=>n==="number"?R$(t):$$(t),O$=(t,n)=>n==="number"?Number(t):Number.parseInt(t),j$=(t,n)=>n==="number"?A$(t):C$(t),D$=(t,n)=>Ed(t,"number",n),M$=(t,n)=>Ed(t,"number",{...n,strict:!0}),L$=(t,n)=>Ed(t,"integer",n),Ed=(t,n,i)=>{const a=O$(t,n);return!Number.isNaN(a)&&j$(t,n)?i!=null&&i.strict?T$(t,n)?a:J(Cb(t,n)):a:i!=null&&i.errorOnFail?J((i==null?void 0:i.errorOnFail)===!0?`Failed to parse ${$b[n]} from '${t}'`:i==null?void 0:i.errorOnFail):void 0},z$=t=>{if(t[t.length-1]!=="n")return;const n=t.slice(0,-1);let i;try{i=BigInt(n)}catch{return}if(ko.test(n))return i;if(If.test(n))return J(Cb(t,"bigint"))},U$="0.46.0",B$={version:U$,filename:b$.fileName(),FileConstructor:wb},Os=B$,My=new Map,Nf=Object.create(null),Zf=t=>{const n=My.get(t);if(n)return n;let i=_$(t);return Nf[i]?i=`${i}${Nf[i]++}`:Nf[i]=1,Os[i]=t,My.set(t,i),i},ws=t=>/^[$A-Z_a-z][\w$]*$/.test(t),_$=t=>{switch(typeof t){case"object":{if(t===null)break;const n=kd(t)??"object";return n[0].toLowerCase()+n.slice(1)}case"function":return ws(t.name)?t.name:"fn";case"symbol":return t.description&&ws(t.description)?t.description:"symbol"}return nt(`Unexpected attempt to register serializable value of type ${hn(t)}`)},Ad=t=>typeof t=="string"?JSON.stringify(t):typeof t=="bigint"?`${t}n`:`${t}`,q$=(t,n={})=>ys(t,{onUndefined:"$ark.undefined",onBigInt:i=>`$ark.bigint-${i}`,...n},[]),ze=(t,n)=>{switch(hn(t)){case"object":const i=t,a=i.constructor.name;return a==="Object"||a==="Array"?(n==null?void 0:n.quoteKeys)===!1?Ro(i,(n==null?void 0:n.indent)??0,""):JSON.stringify(ys(i,ea,[]),null,n==null?void 0:n.indent):Ro(i,(n==null?void 0:n.indent)??0,"");case"symbol":return ea.onSymbol(t);default:return Ad(t)}},Ro=(t,n,i)=>{if(typeof t=="function")return ea.onFunction(t);if(typeof t!="object"||t===null)return Ad(t);const a=i+" ".repeat(n);if(Array.isArray(t)){if(t.length===0)return"[]";const u=t.map(f=>Ro(f,n,a)).join(`,
67
- `+a);return n?`[
68
- ${a}${u}
69
- ${i}]`:`[${u}]`}const l=t.constructor.name;if(l==="Object"){const u=No(t).map(([f,d])=>{const m=typeof f=="symbol"?ea.onSymbol(f):ws(f)?f:JSON.stringify(f),p=Ro(d,n,a);return`${a}${m}: ${p}`});return u.length===0?"{}":n?`{
70
- ${u.join(`,
71
- `)}
72
- ${i}}`:`{${u.join(", ")}}`}return t instanceof Date?js(t):"expression"in t&&typeof t.expression=="string"?t.expression:l},ea={onCycle:()=>"(cycle)",onSymbol:t=>`Symbol(${Zf(t)})`,onFunction:t=>`Function(${Zf(t)})`},ys=(t,n,i)=>{var a,l;switch(hn(t)){case"object":{const u=t;if("toJSON"in u&&typeof u.toJSON=="function")return u.toJSON();if(typeof u=="function")return ea.onFunction(u);if(i.includes(u))return"(cycle)";const f=[...i,u];if(Array.isArray(u))return u.map(m=>ys(m,n,f));if(u instanceof Date)return u.toDateString();const d={};for(const m in u)d[m]=ys(u[m],n,f);for(const m of Object.getOwnPropertySymbols(u))d[((a=n.onSymbol)==null?void 0:a.call(n,m))??m.toString()]=ys(u[m],n,f);return d}case"symbol":return ea.onSymbol(t);case"bigint":return((l=n.onBigInt)==null?void 0:l.call(n,t))??`${t}n`;case"undefined":return n.onUndefined??"undefined";case"string":return t.replaceAll("\\","\\\\");default:return t}},js=t=>{const n=t.getFullYear(),i=t.getMonth(),a=t.getDate(),l=t.getHours(),u=t.getMinutes(),f=t.getSeconds(),d=t.getMilliseconds();if(i===0&&a===1&&l===0&&u===0&&f===0&&d===0)return`${n}`;const m=`${K$[i]} ${a}, ${n}`;if(l===0&&u===0&&f===0&&d===0)return m;let p=t.toLocaleTimeString();const g=p.endsWith(" AM")||p.endsWith(" PM")?p.slice(-3):"";return g&&(p=p.slice(0,-g.length)),d?p+=`.${H$(d,3)}`:V$.test(p)&&(p=p.slice(0,-3)),`${p+g}, ${m}`},K$=["January","February","March","April","May","June","July","August","September","October","November","December"],V$=/:\d\d:00$/,H$=(t,n)=>String(t).padStart(n,"0"),Tb=(t,n,...[i])=>{const a=(i==null?void 0:i.stringifySymbol)??ze;let l=t;switch(typeof n){case"string":l=ws(n)?t===""?n:`${t}.${n}`:`${t}[${JSON.stringify(n)}]`;break;case"number":l=`${t}[${n}]`;break;case"symbol":l=`${t}[${a(n)}]`;break;default:i!=null&&i.stringifyNonKey?l=`${t}[${i.stringifyNonKey(n)}]`:J(`${ze(n)} must be a PropertyKey or stringifyNonKey must be passed to options`)}return l},Ds=(t,...n)=>t.reduce((i,a)=>Tb(i,a,...n),"");class Ob extends yb{constructor(...i){super();w(this,"cache",{});this.push(...i)}toJSON(){if(this.cache.json)return this.cache.json;this.cache.json=[];for(let i=0;i<this.length;i++)this.cache.json.push(typeof this[i]=="symbol"?ze(this[i]):this[i]);return this.cache.json}stringify(){return this.cache.stringify?this.cache.stringify:this.cache.stringify=Ds(this)}stringifyAncestors(){if(this.cache.stringifyAncestors)return this.cache.stringifyAncestors;let i="";const a=[i];for(const l of this)i=Tb(i,l),a.push(i);return this.cache.stringifyAncestors=a}}class G${constructor(n){w(this,"chars");w(this,"i");w(this,"def");this.def=n,this.chars=[...n],this.i=0}shift(){return this.chars[this.i++]??""}get lookahead(){return this.chars[this.i]??""}get nextLookahead(){return this.chars[this.i+1]??""}get length(){return this.chars.length}shiftUntil(n){let i="";for(;this.lookahead;){if(n(this,i))if(i[i.length-1]===Jf)i=i.slice(0,-1);else break;i+=this.shift()}return i}shiftUntilLookahead(n){return typeof n=="string"?this.shiftUntil(i=>i.lookahead===n):this.shiftUntil(i=>i.lookahead in n)}shiftUntilNonWhitespace(){return this.shiftUntil(()=>!(this.lookahead in qo))}jumpToIndex(n){this.i=n<0?this.length+n:n}jumpForward(n){this.i+=n}get location(){return this.i}get unscanned(){return this.chars.slice(this.i,this.length).join("")}get scanned(){return this.chars.slice(0,this.i).join("")}sliceChars(n,i){return this.chars.slice(n,i).join("")}lookaheadIs(n){return this.lookahead===n}lookaheadIsIn(n){return this.lookahead in n}}let Qf="$ark",J$=2;for(;Qf in globalThis;)Qf=`$ark${J$++}`;const jb=Qf;globalThis[jb]=Os;const Z=Os,Y$=t=>`${jb}.${t}`,$t=t=>Y$(Zf(t));class Db extends xb{constructor(...i){super();w(this,"argNames");w(this,"body","");w(this,"indentation",0);this.argNames=i;for(const a of i){if(a in this)throw new Error(`Arg name '${a}' would overwrite an existing property on FunctionBody`);this[a]=a}}indent(){return this.indentation+=4,this}dedent(){return this.indentation-=4,this}prop(i,a=!1){return Mb(i,a)}index(i,a=!1){return Lb(`${i}`,a)}line(i){return this.body+=`${" ".repeat(this.indentation)}${i}
73
- `,this}const(i,a){return this.line(`const ${i} = ${a}`),this}let(i,a){return this.line(`let ${i} = ${a}`)}set(i,a){return this.line(`${i} = ${a}`)}if(i,a){return this.block(`if (${i})`,a)}elseIf(i,a){return this.block(`else if (${i})`,a)}else(i){return this.block("else",i)}for(i,a,l=0){return this.block(`for (let i = ${l}; ${i}; i++)`,a)}forIn(i,a){return this.block(`for (const k in ${i})`,a)}block(i,a,l=""){return this.line(`${i} {`),this.indent(),a(this),this.dedent(),this.line(`}${l}`)}return(i=""){return this.line(`return ${i}`)}write(i="anonymous",a=0){return`${i}(${this.argNames.join(", ")}) { ${a?this.body.split(`
74
- `).map(l=>" ".repeat(a)+`${l}`).join(`
75
- `):this.body} }`}compile(){return new m$(...this.argNames,this.body)}}const Ms=t=>er(t,"object")||typeof t=="symbol"?$t(t):Ad(t),Mb=(t,n=!1)=>typeof t=="string"&&ws(t)?`${n?"?":""}.${t}`:Lb(I$(t),n),I$=t=>typeof t=="symbol"?$t(t):JSON.stringify(t),Lb=(t,n=!1)=>`${n?"?.":""}[${t}]`;class kf extends Db{constructor(i){super("data","ctx");w(this,"traversalKind");w(this,"optimistic");this.traversalKind=i.kind,this.optimistic=i.optimistic===!0}invoke(i,a){const l=(a==null?void 0:a.arg)??this.data,u=typeof i=="string"?!0:this.requiresContextFor(i),f=typeof i=="string"?i:i.id;return u?`${this.referenceToId(f,a)}(${l}, ${this.ctx})`:`${this.referenceToId(f,a)}(${l})`}referenceToId(i,a){const l=(a==null?void 0:a.kind)??this.traversalKind,u=`this.${i}${l}`;return a!=null&&a.bind?`${u}.bind(${a==null?void 0:a.bind})`:u}requiresContextFor(i){return this.traversalKind==="Apply"||i.allowsRequiresContext}initializeErrorCount(){return this.const("errorCount","ctx.currentErrorCount")}returnIfFail(){return this.if("ctx.currentErrorCount > errorCount",()=>this.return())}returnIfFailFast(){return this.if("ctx.failFast && ctx.currentErrorCount > errorCount",()=>this.return())}traverseKey(i,a,l){const u=this.requiresContextFor(l);return u&&this.line(`${this.ctx}.path.push(${i})`),this.check(l,{arg:a}),u&&this.line(`${this.ctx}.path.pop()`),this}check(i,a){return this.traversalKind==="Allows"?this.if(`!${this.invoke(i,a)}`,()=>this.return(!1)):this.line(this.invoke(i,a))}}const zb=t=>_e(t,(n,i)=>[n,kt(i)?[...i]:i]),Yn=vb("arkKind"),le=(t,n)=>(t==null?void 0:t[Yn])===n,Et=t=>le(t,"root")||le(t,"constraint"),Z$=["unit","proto","domain"],Ko=["required","optional","index","sequence"],Ub=["pattern","divisor","exactLength","max","min","maxLength","minLength","before","after"],$d=[...Ub,...Ko,"structure","predicate"],Vo=["alias","union","morph","unit","intersection","proto","domain"],Q$=[...Vo,...$d],Bb=_e($d,(t,n)=>[n,1]),F$=_e([...Ko,"undeclared"],(t,n)=>[n,1]),_b=_e(Q$,(t,n)=>[n,t]),mo=t=>typeof t=="string"&&t in _b,Eo=t=>_b[t],Cd=t=>Vo.slice(Eo(t)+1);[...Cd("union")];[...Cd("morph")];const Xi=t=>typeof t=="string"||typeof t=="boolean"||t===null?t:typeof t=="number"?Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t:Ms(t),Ho=t=>{let n="{ ";for(const[i,a]of Object.entries(t))n+=`${i}: ${Ms(a)}, `;return n+" }"},Fe=t=>{var i,a,l,u;const n=t;return n.hasAssociatedError&&((i=n.defaults).expected??(i.expected=f=>"description"in f?f.description:n.defaults.description(f)),(a=n.defaults).actual??(a.actual=f=>ze(f)),(l=n.defaults).problem??(l.problem=f=>`must be ${f.expected}${f.actual?` (was ${f.actual})`:""}`),(u=n.defaults).message??(u.message=f=>{if(f.path.length===0)return f.problem;const d=`${f.propString} ${f.problem}`;return d[0]==="["?`value at ${d}`:d})),n};class X$ extends Error{constructor(i,a){super(ze(a,{quoteKeys:!1,indent:4}));w(this,"name","ToJsonSchemaError");w(this,"code");w(this,"context");this.code=i,this.context=a}hasCode(i){return this.code===i}}const P$={dialect:"https://json-schema.org/draft/2020-12/schema",useRefs:!1,fallback:{arrayObject:t=>lt.throw("arrayObject",t),arrayPostfix:t=>lt.throw("arrayPostfix",t),defaultValue:t=>lt.throw("defaultValue",t),domain:t=>lt.throw("domain",t),morph:t=>lt.throw("morph",t),patternIntersection:t=>lt.throw("patternIntersection",t),predicate:t=>lt.throw("predicate",t),proto:t=>lt.throw("proto",t),symbolKey:t=>lt.throw("symbolKey",t),unit:t=>lt.throw("unit",t),date:t=>lt.throw("date",t)}},lt={Error:X$,throw:(...t)=>{throw new lt.Error(...t)},throwInternalOperandError:(t,n)=>nt(`Unexpected JSON Schema input for ${t}: ${ze(n)}`),defaultConfig:P$};Z.config??(Z.config={});const Ff=(t,n)=>{if(!n)return t;const i={...t};let a;for(a in n){const l={...t.keywords};if(a==="keywords"){for(const u in n[a]){const f=n.keywords[u];f!==void 0&&(l[u]=typeof f=="string"?{description:f}:f)}i.keywords=l}else a==="toJsonSchema"?i[a]=qb(t.toJsonSchema,n.toJsonSchema):mo(a)?i[a]={...t[a],...n[a]}:i[a]=n[a]}return i},qb=(t,n)=>{if(!t)return n??{};if(!n)return t;const i={...t};let a;for(a in n)a==="fallback"?i.fallback=W$(t.fallback,n.fallback):i[a]=n[a];return i},W$=(t,n)=>{t=Ly(t),n=Ly(n);const i={};let a;for(a in lt.defaultConfig.fallback)i[a]=n[a]??n.default??t[a]??t.default??lt.defaultConfig.fallback[a];return i},Ly=t=>typeof t=="function"?{default:t}:t??{};var zv,Uv;class ta extends(Uv=xb,zv=Yn,Uv){constructor({prefixPath:i,relativePath:a,...l},u){super();w(this,zv,"error");w(this,"path");w(this,"data");w(this,"nodeConfig");w(this,"input");w(this,"ctx");this.input=l,this.ctx=u,a$(this,l);const f=u.data;l.code==="union"&&(l.errors=l.errors.flatMap(m=>{const p=m.hasCode("union")?m.errors:[m];return!i&&!a?p:p.map(g=>g.transform(v=>({...v,path:FA(i,v.path,a)})))})),this.nodeConfig=u.config[this.code];const d=[...l.path??u.path];a&&d.push(...a),i&&d.unshift(...i),this.path=new Ob(...d),this.data="data"in l?l.data:f}transform(i){return new ta(i({data:this.data,path:this.path,...this.input}),this.ctx)}hasCode(i){return this.code===i}get propString(){return Ds(this.path)}get expected(){var a;if(this.input.expected)return this.input.expected;const i=((a=this.meta)==null?void 0:a.expected)??this.nodeConfig.expected;return typeof i=="function"?i(this.input):i}get actual(){var a;if(this.input.actual)return this.input.actual;const i=((a=this.meta)==null?void 0:a.actual)??this.nodeConfig.actual;return typeof i=="function"?i(this.data):i}get problem(){var a;if(this.input.problem)return this.input.problem;const i=((a=this.meta)==null?void 0:a.problem)??this.nodeConfig.problem;return typeof i=="function"?i(this):i}get message(){var a;if(this.input.message)return this.input.message;const i=((a=this.meta)==null?void 0:a.message)??this.nodeConfig.message;return typeof i=="function"?i(this):i}get flat(){return this.hasCode("intersection")?[...this.errors]:[this]}toJSON(){return{data:this.data,path:this.path,...this.input,expected:this.expected,actual:this.actual,problem:this.problem,message:this.message}}toString(){return this.message}throw(){throw this}}var Bv,_v;class ki extends(_v=yb,Bv=Yn,_v){constructor(i){super();w(this,Bv,"errors");w(this,"ctx");w(this,"byPath",Object.create(null));w(this,"byAncestorPath",Object.create(null));w(this,"count",0);w(this,"mutable",this);this.ctx=i}get flatByPath(){return _e(this.byPath,(i,a)=>[i,a.flat])}get flatProblemsByPath(){return _e(this.byPath,(i,a)=>[i,a.flat.map(l=>l.problem)])}throw(){throw this.toTraversalError()}toTraversalError(){return new e2(this)}add(i){this.includes(i)||this._add(i)}transform(i){const a=new ki(this.ctx);for(const l of this)a.add(i(l));return a}merge(i){for(const a of i)this.includes(a)||this._add(new ta({...a,path:[...this.ctx.path,...a.path]},this.ctx))}affectsPath(i){return this.length===0?!1:i.stringifyAncestors().some(a=>a in this.byPath)||i.stringify()in this.byAncestorPath}get summary(){return this.toString()}get issues(){return this}toJSON(){return[...this.map(i=>i.toJSON())]}toString(){return this.join(`
76
- `)}_add(i){const a=this.byPath[i.propString];if(a){if(a.hasCode("union")&&a.errors.length===0)return;const l=i.hasCode("union")&&i.errors.length===0?i:new ta({code:"intersection",errors:a.hasCode("intersection")?[...a.errors,i]:[a,i]},this.ctx),u=this.indexOf(a);this.mutable[u===-1?this.length:u]=l,this.byPath[i.propString]=l,this.addAncestorPaths(i)}else this.byPath[i.propString]=i,this.addAncestorPaths(i),this.mutable.push(i);this.count++}addAncestorPaths(i){for(const a of i.path.stringifyAncestors())this.byAncestorPath[a]=Be(this.byAncestorPath[a],i)}}class e2 extends Error{constructor(i){var n=(...YD)=>(super(...YD),w(this,"name","TraversalError"),this);i.length===1?n(i.summary):n(`
77
- `+i.map(a=>` • ${t2(a)}`).join(`
78
- `)),Object.defineProperty(this,"arkErrors",{value:i,enumerable:!1})}}const t2=t=>t.toString().split(`
79
- `).join(`
80
- `);class Ir{constructor(n,i){w(this,"path",[]);w(this,"errors",new ki(this));w(this,"root");w(this,"config");w(this,"queuedMorphs",[]);w(this,"branches",[]);w(this,"seen",{});this.root=n,this.config=i}get data(){let n=this.root;for(const i of this.path)n=n==null?void 0:n[i];return n}get propString(){return Ds(this.path)}reject(n){return this.error(n),!1}mustBe(n){return this.error(n),!1}error(n){const i=typeof n=="object"?n.code?n:{...n,code:"predicate"}:{code:"predicate",expected:n};return this.errorFromContext(i)}hasError(){return this.currentErrorCount!==0}get currentBranch(){return this.branches.at(-1)}queueMorphs(n){const i={path:new Ob(...this.path),morphs:n};this.currentBranch?this.currentBranch.queuedMorphs.push(i):this.queuedMorphs.push(i)}finalize(n){return this.queuedMorphs.length&&(typeof this.root=="object"&&this.root!==null&&this.config.clone&&(this.root=this.config.clone(this.root)),this.applyQueuedMorphs()),this.hasError()?n?n(this.errors):this.errors:this.root}get currentErrorCount(){return this.currentBranch?this.currentBranch.error?1:0:this.errors.count}get failFast(){return this.branches.length!==0}pushBranch(){this.branches.push({error:void 0,queuedMorphs:[]})}popBranch(){return this.branches.pop()}get external(){return this}errorFromNodeContext(n){return this.errorFromContext(n)}errorFromContext(n){const i=new ta(n,this);return this.currentBranch?this.currentBranch.error=i:this.errors.add(i),i}applyQueuedMorphs(){for(;this.queuedMorphs.length;){const n=this.queuedMorphs;this.queuedMorphs=[];for(const{path:i,morphs:a}of n)this.errors.affectsPath(i)||this.applyMorphsAtPath(i,a)}}applyMorphsAtPath(n,i){const a=n.at(-1);let l;if(a!==void 0){l=this.root;for(let u=0;u<n.length-1;u++)l=l[n[u]]}this.path=[...n];for(const u of i){const f=Et(u),d=u(l===void 0?this.root:l[a],this);if(d instanceof ta){this.errors.add(d);break}if(d instanceof ki){f||this.errors.merge(d);break}l===void 0?this.root=d:l[a]=d,this.applyQueuedMorphs()}}}const In=(t,n,i)=>{if(!i)return n();i.path.push(t);const a=n();return i.path.pop(),a};class Kb extends sa{constructor(i,a){var u;super((f,d,m=this.onFail)=>d?(this.traverseApply(f,d),d.hasError()?d.errors:d.data):this.rootApply(f,m),{attach:i});w(this,"attachments");w(this,"$");w(this,"onFail");w(this,"includesTransform");w(this,"includesContextualPredicate");w(this,"isCyclic");w(this,"allowsRequiresContext");w(this,"rootApplyStrategy");w(this,"contextFreeMorph");w(this,"rootApply");w(this,"referencesById");w(this,"shallowReferences");w(this,"flatRefs");w(this,"flatMorphs");w(this,"allows");w(this,"compiledMeta",r2(this.metaJson));w(this,"precedence",Eo(this.kind));w(this,"precompilation");w(this,"assert",(i,a)=>this(i,a,l=>l.throw()));this.attachments=i,this.$=a,this.onFail=this.meta.onFail??this.$.resolvedConfig.onFail,this.includesTransform=this.hasKind("morph")||this.hasKind("structure")&&this.structuralMorph!==void 0,this.includesContextualPredicate=this.hasKind("predicate")&&this.inner.predicate.length!==1,this.isCyclic=this.kind==="alias",this.referencesById={[this.id]:this},this.shallowReferences=this.hasKind("structure")?[this,...this.children]:this.children.reduce((f,d)=>a2(f,d.shallowReferences),[this]);const l=this.isStructural();this.flatRefs=[],this.flatMorphs=[];for(let f=0;f<this.children.length;f++){if(this.includesTransform||(this.includesTransform=this.children[f].includesTransform),this.includesContextualPredicate||(this.includesContextualPredicate=this.children[f].includesContextualPredicate),this.isCyclic||(this.isCyclic=this.children[f].isCyclic),!l){const d=this.children[f].flatRefs;for(let m=0;m<d.length;m++){const p=d[m];if(!this.flatRefs.some(g=>Vb(g,p))){this.flatRefs.push(p);for(const g of p.node.branches)(g.hasKind("morph")||g.hasKind("intersection")&&((u=g.structure)==null?void 0:u.structuralMorph)!==void 0)&&this.flatMorphs.push({path:p.path,propString:p.propString,node:g})}}}Object.assign(this.referencesById,this.children[f].referencesById)}this.flatRefs.sort((f,d)=>f.path.length>d.path.length?1:f.path.length<d.path.length?-1:f.propString>d.propString?1:f.propString<d.propString||f.node.expression<d.node.expression?-1:1),this.allowsRequiresContext=this.includesContextualPredicate||this.isCyclic,this.rootApplyStrategy=!this.allowsRequiresContext&&this.flatMorphs.length===0?this.shallowMorphs.length===0?"allows":this.shallowMorphs.every(f=>f.length===1||f.name==="$arkStructuralMorph")?this.hasKind("union")?this.branches.some(f=>f.shallowMorphs.length>1)?"contextual":"branchedOptimistic":this.shallowMorphs.length>1?"contextual":"optimistic":"contextual":"contextual",this.rootApply=this.createRootApply(),this.allows=this.allowsRequiresContext?f=>this.traverseAllows(f,new Ir(f,this.$.resolvedConfig)):f=>this.traverseAllows(f)}get shallowMorphs(){return[]}createRootApply(){switch(this.rootApplyStrategy){case"allows":return(a,l)=>{if(this.allows(a))return a;const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"contextual":return(a,l)=>{const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"optimistic":this.contextFreeMorph=this.shallowMorphs[0];const i=this.$.resolvedConfig.clone;return(a,l)=>{if(this.allows(a))return this.contextFreeMorph(i&&(typeof a=="object"&&a!==null||typeof a=="function")?i(a):a);const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"branchedOptimistic":return this.createBranchedOptimisticRootApply();default:return this.rootApplyStrategy,nt(`Unexpected rootApplyStrategy ${this.rootApplyStrategy}`)}}cacheGetter(i,a){return Object.defineProperty(this,i,{value:a}),a}get description(){var i;return this.cacheGetter("description",((i=this.meta)==null?void 0:i.description)??this.$.resolvedConfig[this.kind].description(this))}get references(){return Object.values(this.referencesById)}traverse(i,a){return this(i,a,null)}get in(){return this.cacheGetter("in",this.getIo("in"))}get out(){return this.cacheGetter("out",this.getIo("out"))}getIo(i){if(!this.includesTransform)return this;const a={};for(const[l,u]of this.innerEntries){const f=this.impl.keys[l];if(f.reduceIo)f.reduceIo(i,a,u);else if(f.child){const d=u;a[l]=kt(d)?d.map(m=>m[i]):d[i]}else a[l]=u}return this.$.node(this.kind,a)}toJSON(){return this.json}toString(){return`Type<${this.expression}>`}equals(i){const a=Et(i)?i:this.$.parseDefinition(i);return this.innerHash===a.innerHash}ifEquals(i){return this.equals(i)?this:void 0}hasKind(i){return this.kind===i}assertHasKind(i){return this.kind!==i&&Pr(`${this.kind} node was not of asserted kind ${i}`),this}hasKindIn(...i){return i.includes(this.kind)}assertHasKindIn(...i){return Yi(i,this.kind)||Pr(`${this.kind} node was not one of asserted kinds ${i}`),this}isBasis(){return Yi(Z$,this.kind)}isConstraint(){return Yi($d,this.kind)}isStructural(){return Yi(Ko,this.kind)}isRefinement(){return Yi(Ub,this.kind)}isRoot(){return Yi(Vo,this.kind)}isUnknown(){return this.hasKind("intersection")&&this.children.length===0}isNever(){return this.hasKind("union")&&this.children.length===0}hasUnit(i){return this.hasKind("unit")&&this.allows(i)}hasOpenIntersection(){return this.impl.intersectionIsOpen}get nestableExpression(){return this.expression}select(i){const a=ps.normalize(i);return this._select(a)}_select(i){let a=ps.applyBoundary[i.boundary??"references"](this);return i.kind&&(a=a.filter(l=>l.kind===i.kind)),i.where&&(a=a.filter(i.where)),ps.applyMethod[i.method??"filter"](a,this,i)}transform(i,a){return this._transform(i,this._createTransformContext(a))}_createTransformContext(i){return{root:this,selected:void 0,seen:{},path:[],parseOptions:{prereduced:(i==null?void 0:i.prereduced)??!1},undeclaredKeyHandling:void 0,...i}}_transform(i,a){var v;const l=a.bindScope??this.$;if(a.seen[this.id])return this.$.lazilyResolve(a.seen[this.id]);if(((v=a.shouldTransform)==null?void 0:v.call(a,this,a))===!1)return this;let u;a.seen[this.id]=()=>u,this.hasKind("structure")&&this.undeclared!==a.undeclaredKeyHandling&&(a={...a,undeclaredKeyHandling:this.undeclared});const f=_e(this.inner,(b,k)=>{if(!this.impl.keys[b].child)return[b,k];const N=k;if(!kt(N)){const U=N._transform(i,a);return U?[b,U]:[]}if(N.length===0)return[b,k];const T=N.flatMap(U=>U._transform(i,a)??[]);return T.length?[b,T]:[]});delete a.seen[this.id];const d=Object.assign(f,{meta:this.meta}),m=a.selected&&!a.selected.includes(this)?d:i(this.kind,d,a);if(m===null)return null;if(Et(m))return u=m;const p=Object.keys(m);return(p.length===0||p.length===1&&p[0]==="meta")&&!Ts(this.inner)?null:(this.kind==="required"||this.kind==="optional"||this.kind==="index")&&!("value"in m)?a.undeclaredKeyHandling?{...m,value:Z.intrinsic.unknown}:null:(this.kind==="morph"&&(m.in??(m.in=Z.intrinsic.unknown)),u=l.node(this.kind,m,a.parseOptions))}configureReferences(i,a="references"){const l=ps.normalize(a),u=typeof i=="string"?(p,g)=>({...g,meta:{...g.meta,description:i}}):typeof i=="function"?(p,g)=>({...g,meta:i(g.meta)}):(p,g)=>({...g,meta:{...g.meta,...i}});if(l.boundary==="self")return this.$.node(this.kind,u(this.kind,{...this.inner,meta:this.meta}));const f=this._select(l),d=f&&Cs(f),m=l.boundary==="child"?(p,g)=>g.root.children.includes(p):l.boundary==="shallow"?p=>p.kind!=="structure":()=>!0;return this.$.finalize(this.transform(u,{shouldTransform:m,selected:d}))}}const ps={applyBoundary:{self:t=>[t],child:t=>[...t.children],shallow:t=>[...t.shallowReferences],references:t=>[...t.references]},applyMethod:{filter:t=>t,assertFilter:(t,n,i)=>(t.length===0&&Pr(zy(n,i)),t),find:t=>t[0],assertFind:(t,n,i)=>(t.length===0&&Pr(zy(n,i)),t[0])},normalize:t=>typeof t=="function"?{boundary:"references",method:"filter",where:t}:typeof t=="string"?Nn(t,ps.applyBoundary)?{method:"filter",boundary:t}:{boundary:"references",method:"filter",kind:t}:{boundary:"references",method:"filter",...t}},zy=(t,n)=>`${t} had no references matching ${ze(n)}.`,n2=t=>Ds(t,{stringifyNonKey:n=>n.expression}),i2=/"(\$ark\.[^"]+)"/g,r2=t=>JSON.stringify(t).replaceAll(i2,"$1"),Ni=(t,n)=>({path:t,node:n,propString:n2(t)}),Vb=(t,n)=>t.propString===n.propString&&t.node.equals(n.node),Uy=(t,n)=>Fi(t,n,{isEqual:Vb}),a2=(t,n)=>Fi(t,n,{isEqual:(i,a)=>i.equals(a)});class W extends Array{static init(n,i,a,l){return new W({kind:n,l:i,r:a,path:(l==null?void 0:l.path)??[],optional:(l==null?void 0:l.optional)??!1})}add(n,i,a,l){return this.push({kind:n,l:i,r:a,path:(l==null?void 0:l.path)??[],optional:(l==null?void 0:l.optional)??!1}),this}get summary(){return this.describeReasons()}describeReasons(){if(this.length===1){const{path:n,l:i,r:a}=this[0],l=Ds(n);return Hb(`Intersection${l&&` at ${l}`} of ${By(i,a)}`)}return`The following intersections result in unsatisfiable types:
81
- • ${this.map(({path:n,l:i,r:a})=>`${n}: ${By(i,a)}`).join(`
82
- • `)}`}throw(){return J(this.describeReasons())}invert(){const n=this.map(i=>({...i,l:i.r,r:i.l}));return n instanceof W?n:new W(...n)}withPrefixKey(n,i){return this.map(a=>({...a,path:[n,...a.path],optional:a.optional||i==="optional"}))}toNeverIfDisjoint(){return Z.intrinsic.never}}const By=(t,n)=>`${Xf(t)} and ${Xf(n)}`,Xf=t=>Et(t)?t.expression:kt(t)?t.map(Xf).join(" | ")||"never":String(t),Hb=t=>`${t} results in an unsatisfiable type`,Jr={},Zn=(t,n,i)=>mt(t,n,{$:i,invert:!1,pipe:!1}),Pf=(t,n,i)=>mt(t,n,{$:i,invert:!1,pipe:!0}),mt=(t,n,i)=>{const a=i.pipe?"|>":"&",l=`${t.hash}${a}${n.hash}`;if(Jr[l]!==void 0)return Jr[l];if(!i.pipe){const d=`${n.hash}${a}${t.hash}`;if(Jr[d]!==void 0){const m=Jr[d],p=m instanceof W?m.invert():m;return Jr[l]=p,p}}const u=!i.pipe||!t.includesTransform&&!n.includesTransform;if(u&&t.equals(n))return t;let f=u?Wf(t,n,i):t.hasKindIn(...Vo)?s2(t,n,i):Wf(t,n,i);return Et(f)&&(t.equals(f)?f=t:n.equals(f)&&(f=n)),Jr[l]=f,f},Wf=(t,n,i)=>{const a=t.precedence<n.precedence?t.kind:n.kind,l=t.impl.intersections[n.kind]??n.impl.intersections[t.kind];if(l===void 0)return null;if(a===t.kind)return l(t,n,i);{let u=l(n,t,{...i,invert:!i.invert});return u instanceof W&&(u=u.invert()),u}},s2=(t,n,i)=>t.includesTransform||n.includesTransform?i.invert?_y(n,t,i):_y(t,n,i):Wf(t,n,i),_y=(t,n,i)=>t.distribute(a=>l2(a,n,i),a=>{const l=a.filter(Et);if(l.length===0)return W.init("union",t.branches,n.branches);if(l.length<t.branches.length||!t.branches.every((f,d)=>f.in.equals(l[d].in)))return i.$.parseSchema(l);if(l.length===1)return l[0];const u={branches:l};return i.$.parseSchema(u)}),l2=(t,n,i)=>{if(t.hasKind("morph")){const l=[...t.morphs];if(t.lastMorphIfNode){const u=mt(t.lastMorphIfNode,n,i);if(u instanceof W)return u;l[l.length-1]=u}else l.push(n);return i.$.node("morph",{morphs:l,in:t.inner.in})}if(n.hasKind("morph")){const l=mt(t,n.in,i);return l instanceof W?l:i.$.node("morph",{morphs:[n],in:l})}return i.$.node("morph",{morphs:[n],in:t})};class la extends Kb{constructor(i,a){super(i,a);w(this,"impliedSiblings");Object.defineProperty(this,Yn,{value:"constraint",enumerable:!1})}intersect(i){return Zn(this,i,this.$)}}class Go extends la{constructor(){super(...arguments);w(this,"traverseApply",(i,a)=>{this.traverseAllows(i,a)||a.errorFromNodeContext(this.errorContext)})}compile(i){i.traversalKind==="Allows"?i.return(this.compiledCondition):i.if(this.compiledNegation,()=>i.line(`${i.ctx}.errorFromNodeContext(${this.compiledErrorContext})`))}get errorContext(){return{code:this.kind,description:this.description,meta:this.meta,...this.inner}}get compiledErrorContext(){return Ho(this.errorContext)}}const Lt=t=>(n,i)=>{if(kt(n)){if(n.length===0)return;const l=n.map(u=>i.$.node(t,u));return t==="predicate"?l:l.sort((u,f)=>u.hash<f.hash?-1:1)}const a=i.$.node(t,n);return a.hasOpenIntersection()?[a]:a},Ao=t=>{const n=t.r.shift();if(!n){let a=t.l.length===0&&t.kind==="structure"?Z.intrinsic.unknown.internal:t.ctx.$.node(t.kind,Object.assign(t.baseInner,o2(t.l)),{prereduced:!0});for(const l of t.roots){if(a instanceof W)return a;a=mt(l,a,t.ctx)}return a}let i=!1;for(let a=0;a<t.l.length;a++){const l=mt(t.l[a],n,t.ctx);if(l!==null){if(l instanceof W)return l;if(i){if(!t.l.includes(l))return nt(`Unexpectedly encountered multiple distinct intersection results for refinement ${l}`)}else{if(l.isRoot())return t.roots.push(l),t.l.splice(a),Ao(t);t.l[a]=l,i=!0}}}if(i||t.l.push(n),t.kind==="intersection"&&n.impliedSiblings)for(const a of n.impliedSiblings)Fi(t.r,a);return Ao(t)},$o=t=>Object.entries(t).flatMap(([i,a])=>i in Bb?a:[]).sort((i,a)=>i.precedence<a.precedence?-1:i.precedence>a.precedence?1:i.kind==="predicate"&&a.kind==="predicate"?0:i.hash<a.hash?-1:1),o2=t=>{const n={};for(const i of t)if(i.hasOpenIntersection())n[i.kind]=Be(n[i.kind],i);else{if(n[i.kind])return nt(`Unexpected intersection of closed refinements of kind ${i.kind}`);n[i.kind]=i}return n},u2=(...t)=>J(c2(...t)),c2=(t,n,i)=>{const a=i.hasKind("morph")?"a morph":i.isUnknown()?"unknown":i.exclude(n).defaultShortDescription;return`${x$(t)} operand must be ${n.description} (was ${a})`},f2=(t,n,i)=>new Co(t,n,i,i,null);class Gb extends sa{}var qv,Kv;class Co extends(Kv=sa,qv=Yn,Kv){constructor(i,a,l,u,f){super((...d)=>{const m=_e(this.names,(p,g)=>{const v=this.arg$.parse(d[p]);return v.extends(this.constraints[p])||J(d2(g,this.constraints[p].expression,v.expression)),[g,v]});if(this.defIsLazy()){const p=this.bodyDef(m);return this.$.parse(p)}return this.$.parse(a,{args:m})});w(this,qv,"generic");w(this,"paramDefs");w(this,"bodyDef");w(this,"$");w(this,"arg$");w(this,"baseInstantiation");w(this,"hkt");w(this,"description");this.paramDefs=i,this.bodyDef=a,this.$=l,this.arg$=u,this.hkt=f,this.description=f?new f().description??`a generic type for ${f.constructor.name}`:"a generic type",this.baseInstantiation=this(...this.constraints)}defIsLazy(){return this.bodyDef instanceof Gb}cacheGetter(i,a){return Object.defineProperty(this,i,{value:a}),a}get json(){return this.cacheGetter("json",{params:this.params.map(i=>i[1].isUnknown()?i[0]:[i[0],i[1].json]),body:q$(this.bodyDef)})}get params(){return this.cacheGetter("params",this.paramDefs.map(i=>typeof i=="string"?[i,Z.intrinsic.unknown]:[i[0],this.$.parse(i[1])]))}get names(){return this.cacheGetter("names",this.params.map(i=>i[0]))}get constraints(){return this.cacheGetter("constraints",this.params.map(i=>i[1]))}get internal(){return this}get referencesById(){return this.baseInstantiation.internal.referencesById}get references(){return this.baseInstantiation.internal.references}}const d2=(t,n,i)=>`${t} must be assignable to ${n} (was ${i})`,h2=Fe({kind:"predicate",hasAssociatedError:!0,collapsibleKey:"predicate",keys:{predicate:{}},normalize:t=>typeof t=="function"?{predicate:t}:t,defaults:{description:t=>`valid according to ${t.predicate.name||"an anonymous predicate"}`},intersectionIsOpen:!0,intersections:{predicate:()=>null}});class p2 extends la{constructor(){super(...arguments);w(this,"serializedPredicate",$t(this.predicate));w(this,"compiledCondition",`${this.serializedPredicate}(data, ctx)`);w(this,"compiledNegation",`!${this.compiledCondition}`);w(this,"impliedBasis",null);w(this,"expression",this.serializedPredicate);w(this,"traverseAllows",this.predicate);w(this,"errorContext",{code:"predicate",description:this.description,meta:this.meta});w(this,"compiledErrorContext",Ho(this.errorContext));w(this,"traverseApply",(i,a)=>{!this.predicate(i,a.external)&&!a.hasError()&&a.errorFromNodeContext(this.errorContext)})}compile(i){if(i.traversalKind==="Allows"){i.return(this.compiledCondition);return}i.if(`${this.compiledNegation} && !ctx.hasError()`,()=>i.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`))}reduceJsonSchema(i,a){return a.fallback.predicate({code:"predicate",base:i,predicate:this.predicate})}}const Jb={implementation:h2,Node:p2},m2=Fe({kind:"divisor",collapsibleKey:"rule",keys:{rule:{parse:t=>Number.isInteger(t)?t:J(y2(t))}},normalize:t=>typeof t=="number"?{rule:t}:t,hasAssociatedError:!0,defaults:{description:t=>t.rule===1?"an integer":t.rule===2?"even":`a multiple of ${t.rule}`},intersections:{divisor:(t,n,i)=>i.$.node("divisor",{rule:Math.abs(t.rule*n.rule/v2(t.rule,n.rule))})},obviatesBasisDescription:!0});class g2 extends Go{constructor(){super(...arguments);w(this,"traverseAllows",i=>i%this.rule===0);w(this,"compiledCondition",`data % ${this.rule} === 0`);w(this,"compiledNegation",`data % ${this.rule} !== 0`);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"expression",`% ${this.rule}`)}reduceJsonSchema(i){return i.type="integer",this.rule===1||(i.multipleOf=this.rule),i}}const Yb={implementation:m2,Node:g2},y2=t=>`divisor must be an integer (was ${t})`,v2=(t,n)=>{let i,a=t,l=n;for(;l!==0;)i=l,l=a%l,a=i;return a};class oa extends Go{constructor(){super(...arguments);w(this,"boundOperandKind",w2[this.kind]);w(this,"compiledActual",this.boundOperandKind==="value"?"data":this.boundOperandKind==="length"?"data.length":"data.valueOf()");w(this,"comparator",N2(this.kind,this.exclusive));w(this,"numericLimit",this.rule.valueOf());w(this,"expression",`${this.comparator} ${this.rule}`);w(this,"compiledCondition",`${this.compiledActual} ${this.comparator} ${this.numericLimit}`);w(this,"compiledNegation",`${this.compiledActual} ${b2[this.comparator]} ${this.numericLimit}`);w(this,"stringLimit",this.boundOperandKind==="date"?k2(this.numericLimit):`${this.numericLimit}`);w(this,"limitKind",this.comparator[0]==="<"?"upper":"lower")}isStricterThan(i){return(this.limitKind==="upper"?this.numericLimit<i.numericLimit:this.numericLimit>i.numericLimit)||this.numericLimit===i.numericLimit&&this.exclusive===!0&&!i.exclusive}overlapsRange(i){return!(this.isStricterThan(i)||this.numericLimit===i.numericLimit&&(this.exclusive||i.exclusive))}overlapIsUnit(i){return this.numericLimit===i.numericLimit&&!this.exclusive&&!i.exclusive}}const b2={"<":">=","<=":">",">":"<=",">=":"<"},x2={min:"max",minLength:"maxLength",after:"before"},Ib={parse:t=>t||void 0},Zb=t=>n=>{if(typeof n=="number")return{rule:n};const{exclusive:i,...a}=n;return i?{...a,rule:t==="minLength"?a.rule+1:a.rule-1}:a},Qb=t=>n=>{if(typeof n=="number"||typeof n=="string"||n instanceof Date)return{rule:n};const{exclusive:i,...a}=n;if(!i)return a;const l=typeof a.rule=="number"?a.rule:typeof a.rule=="string"?new Date(a.rule).valueOf():a.rule.valueOf();return i?{...a,rule:t==="after"?l+1:l-1}:a},Fb=t=>typeof t=="string"||typeof t=="number"?new Date(t):t,S2=(t,n)=>`${t} bound must be a positive integer (was ${n})`,Td=t=>n=>((!Number.isInteger(n)||n<0)&&J(S2(t,n)),n),w2={min:"value",max:"value",minLength:"length",maxLength:"length",after:"date",before:"date"},N2=(t,n)=>`${Nn(t,x2)?">":"<"}${n?"":"="}`,k2=t=>typeof t=="string"?t:new Date(t).toLocaleString(),R2=t=>`Bounded expression ${t} must be exactly one of number, string, Array, or Date`,E2=Fe({kind:"after",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Fb,serialize:t=>t.toISOString()}},normalize:Qb("after"),defaults:{description:t=>`${t.collapsibleLimitString} or later`,actual:js},intersections:{after:(t,n)=>t.isStricterThan(n)?t:n}});class A2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.Date.internal);w(this,"collapsibleLimitString",js(this.rule));w(this,"traverseAllows",i=>i>=this.rule)}reduceJsonSchema(i,a){return a.fallback.date({code:"date",base:i,after:this.rule})}}const Xb={implementation:E2,Node:A2},$2=Fe({kind:"before",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Fb,serialize:t=>t.toISOString()}},normalize:Qb("before"),defaults:{description:t=>`${t.collapsibleLimitString} or earlier`,actual:js},intersections:{before:(t,n)=>t.isStricterThan(n)?t:n,after:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("unit",{unit:t.rule}):null:W.init("range",t,n)}});class C2 extends oa{constructor(){super(...arguments);w(this,"collapsibleLimitString",js(this.rule));w(this,"traverseAllows",i=>i<=this.rule);w(this,"impliedBasis",Z.intrinsic.Date.internal)}reduceJsonSchema(i,a){return a.fallback.date({code:"date",base:i,before:this.rule})}}const Pb={implementation:$2,Node:C2},T2=Fe({kind:"exactLength",collapsibleKey:"rule",keys:{rule:{parse:Td("exactLength")}},normalize:t=>typeof t=="number"?{rule:t}:t,hasAssociatedError:!0,defaults:{description:t=>`exactly length ${t.rule}`,actual:t=>`${t.length}`},intersections:{exactLength:(t,n,i)=>W.init("unit",i.$.node("unit",{unit:t.rule}),i.$.node("unit",{unit:n.rule}),{path:["length"]}),minLength:(t,n)=>t.rule>=n.rule?t:W.init("range",t,n),maxLength:(t,n)=>t.rule<=n.rule?t:W.init("range",t,n)}});class O2 extends Go{constructor(){super(...arguments);w(this,"traverseAllows",i=>i.length===this.rule);w(this,"compiledCondition",`data.length === ${this.rule}`);w(this,"compiledNegation",`data.length !== ${this.rule}`);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"expression",`== ${this.rule}`)}reduceJsonSchema(i){switch(i.type){case"string":return i.minLength=this.rule,i.maxLength=this.rule,i;case"array":return i.minItems=this.rule,i.maxItems=this.rule,i;default:return lt.throwInternalOperandError("exactLength",i)}}}const Wb={implementation:T2,Node:O2},j2=Fe({kind:"max",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{},exclusive:Ib},normalize:t=>typeof t=="number"?{rule:t}:t,defaults:{description:t=>t.rule===0?t.exclusive?"negative":"non-positive":`${t.exclusive?"less than":"at most"} ${t.rule}`},intersections:{max:(t,n)=>t.isStricterThan(n)?t:n,min:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("unit",{unit:t.rule}):null:W.init("range",t,n)},obviatesBasisDescription:!0});class D2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"traverseAllows",this.exclusive?i=>i<this.rule:i=>i<=this.rule)}reduceJsonSchema(i){return this.exclusive?i.exclusiveMaximum=this.rule:i.maximum=this.rule,i}}const e0={implementation:j2,Node:D2},M2=Fe({kind:"maxLength",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Td("maxLength")}},reduce:(t,n)=>t.rule===0?n.node("exactLength",t):void 0,normalize:Zb("maxLength"),defaults:{description:t=>`at most length ${t.rule}`,actual:t=>`${t.length}`},intersections:{maxLength:(t,n)=>t.isStricterThan(n)?t:n,minLength:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("exactLength",{rule:t.rule}):null:W.init("range",t,n)}});class L2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"traverseAllows",i=>i.length<=this.rule)}reduceJsonSchema(i){switch(i.type){case"string":return i.maxLength=this.rule,i;case"array":return i.maxItems=this.rule,i;default:return lt.throwInternalOperandError("maxLength",i)}}}const t0={implementation:M2,Node:L2},z2=Fe({kind:"min",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{},exclusive:Ib},normalize:t=>typeof t=="number"?{rule:t}:t,defaults:{description:t=>t.rule===0?t.exclusive?"positive":"non-negative":`${t.exclusive?"more than":"at least"} ${t.rule}`},intersections:{min:(t,n)=>t.isStricterThan(n)?t:n},obviatesBasisDescription:!0});class U2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"traverseAllows",this.exclusive?i=>i>this.rule:i=>i>=this.rule)}reduceJsonSchema(i){return this.exclusive?i.exclusiveMinimum=this.rule:i.minimum=this.rule,i}}const n0={implementation:z2,Node:U2},B2=Fe({kind:"minLength",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Td("minLength")}},reduce:t=>t.rule===0?Z.intrinsic.unknown:void 0,normalize:Zb("minLength"),defaults:{description:t=>t.rule===1?"non-empty":`at least length ${t.rule}`,actual:t=>t.length===0?"":`${t.length}`},intersections:{minLength:(t,n)=>t.isStricterThan(n)?t:n}});class _2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"traverseAllows",i=>i.length>=this.rule)}reduceJsonSchema(i){switch(i.type){case"string":return i.minLength=this.rule,i;case"array":return i.minItems=this.rule,i;default:return lt.throwInternalOperandError("minLength",i)}}}const i0={implementation:B2,Node:_2},q2={min:n0.implementation,max:e0.implementation,minLength:i0.implementation,maxLength:t0.implementation,exactLength:Wb.implementation,after:Xb.implementation,before:Pb.implementation},K2={min:n0.Node,max:e0.Node,minLength:i0.Node,maxLength:t0.Node,exactLength:Wb.Node,after:Xb.Node,before:Pb.Node},V2=Fe({kind:"pattern",collapsibleKey:"rule",keys:{rule:{},flags:{}},normalize:t=>typeof t=="string"?{rule:t}:t instanceof RegExp?t.flags?{rule:t.source,flags:t.flags}:{rule:t.source}:t,obviatesBasisDescription:!0,obviatesBasisExpression:!0,hasAssociatedError:!0,intersectionIsOpen:!0,defaults:{description:t=>`matched by ${t.rule}`},intersections:{pattern:()=>null}});class H2 extends Go{constructor(){super(...arguments);w(this,"instance",new RegExp(this.rule,this.flags));w(this,"expression",`${this.instance}`);w(this,"traverseAllows",this.instance.test.bind(this.instance));w(this,"compiledCondition",`${this.expression}.test(data)`);w(this,"compiledNegation",`!${this.compiledCondition}`);w(this,"impliedBasis",Z.intrinsic.string.internal)}reduceJsonSchema(i,a){return i.pattern?a.fallback.patternIntersection({code:"patternIntersection",base:i,pattern:this.rule}):(i.pattern=this.rule,i)}}const r0={implementation:V2,Node:H2},go=(t,n)=>{const i=G2(t);return n&&!n.includes(i)?J(`Root of kind ${i} should be one of ${n}`):i},G2=t=>{if(le(t,"root"))return t.kind;if(typeof t=="string")return t[0]==="$"?"alias":t in Jn?"domain":"proto";if(typeof t=="function")return"proto";if(typeof t!="object"||t===null)return J(qy(t));if("morphs"in t)return"morph";if("branches"in t||kt(t))return"union";if("unit"in t)return"unit";if("reference"in t)return"alias";const n=Object.keys(t);return n.length===0||n.some(i=>i in Bb)?"intersection":"proto"in t?"proto":"domain"in t?"domain":J(qy(t))},qy=t=>`${ze(t)} is not a valid type schema`,ro={},J2=t=>kt(t)?t.map(n=>n.collapsibleJson):t.collapsibleJson,an={};Z.nodesByRegisteredId=an;const a0=t=>(ro[t]??(ro[t]=0),`${t}${++ro[t]}`),s0=t=>{var p;const n=Jo[t.kind],i=((p=n.applyConfig)==null?void 0:p.call(n,t.def,t.$.resolvedConfig))??t.def,a={},{meta:l,...u}=i,f=l===void 0?{}:typeof l=="string"?{description:l}:l,d=bb(u).sort(([g],[v])=>mo(g)?mo(v)?Eo(g)-Eo(v):1:mo(v)||g<v?-1:1).filter(([g,v])=>{if(g.startsWith("meta.")){const b=g.slice(5);return f[b]=v,!1}return!0});for(const g of d){const v=g[0],b=n.keys[v];if(!b)return J(`Key ${v} is not valid on ${t.kind} schema`);const k=b.parse?b.parse(g[1],t):g[1];k!==qn&&(k!==void 0||b.preserveUndefined)&&(a[v]=k)}if(n.reduce&&!t.prereduced){const g=n.reduce(a,t.$);if(g)return g instanceof W?g.throw():I2(g,f)}return Od({id:t.id,kind:t.kind,inner:a,meta:f,$:t.$})},Od=({id:t,kind:n,inner:i,meta:a,$:l,ignoreCache:u})=>{const f=Jo[n],d=bb(i),m=[];let p={};for(const[M,z]of d){const G=f.keys[M],X=G.serialize??(G.child?J2:Xi);if(p[M]=X(z),G.child===!0){const F=z;kt(F)?m.push(...F):m.push(F)}else typeof G.child=="function"&&m.push(...G.child(z))}f.finalizeInnerJson&&(p=f.finalizeInnerJson(p));let g={...p},v={};Ts(a)||(v=_e(a,(M,z)=>[M,M==="examples"?z:Xi(z)]),g.meta=ao(v,"description",!0)),p=ao(p,f.collapsibleKey,!1);const b=JSON.stringify({kind:n,...p});g=ao(g,f.collapsibleKey,!1);const k=ao(g,f.collapsibleKey,!0),N=JSON.stringify({kind:n,...g});if(l.nodesByHash[N]&&!u)return l.nodesByHash[N];const T={id:t,kind:n,impl:f,inner:i,innerEntries:d,innerJson:p,innerHash:b,meta:a,metaJson:v,json:g,hash:N,collapsibleJson:k,children:m};if(n!=="intersection")for(const M in i)M!=="in"&&M!=="out"&&(T[M]=i[M]);const U=new XC[n](T,l);return l.nodesByHash[N]=U},Y2=(t,n)=>t.id===n?t:(Et(an[n])&&nt(`Unexpected attempt to overwrite node id ${n}`),Od({id:n,kind:t.kind,inner:t.inner,meta:t.meta,$:t.$,ignoreCache:!0})),I2=(t,n,i)=>Od({id:a0(n.alias??t.kind),kind:t.kind,inner:t.inner,meta:n,$:t.$}),ao=(t,n,i)=>{const a=Object.keys(t);if(a.length===1&&a[0]===n){const l=t[n];if(i||er(l,"object")&&(Object.keys(l).length===1||Array.isArray(l)))return l}return t},ed=(t,n,i)=>{if(t.key!==n.key)return null;const a=t.key;let l=mt(t.value,n.value,i);const u=t.required||n.required?"required":"optional";if(l instanceof W)if(u==="optional")l=Z.intrinsic.never.internal;else return l.withPrefixKey(t.key,t.required&&n.required?"required":"optional");if(u==="required")return i.$.node("required",{key:a,value:l});const f=t.hasDefault()?n.hasDefault()?t.default===n.default?t.default:J(o0(t.default,n.default)):t.default:n.hasDefault()?n.default:qn;return i.$.node("optional",{key:a,value:l,default:f})};class l0 extends la{constructor(){super(...arguments);w(this,"required",this.kind==="required");w(this,"optional",this.kind==="optional");w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"serializedKey",Ms(this.key));w(this,"compiledKey",typeof this.key=="string"?this.key:this.serializedKey);w(this,"flatRefs",Be(this.value.flatRefs.map(i=>Ni([this.key,...i.path],i.node)),Ni([this.key],this.value)));w(this,"traverseAllows",(i,a)=>this.key in i?In(this.key,()=>this.value.traverseAllows(i[this.key],a),a):this.optional);w(this,"traverseApply",(i,a)=>{this.key in i?In(this.key,()=>this.value.traverseApply(i[this.key],a),a):this.hasKind("required")&&a.errorFromNodeContext(this.errorContext)})}_transform(i,a){a.path.push(this.key);const l=super._transform(i,a);return a.path.pop(),l}hasDefault(){return"default"in this.inner}compile(i){i.if(`${this.serializedKey} in data`,()=>i.traverseKey(this.serializedKey,`data${i.prop(this.key)}`,this.value)),this.hasKind("required")&&i.else(()=>i.traversalKind==="Apply"?i.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`):i.return(!1)),i.traversalKind==="Allows"&&i.return(!0)}}const o0=(t,n)=>`Invalid intersection of default values ${ze(t)} & ${ze(n)}`,Z2=Fe({kind:"optional",hasAssociatedError:!1,intersectionIsOpen:!0,keys:{key:{},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)},default:{preserveUndefined:!0}},normalize:t=>t,reduce:(t,n)=>{if(n.resolvedConfig.exactOptionalPropertyTypes===!1&&!t.value.allows(void 0))return n.node("optional",{...t,value:t.value.or(de.undefined)},{prereduced:!0})},defaults:{description:t=>`${t.compiledKey}?: ${t.value.description}`},intersections:{optional:ed}});class Q2 extends l0{constructor(...i){super(...i);w(this,"expression",this.hasDefault()?`${this.compiledKey}: ${this.value.expression} = ${ze(this.inner.default)}`:`${this.compiledKey}?: ${this.value.expression}`);w(this,"defaultValueMorph",F2(this));w(this,"defaultValueMorphRef",this.defaultValueMorph&&$t(this.defaultValueMorph));"default"in this.inner&&Dd(this.value,this.inner.default,this.key)}get outProp(){if(!this.hasDefault())return this;const{default:i,...a}=this.inner;return this.cacheGetter("outProp",this.$.node("required",a,{prereduced:!0}))}}const jd={implementation:Z2,Node:Q2},Rf={},F2=t=>{if(!t.hasDefault())return;const n=`{${t.compiledKey}: ${t.value.id} = ${Xi(t.default)}}`;return Rf[n]??(Rf[n]=u0(t.key,t.value,t.default))},u0=(t,n,i)=>{if(typeof i=="function")return n.includesTransform?(l,u)=>(In(t,()=>n(l[t]=i(),u),u),l):l=>(l[t]=i(),l);const a=n.includesTransform?n.assert(i):i;return er(a,"object")?(l,u)=>(In(t,()=>n(l[t]=i,u),u),l):l=>(l[t]=a,l)},Dd=(t,n,i)=>{const a=_o(n);er(n,"object")&&!a&&J(X2(i));const l=t.in(a?n():n);if(l instanceof ki){i===null&&J(`Default ${l.summary}`);const u=l.transform(f=>f.transform(d=>({...d,prefixPath:[i]})));J(`Default for ${u.summary}`)}return n},X2=t=>`Non-primitive default ${t===null?"":typeof t=="number"?`for value at [${t}] `:`for ${Ms(t)} `}must be specified as a function like () => ({my: 'object'})`;class Ls extends Kb{constructor(i,a){super(i,a);w(this,"branches",this.hasKind("union")?this.inner.branches:[this]);w(this,"_keyof");w(this,"pipe",Object.assign(this._pipe.bind(this),{try:this.tryPipe.bind(this)}));Object.defineProperty(this,Yn,{value:"root",enumerable:!1})}get internal(){return this}get"~standard"(){return{vendor:"arktype",version:1,validate:i=>{const a=this(i);return a instanceof ki?a:{value:a}}}}as(){return this}brand(i){return i===""?J(P2):this}readonly(){return this}distribute(i,a){const l=this.branches.map(i);return(a==null?void 0:a(l))??l}get shortDescription(){return this.meta.description??this.defaultShortDescription}toJsonSchema(i={}){const a=qb(this.$.resolvedConfig.toJsonSchema,i);a.useRefs||(a.useRefs=this.isCyclic);const l=typeof a.dialect=="string"?{$schema:a.dialect}:{};return Object.assign(l,this.toJsonSchemaRecurse(a)),a.useRefs&&(l.$defs=_e(this.references,(u,f)=>f.isRoot()&&!f.alwaysExpandJsonSchema?[f.id,f.toResolvedJsonSchema(a)]:[])),l}toJsonSchemaRecurse(i){return i.useRefs&&!this.alwaysExpandJsonSchema?{$ref:`#/$defs/${this.id}`}:this.toResolvedJsonSchema(i)}get alwaysExpandJsonSchema(){return this.isBasis()||this.kind==="alias"||this.hasKind("union")&&this.isBoolean}toResolvedJsonSchema(i){const a=this.innerToJsonSchema(i);return Object.assign(a,this.metaJson)}intersect(i){const a=this.$.parseDefinition(i),l=this.rawIntersect(a);return l instanceof W?l:this.$.finalize(l)}rawIntersect(i){return Zn(this,i,this.$)}toNeverIfDisjoint(){return this}and(i){const a=this.intersect(i);return a instanceof W?a.throw():a}rawAnd(i){const a=this.rawIntersect(i);return a instanceof W?a.throw():a}or(i){const a=this.$.parseDefinition(i);return this.$.finalize(this.rawOr(a))}rawOr(i){const a=[...this.branches,...i.branches];return this.$.node("union",a)}map(i){return this.$.schema(this.applyStructuralOperation("map",[i]))}pick(...i){return this.$.schema(this.applyStructuralOperation("pick",i))}omit(...i){return this.$.schema(this.applyStructuralOperation("omit",i))}required(){return this.$.schema(this.applyStructuralOperation("required",[]))}partial(){return this.$.schema(this.applyStructuralOperation("partial",[]))}keyof(){if(this._keyof)return this._keyof;const i=this.applyStructuralOperation("keyof",[]).reduce((a,l)=>a.intersect(l).toNeverIfDisjoint(),Z.intrinsic.unknown.internal);return i.branches.length===0&&J(Hb(`keyof ${this.expression}`)),this._keyof=this.$.finalize(i)}get props(){return this.branches.length!==1?J(W2(this.expression)):[...this.applyStructuralOperation("props",[])[0]]}merge(i){const a=this.$.parseDefinition(i);return this.$.schema(a.distribute(l=>this.applyStructuralOperation("merge",[Ky(l)??J(Vy("merge",l.expression))])))}applyStructuralOperation(i,a){return this.distribute(l=>{if(l.equals(Z.intrinsic.object)&&i!=="merge")return l;const u=Ky(l);if(u||J(Vy(i,l.expression)),i==="keyof")return u.keyof();if(i==="get")return u.get(...a);if(i==="props")return u.props;const f=i==="required"?"require":i==="partial"?"optionalize":i;return this.$.node("intersection",{...l.inner,structure:u[f](...a)})})}get(...i){return i[0]===void 0?this:this.$.schema(this.applyStructuralOperation("get",i))}extract(i){const a=this.$.parseDefinition(i);return this.$.schema(this.branches.filter(l=>l.extends(a)))}exclude(i){const a=this.$.parseDefinition(i);return this.$.schema(this.branches.filter(l=>!l.extends(a)))}array(){return this.$.schema(this.isUnknown()?{proto:Array}:{proto:Array,sequence:this},{prereduced:!0})}overlaps(i){return!(this.intersect(i)instanceof W)}extends(i){const a=this.intersect(i);return!(a instanceof W)&&this.equals(a)}ifExtends(i){return this.extends(i)?this:void 0}subsumes(i){return this.$.parseDefinition(i).extends(this)}configure(i,a="shallow"){return this.configureReferences(i,a)}describe(i,a="shallow"){return this.configure({description:i},a)}optional(){return[this,"?"]}default(i){return Dd(this,i,null),[this,"=",i]}from(i){return this.assert(i)}_pipe(...i){const a=i.reduce((l,u)=>l.rawPipeOnce(u),this);return this.$.finalize(a)}tryPipe(...i){const a=i.reduce((l,u)=>l.rawPipeOnce(le(u,"root")?u:(f,d)=>{try{return u(f,d)}catch(m){return d.error({code:"predicate",predicate:u,actual:`aborted due to error:
83
- ${m}
84
- `})}}),this);return this.$.finalize(a)}to(i){return this.$.finalize(this.toNode(this.$.parseDefinition(i)))}toNode(i){const a=Pf(this,i,this.$);return a instanceof W?a.throw():a}rawPipeOnce(i){return le(i,"root")?this.toNode(i):this.distribute(a=>a.hasKind("morph")?this.$.node("morph",{in:a.inner.in,morphs:[...a.morphs,i]}):this.$.node("morph",{in:a,morphs:[i]}),this.$.parseSchema)}narrow(i){return this.constrainOut("predicate",i)}constrain(i,a){return this._constrain("root",i,a)}constrainIn(i,a){return this._constrain("in",i,a)}constrainOut(i,a){return this._constrain("out",i,a)}_constrain(i,a,l){const u=this.$.node(a,l);if(u.isRoot())return u.isUnknown()?this:nt(`Unexpected constraint node ${u}`);const f=i==="root"?this:this[i];if(f.hasKind("morph")||u.impliedBasis&&!f.extends(u.impliedBasis))return u2(a,u.impliedBasis,this);const d=this.$.node("intersection",{[u.kind]:u}),m=i==="out"?Pf(this,d,this.$):Zn(this,d,this.$);return m instanceof W&&m.throw(),this.$.finalize(m)}onUndeclaredKey(i){const a=typeof i=="string"?i:i.rule,l=typeof i=="string"?!1:i.deep;return this.$.finalize(this.transform((u,f)=>u==="structure"?a==="ignore"?r$(f,{undeclared:1}):{...f,undeclared:a}:f,l?void 0:{shouldTransform:u=>!Yi(Ko,u.kind)}))}hasEqualMorphs(i){return!this.includesTransform&&!i.includesTransform?!0:!(!Xr(this.shallowMorphs,i.shallowMorphs)||!Xr(this.flatMorphs,i.flatMorphs,{isEqual:(a,l)=>{var u,f;return a.propString===l.propString&&(a.node.hasKind("morph")&&l.node.hasKind("morph")?a.node.hasEqualMorphs(l.node):a.node.hasKind("intersection")&&l.node.hasKind("intersection")?((u=a.node.structure)==null?void 0:u.structuralMorphRef)===((f=l.node.structure)==null?void 0:f.structuralMorphRef):!1)}}))}onDeepUndeclaredKey(i){return this.onUndeclaredKey({rule:i,deep:!0})}filter(i){return this.constrainIn("predicate",i)}divisibleBy(i){return this.constrain("divisor",i)}matching(i){return this.constrain("pattern",i)}atLeast(i){return this.constrain("min",i)}atMost(i){return this.constrain("max",i)}moreThan(i){return this.constrain("min",Yr(i))}lessThan(i){return this.constrain("max",Yr(i))}atLeastLength(i){return this.constrain("minLength",i)}atMostLength(i){return this.constrain("maxLength",i)}moreThanLength(i){return this.constrain("minLength",Yr(i))}lessThanLength(i){return this.constrain("maxLength",Yr(i))}exactlyLength(i){return this.constrain("exactLength",i)}atOrAfter(i){return this.constrain("after",i)}atOrBefore(i){return this.constrain("before",i)}laterThan(i){return this.constrain("after",Yr(i))}earlierThan(i){return this.constrain("before",Yr(i))}}const P2="Expected a non-empty brand name after #",Yr=t=>typeof t=="object"&&!(t instanceof Date)?{...t,exclusive:!0}:{rule:t,exclusive:!0},so=(t,n)=>le(n,"root")?le(t,"root")?t.extends(n):n.allows(t):le(t,"root")?t.hasUnit(n):n===t,Ky=t=>{var n;return t.hasKind("morph")?null:t.hasKind("intersection")?t.inner.structure??(((n=t.basis)==null?void 0:n.domain)==="object"?t.$.bindReference(Z.intrinsic.emptyStructure):null):t.isBasis()&&t.domain==="object"?t.$.bindReference(Z.intrinsic.emptyStructure):null},W2=t=>`Props cannot be extracted from a union. Use .distribute to extract props from each branch instead. Received:
85
- ${t}`,Vy=(t,n)=>`${t} operand must be an object (was ${n})`,zs=(t,n)=>_e(Cd(t),(i,a)=>[a,n]),eC=t=>typeof t=="string"?{reference:t}:t,Hy=t=>t instanceof W?Z.intrinsic.never.internal:t,tC=Fe({kind:"alias",hasAssociatedError:!1,collapsibleKey:"reference",keys:{reference:{serialize:t=>t.startsWith("$")?t:`$ark.${t}`},resolve:{}},normalize:eC,defaults:{description:t=>t.reference},intersections:{alias:(t,n,i)=>i.$.lazilyResolve(()=>Hy(mt(t.resolution,n.resolution,i)),`${t.reference}${i.pipe?"=>":"&"}${n.reference}`),...zs("alias",(t,n,i)=>n.isUnknown()?t:n.isNever()?n:n.isBasis()&&!n.overlaps(Z.intrinsic.object)?W.init("assignability",Z.intrinsic.object,n):i.$.lazilyResolve(()=>Hy(mt(t.resolution,n,i)),`${t.reference}${i.pipe?"=>":"&"}${n.id}`))}});class nC extends Ls{constructor(){super(...arguments);w(this,"expression",this.reference);w(this,"structure");w(this,"traverseAllows",(i,a)=>{const l=a.seen[this.reference];return l!=null&&l.includes(i)?!0:(a.seen[this.reference]=Be(l,i),this.resolution.traverseAllows(i,a))});w(this,"traverseApply",(i,a)=>{const l=a.seen[this.reference];l!=null&&l.includes(i)||(a.seen[this.reference]=Be(l,i),this.resolution.traverseApply(i,a))})}get resolution(){const i=this._resolve();return an[this.id]=i}_resolve(){if(this.resolve)return this.resolve();if(this.reference[0]==="$")return this.$.resolveRoot(this.reference.slice(1));const i=this.reference;let a=an[i];const l=[];for(;le(a,"context");){if(l.includes(a.id))return J(iC(a.id,l));l.push(a.id),a=an[a.id]}return le(a,"root")?a:nt(`Unexpected resolution for reference ${this.reference}
86
- Seen: [${l.join("->")}]
87
- Resolution: ${ze(a)}`)}get resolutionId(){if(this.reference.includes("&")||this.reference.includes("=>"))return this.resolution.id;if(this.reference[0]!=="$")return this.reference;const i=this.reference.slice(1),a=this.$.resolutions[i];return typeof a=="string"?a:le(a,"root")?a.id:nt(`Unexpected resolution for reference ${this.reference}: ${ze(a)}`)}get defaultShortDescription(){return Jn.object}innerToJsonSchema(i){return this.resolution.toJsonSchemaRecurse(i)}compile(i){const a=this.resolutionId;i.if(`ctx.seen.${a} && ctx.seen.${a}.includes(data)`,()=>i.return(!0)),i.if(`!ctx.seen.${a}`,()=>i.line(`ctx.seen.${a} = []`)),i.line(`ctx.seen.${a}.push(data)`),i.return(i.invoke(a))}}const iC=(t,n)=>`Alias '${t}' has a shallow resolution cycle: ${[...n,t].join("->")}`,Md={implementation:tC,Node:nC};class Ld extends Ls{constructor(){super(...arguments);w(this,"traverseApply",(i,a)=>{this.traverseAllows(i,a)||a.errorFromNodeContext(this.errorContext)})}get errorContext(){return{code:this.kind,description:this.description,meta:this.meta,...this.inner}}get compiledErrorContext(){return Ho(this.errorContext)}compile(i){i.traversalKind==="Allows"?i.return(this.compiledCondition):i.if(this.compiledNegation,()=>i.line(`${i.ctx}.errorFromNodeContext(${this.compiledErrorContext})`))}}const rC=Fe({kind:"domain",hasAssociatedError:!0,collapsibleKey:"domain",keys:{domain:{},numberAllowsNaN:{}},normalize:t=>typeof t=="string"?{domain:t}:Nd(t,"numberAllowsNaN")&&t.domain!=="number"?J(zd.writeBadAllowNanMessage(t.domain)):t,applyConfig:(t,n)=>t.numberAllowsNaN===void 0&&t.domain==="number"&&n.numberAllowsNaN?{...t,numberAllowsNaN:!0}:t,defaults:{description:t=>Jn[t.domain],actual:t=>Number.isNaN(t)?"NaN":Jn[hn(t)]},intersections:{domain:(t,n)=>t.domain==="number"&&n.domain==="number"?t.numberAllowsNaN?n:t:W.init("domain",t,n)}});class aC extends Ld{constructor(){super(...arguments);w(this,"requiresNaNCheck",this.domain==="number"&&!this.numberAllowsNaN);w(this,"traverseAllows",this.requiresNaNCheck?i=>typeof i=="number"&&!Number.isNaN(i):i=>hn(i)===this.domain);w(this,"compiledCondition",this.domain==="object"?'((typeof data === "object" && data !== null) || typeof data === "function")':`typeof data === "${this.domain}"${this.requiresNaNCheck?" && !Number.isNaN(data)":""}`);w(this,"compiledNegation",this.domain==="object"?'((typeof data !== "object" || data === null) && typeof data !== "function")':`typeof data !== "${this.domain}"${this.requiresNaNCheck?" || Number.isNaN(data)":""}`);w(this,"expression",this.numberAllowsNaN?"number | NaN":this.domain)}get nestableExpression(){return this.numberAllowsNaN?`(${this.expression})`:this.expression}get defaultShortDescription(){return Jn[this.domain]}innerToJsonSchema(i){return this.domain==="bigint"||this.domain==="symbol"?i.fallback.domain({code:"domain",base:{},domain:this.domain}):{type:this.domain}}}const zd={implementation:rC,Node:aC,writeBadAllowNanMessage:t=>`numberAllowsNaN may only be specified with domain "number" (was ${t})`},sC=Fe({kind:"intersection",hasAssociatedError:!0,normalize:t=>{if(Et(t))return t;const{structure:n,...i}=t,a=!!n,l=n??{},u=_e(i,(f,d)=>Nn(f,F$)?(a&&J(`Flattened structure key ${f} cannot be specified alongside a root 'structure' key.`),l[f]=d,[]):[f,d]);return(le(l,"constraint")||!Ts(l))&&(u.structure=l),u},finalizeInnerJson:({structure:t,...n})=>er(t,"object")?{...t,...n}:n,keys:{domain:{child:!0,parse:(t,n)=>n.$.node("domain",t)},proto:{child:!0,parse:(t,n)=>n.$.node("proto",t)},structure:{child:!0,parse:(t,n)=>n.$.node("structure",t),serialize:t=>{var f;if(!((f=t.sequence)!=null&&f.minLength))return t.collapsibleJson;const{sequence:n,...i}=t.collapsibleJson,{minVariadicLength:a,...l}=n,u=l.variadic&&Object.keys(l).length===1?l.variadic:l;return{...i,sequence:u}}},divisor:{child:!0,parse:Lt("divisor")},max:{child:!0,parse:Lt("max")},min:{child:!0,parse:Lt("min")},maxLength:{child:!0,parse:Lt("maxLength")},minLength:{child:!0,parse:Lt("minLength")},exactLength:{child:!0,parse:Lt("exactLength")},before:{child:!0,parse:Lt("before")},after:{child:!0,parse:Lt("after")},pattern:{child:!0,parse:Lt("pattern")},predicate:{child:!0,parse:Lt("predicate")}},reduce:(t,n)=>Gy({},t,{$:n,invert:!1,pipe:!1}),defaults:{description:t=>{if(t.children.length===0)return"unknown";if(t.structure)return t.structure.description;const n=[];if(t.basis&&!t.refinements.some(i=>i.impl.obviatesBasisDescription)&&n.push(t.basis.description),t.refinements.length){const i=t.refinements.toSorted((a,l)=>a.kind==="min"&&l.kind==="max"?-1:0).map(a=>a.description);n.push(...i)}return t.inner.predicate&&n.push(...t.inner.predicate.map(i=>i.description)),n.join(" and ")},expected:t=>` ◦ ${t.errors.map(n=>n.expected).join(`
88
- ◦ `)}`,problem:t=>`(${t.actual}) must be...
89
- ${t.expected}`},intersections:{intersection:(t,n,i)=>Gy(t.inner,n.inner,i),...zs("intersection",(t,n,i)=>{var m;if(t.children.length===0)return n;const{domain:a,proto:l,...u}=t.inner,f=l??a,d=f?mt(f,n,i):n;return d instanceof W?d:(m=t==null?void 0:t.basis)!=null&&m.equals(d)?t:t.$.node("intersection",{...u,[d.kind]:d},{prereduced:!0})})}});class lC extends Ls{constructor(){super(...arguments);w(this,"basis",this.inner.domain??this.inner.proto??null);w(this,"refinements",this.children.filter(i=>i.isRefinement()));w(this,"structure",this.inner.structure);w(this,"expression",oC(this));w(this,"traverseAllows",(i,a)=>this.children.every(l=>l.traverseAllows(i,a)));w(this,"traverseApply",(i,a)=>{const l=a.currentErrorCount;if(!(this.basis&&(this.basis.traverseApply(i,a),a.currentErrorCount>l))){if(this.refinements.length){for(let u=0;u<this.refinements.length-1;u++)if(this.refinements[u].traverseApply(i,a),a.failFast&&a.currentErrorCount>l)return;if(this.refinements.at(-1).traverseApply(i,a),a.currentErrorCount>l)return}if(!(this.structure&&(this.structure.traverseApply(i,a),a.currentErrorCount>l))&&this.inner.predicate){for(let u=0;u<this.inner.predicate.length-1;u++)if(this.inner.predicate[u].traverseApply(i,a),a.failFast&&a.currentErrorCount>l)return;this.inner.predicate.at(-1).traverseApply(i,a)}}})}get shallowMorphs(){var i;return(i=this.inner.structure)!=null&&i.structuralMorph?[this.inner.structure.structuralMorph]:[]}get defaultShortDescription(){var i;return((i=this.basis)==null?void 0:i.defaultShortDescription)??"present"}innerToJsonSchema(i){return this.children.reduce((a,l)=>l.isBasis()?l.toJsonSchemaRecurse(i):l.reduceJsonSchema(a,i),{})}compile(i){if(i.traversalKind==="Allows"){for(const a of this.children)i.check(a);i.return(!0);return}if(i.initializeErrorCount(),this.basis&&(i.check(this.basis),this.children.length>1&&i.returnIfFail()),this.refinements.length){for(let a=0;a<this.refinements.length-1;a++)i.check(this.refinements[a]),i.returnIfFailFast();i.check(this.refinements.at(-1)),(this.structure||this.inner.predicate)&&i.returnIfFail()}if(this.structure&&(i.check(this.structure),this.inner.predicate&&i.returnIfFail()),this.inner.predicate){for(let a=0;a<this.inner.predicate.length-1;a++)i.check(this.inner.predicate[a]),i.returnIfFail();i.check(this.inner.predicate.at(-1))}}}const c0={implementation:sC,Node:lC},oC=t=>{var i;let n=((i=t.structure)==null?void 0:i.expression)||`${t.basis&&!t.refinements.some(a=>a.impl.obviatesBasisExpression)?t.basis.nestableExpression+" ":""}${t.refinements.map(a=>a.expression).join(" & ")}`||"unknown";return n==="Array == 0"&&(n="[]"),n},Gy=(t,n,i)=>{const a={},l=t.proto??t.domain,u=n.proto??n.domain,f=l?u?mt(l,u,i):l:u;return f instanceof W?f:(f&&(a[f.kind]=f),Ao({kind:"intersection",baseInner:a,l:$o(t),r:$o(n),roots:[],ctx:i}))},uC=Fe({kind:"morph",hasAssociatedError:!1,keys:{in:{child:!0,parse:(t,n)=>n.$.parseSchema(t)},morphs:{parse:Cs,serialize:t=>t.map(n=>le(n,"root")?n.json:$t(n))},declaredIn:{child:!1,serialize:t=>t.json},declaredOut:{child:!1,serialize:t=>t.json}},normalize:t=>t,defaults:{description:t=>{var n;return`a morph from ${t.in.description} to ${((n=t.out)==null?void 0:n.description)??"unknown"}`}},intersections:{morph:(t,n,i)=>{if(!t.hasEqualMorphs(n))return J(fC(t.expression,n.expression));const a=mt(t.in,n.in,i);if(a instanceof W)return a;const l={morphs:t.morphs};if(t.declaredIn||n.declaredIn){const u=mt(t.in,n.in,i);if(u instanceof W)return u.throw();l.declaredIn=u}if(t.declaredOut||n.declaredOut){const u=mt(t.out,n.out,i);if(u instanceof W)return u.throw();l.declaredOut=u}return a.distribute(u=>i.$.node("morph",{...l,in:u}),i.$.parseSchema)},...zs("morph",(t,n,i)=>{const a=t.inner.in?mt(t.inner.in,n,i):n;return a instanceof W?a:a.equals(t.inner.in)?t:i.$.node("morph",{...t.inner,in:a})})}});class cC extends Ls{constructor(){super(...arguments);w(this,"serializedMorphs",this.morphs.map($t));w(this,"compiledMorphs",`[${this.serializedMorphs}]`);w(this,"lastMorph",this.inner.morphs.at(-1));w(this,"lastMorphIfNode",le(this.lastMorph,"root")?this.lastMorph:void 0);w(this,"introspectableIn",this.inner.in);w(this,"introspectableOut",this.lastMorphIfNode?Object.assign(this.referencesById,this.lastMorphIfNode.referencesById)&&this.lastMorphIfNode.out:void 0);w(this,"expression",`(In: ${this.in.expression}) => ${this.lastMorphIfNode?"To":"Out"}<${this.out.expression}>`);w(this,"traverseAllows",(i,a)=>!this.introspectableIn||this.introspectableIn.traverseAllows(i,a));w(this,"traverseApply",(i,a)=>{this.introspectableIn&&this.introspectableIn.traverseApply(i,a),a.queueMorphs(this.morphs)})}get shallowMorphs(){var i;return Array.isArray((i=this.inner.in)==null?void 0:i.shallowMorphs)?[...this.inner.in.shallowMorphs,...this.morphs]:this.morphs}get in(){var i;return this.declaredIn??((i=this.inner.in)==null?void 0:i.in)??Z.intrinsic.unknown.internal}get out(){return this.declaredOut??this.introspectableOut??Z.intrinsic.unknown.internal}declareIn(i){return this.$.node("morph",{...this.inner,declaredIn:i})}declareOut(i){return this.$.node("morph",{...this.inner,declaredOut:i})}get defaultShortDescription(){return this.in.meta.description??this.in.defaultShortDescription}innerToJsonSchema(i){var a;return i.fallback.morph({code:"morph",base:this.in.toJsonSchemaRecurse(i),out:((a=this.introspectableOut)==null?void 0:a.toJsonSchemaRecurse(i))??null})}compile(i){if(i.traversalKind==="Allows"){if(!this.introspectableIn)return;i.return(i.invoke(this.introspectableIn));return}this.introspectableIn&&i.line(i.invoke(this.introspectableIn)),i.line(`ctx.queueMorphs(${this.compiledMorphs})`)}hasEqualMorphs(i){return Xr(this.morphs,i.morphs,{isEqual:(a,l)=>a===l||le(a,"root")&&le(l,"root")&&a.equals(l)})}}const f0={implementation:uC,Node:cC},fC=(t,n)=>`The intersection of distinct morphs at a single path is indeterminate:
90
- Left: ${t}
91
- Right: ${n}`,dC=Fe({kind:"proto",hasAssociatedError:!0,collapsibleKey:"proto",keys:{proto:{serialize:t=>Rd(t)??Xi(t)},dateAllowsInvalid:{}},normalize:t=>{const n=typeof t=="string"?{proto:Wr[t]}:typeof t=="function"?Et(t)?t:{proto:t}:typeof t.proto=="string"?{...t,proto:Wr[t.proto]}:t;return typeof n.proto!="function"&&J(To.writeInvalidSchemaMessage(n.proto)),Nd(n,"dateAllowsInvalid")&&n.proto!==Date&&J(To.writeBadInvalidDateMessage(n.proto)),n},applyConfig:(t,n)=>t.dateAllowsInvalid===void 0&&t.proto===Date&&n.dateAllowsInvalid?{...t,dateAllowsInvalid:!0}:t,defaults:{description:t=>t.builtinName?d$[t.builtinName]:`an instance of ${t.proto.name}`,actual:t=>t instanceof Date&&t.toString()==="Invalid Date"?"an invalid Date":Gf(t)},intersections:{proto:(t,n)=>t.proto===Date&&n.proto===Date?t.dateAllowsInvalid?n:t:jy(t.proto,n.proto)?t:jy(n.proto,t.proto)?n:W.init("proto",t,n),domain:(t,n)=>n.domain==="object"?t:W.init("domain",Z.intrinsic.object.internal,n)}});class hC extends Ld{constructor(){super(...arguments);w(this,"builtinName",Rd(this.proto));w(this,"serializedConstructor",this.json.proto);w(this,"requiresInvalidDateCheck",this.proto===Date&&!this.dateAllowsInvalid);w(this,"traverseAllows",this.requiresInvalidDateCheck?i=>i instanceof Date&&i.toString()!=="Invalid Date":i=>i instanceof this.proto);w(this,"compiledCondition",`data instanceof ${this.serializedConstructor}${this.requiresInvalidDateCheck?' && data.toString() !== "Invalid Date"':""}`);w(this,"compiledNegation",`!(${this.compiledCondition})`);w(this,"expression",this.dateAllowsInvalid?"Date | InvalidDate":this.proto.name);w(this,"domain","object")}innerToJsonSchema(i){var a,l;switch(this.builtinName){case"Array":return{type:"array"};case"Date":return((l=(a=i.fallback).date)==null?void 0:l.call(a,{code:"date",base:{}}))??i.fallback.proto({code:"proto",base:{},proto:this.proto});default:return i.fallback.proto({code:"proto",base:{},proto:this.proto})}}get nestableExpression(){return this.dateAllowsInvalid?`(${this.expression})`:this.expression}get defaultShortDescription(){return this.description}}const To={implementation:dC,Node:hC,writeBadInvalidDateMessage:t=>`dateAllowsInvalid may only be specified with constructor Date (was ${t.name})`,writeInvalidSchemaMessage:t=>`instanceOf operand must be a function (was ${hn(t)})`},pC=Fe({kind:"union",hasAssociatedError:!0,collapsibleKey:"branches",keys:{ordered:{},branches:{child:!0,parse:(t,n)=>{const i=[];for(const a of t){const l=le(a,"root")?a.branches:n.$.parseSchema(a).branches;for(const u of l)if(u.hasKind("morph")){const f=i.findIndex(d=>d.hasKind("morph")&&d.hasEqualMorphs(u));if(f===-1)i.push(u);else{const d=i[f];i[f]=n.$.node("morph",{...d.inner,in:d.in.rawOr(u.in)})}}else i.push(u)}return n.def.ordered||i.sort((a,l)=>a.hash<l.hash?-1:1),i}}},normalize:t=>kt(t)?{branches:t}:t,reduce:(t,n)=>{const i=RC(t);if(i.length===1)return i[0];if(i.length!==t.branches.length)return n.node("union",{...t,branches:i},{prereduced:!0})},defaults:{description:t=>t.distribute(n=>n.description,Qr),expected:t=>{const n=XA(t.errors,"propString"),i=Object.entries(n).map(([a,l])=>{const u=[];for(const m of l)Fi(u,m.expected);const f=Qr(u),d=l.every(m=>m.actual===l[0].actual)?l[0].actual:ze(l[0].data);return`${a&&`${a} `}must be ${f}${d&&` (was ${d})`}`});return Qr(i)},problem:t=>t.expected,message:t=>t.problem},intersections:{union:(t,n,i)=>{if(t.isNever!==n.isNever)return W.init("presence",t,n);let a;return t.ordered?(n.ordered&&J(AC(t.expression,n.expression)),a=Ef(n.branches,t.branches,i),a instanceof W&&a.invert()):a=Ef(t.branches,n.branches,i),a instanceof W?a:i.$.parseSchema(t.ordered||n.ordered?{branches:a,ordered:!0}:{branches:a})},...zs("union",(t,n,i)=>{const a=Ef(t.branches,[n],i);return a instanceof W?a:a.length===1?a[0]:i.$.parseSchema(t.ordered?{branches:a,ordered:!0}:{branches:a})})}});class mC extends Ls{constructor(){super(...arguments);w(this,"isBoolean",this.branches.length===2&&this.branches[0].hasUnit(!1)&&this.branches[1].hasUnit(!0));w(this,"unitBranches",this.branches.filter(i=>i.in.hasKind("unit")));w(this,"discriminant",this.discriminate());w(this,"discriminantJson",this.discriminant?wC(this.discriminant):null);w(this,"expression",this.distribute(i=>i.nestableExpression,kC));w(this,"traverseAllows",(i,a)=>this.branches.some(l=>l.traverseAllows(i,a)));w(this,"traverseApply",(i,a)=>{const l=[];for(let u=0;u<this.branches.length;u++){if(a.pushBranch(),this.branches[u].traverseApply(i,a),!a.hasError())return this.branches[u].includesTransform?a.queuedMorphs.push(...a.popBranch().queuedMorphs):a.popBranch();l.push(a.popBranch().error)}a.errorFromNodeContext({code:"union",errors:l,meta:this.meta})});w(this,"traverseOptimistic",i=>{for(let a=0;a<this.branches.length;a++){const l=this.branches[a];if(l.traverseAllows(i))return l.contextFreeMorph?l.contextFreeMorph(i):i}return qn})}get branchGroups(){const i=[];let a=-1;for(const l of this.branches){if(l.hasKind("unit")&&l.domain==="boolean"){a===-1?(a=i.length,i.push(l)):i[a]=Z.intrinsic.boolean;continue}i.push(l)}return i}createBranchedOptimisticRootApply(){return(i,a)=>{const l=this.traverseOptimistic(i);if(l!==qn)return l;const u=new Ir(i,this.$.resolvedConfig);return this.traverseApply(i,u),u.finalize(a)}}get shallowMorphs(){return this.branches.reduce((i,a)=>Fi(i,a.shallowMorphs),[])}get defaultShortDescription(){return this.distribute(i=>i.defaultShortDescription,Qr)}innerToJsonSchema(i){if(this.branchGroups.length===1&&this.branchGroups[0].equals(Z.intrinsic.boolean))return{type:"boolean"};const a=this.branchGroups.map(l=>l.toJsonSchemaRecurse(i));return a.every(l=>Object.keys(l).length===1&&Nd(l,"const"))?{enum:a.map(l=>l.const)}:{anyOf:a}}compile(i){if(!this.discriminant||this.unitBranches.length===this.branches.length&&this.branches.length===2)return this.compileIndiscriminable(i);let a=this.discriminant.optionallyChainedPropString;this.discriminant.kind==="domain"&&(a=`typeof ${a} === "object" ? ${a} === null ? "null" : "object" : typeof ${a} === "function" ? "object" : typeof ${a}`);const l=this.discriminant.cases,u=Object.keys(l),{optimistic:f}=i;if(i.optimistic=!1,i.block(`switch(${a})`,()=>{for(const v in l){const b=l[v],k=v==="default"?v:`case ${v}`;i.line(`${k}: return ${b===!0?f?i.data:b:f?`${i.invoke(b)} ? ${b.contextFreeMorph?`${$t(b.contextFreeMorph)}(${i.data})`:i.data} : "${qn}"`:i.invoke(b)}`)}return i}),i.traversalKind==="Allows"){i.return(f?`"${qn}"`:!1);return}const d=Qr(this.discriminant.kind==="domain"?u.map(v=>{const b=v.slice(1,-1);return b==="function"?Jn.object:Jn[b]}):u),m=this.discriminant.path.map(v=>typeof v=="symbol"?$t(v):JSON.stringify(v)),p=JSON.stringify(d),g=this.discriminant.kind==="domain"?`${xC}[${a}]`:`${SC}(${a})`;i.line(`ctx.errorFromNodeContext({
92
- code: "predicate",
93
- expected: ${p},
94
- actual: ${g},
95
- relativePath: [${m}],
96
- meta: ${this.compiledMeta}
97
- })`)}compileIndiscriminable(i){if(i.traversalKind==="Apply"){i.const("errors","[]");for(const a of this.branches)i.line("ctx.pushBranch()").line(i.invoke(a)).if("!ctx.hasError()",()=>i.return(a.includesTransform?"ctx.queuedMorphs.push(...ctx.popBranch().queuedMorphs)":"ctx.popBranch()")).line("errors.push(ctx.popBranch().error)");i.line(`ctx.errorFromNodeContext({ code: "union", errors, meta: ${this.compiledMeta} })`)}else{const{optimistic:a}=i;i.optimistic=!1;for(const l of this.branches)i.if(`${i.invoke(l)}`,()=>i.return(a?l.contextFreeMorph?`${$t(l.contextFreeMorph)}(${i.data})`:i.data:!0));i.return(a?`"${qn}"`:!1)}}get nestableExpression(){return this.isBoolean?"boolean":`(${this.expression})`}discriminate(){var f,d;if(this.branches.length<2||this.isCyclic)return null;if(this.unitBranches.length===this.branches.length){const m=_e(this.unitBranches,(p,g)=>[`${g.in.serializedValue}`,g.hasKind("morph")?g:!0]);return{kind:"unit",path:[],optionallyChainedPropString:"data",cases:m}}const i=[];for(let m=0;m<this.branches.length-1;m++){const p=this.branches[m];for(let g=m+1;g<this.branches.length;g++){const v=this.branches[g],b=Zn(p.in,v.in,p.$);if(b instanceof W)for(const k of b){if(!k.kind||k.optional)continue;let N,T;if(k.kind==="domain"){const M=k.l,z=k.r;N=`"${typeof M=="string"?M:M.domain}"`,T=`"${typeof z=="string"?z:z.domain}"`}else if(k.kind==="unit")N=k.l.serializedValue,T=k.r.serializedValue;else continue;const U=i.find(M=>Xr(M.path,k.path)&&M.kind===k.kind);U?(U.cases[N]?U.cases[N].branchIndices=Fi(U.cases[N].branchIndices,m):(f=U.cases)[N]??(f[N]={branchIndices:[m],condition:k.l}),U.cases[T]?U.cases[T].branchIndices=Fi(U.cases[T].branchIndices,g):(d=U.cases)[T]??(d[T]={branchIndices:[g],condition:k.r})):i.push({kind:k.kind,cases:{[N]:{branchIndices:[m],condition:k.l},[T]:{branchIndices:[g],condition:k.r}},path:k.path})}}}const a=this.ordered?vC(i,this.branches):i;if(!a.length)return null;const l=gC(a,this),u={};for(const m in l.best.cases){const p=yC(l,m);if(p===null){u[m]=!0;continue}if(p.length===this.branches.length)return null;this.ordered&&p.sort((b,k)=>b.originalIndex-k.originalIndex);const g=p.map(b=>b.branch),v=g.length===1?g[0]:this.$.node("union",this.ordered?{branches:g,ordered:!0}:g);Object.assign(this.referencesById,v.referencesById),u[m]=v}if(l.defaultEntries.length){const m=l.defaultEntries.map(p=>p.branch);u.default=this.$.node("union",this.ordered?{branches:m,ordered:!0}:m,{prereduced:!0}),Object.assign(this.referencesById,u.default.referencesById)}return Object.assign(l.location,{cases:u})}}const gC=(t,n)=>{const i=t.sort((u,f)=>Object.keys(f.cases).length-Object.keys(u.cases).length)[0],a={kind:i.kind,path:i.path,optionallyChainedPropString:d0(i.path)},l=n.branches.map((u,f)=>({originalIndex:f,branch:u}));return{best:i,location:a,defaultEntries:l,node:n}},yC=(t,n)=>{const i=t.best.cases[n],a=bC(i.condition,t.location.path,t.node.$);let l=[];const u=[];for(let f=0;f<t.defaultEntries.length;f++){const d=t.defaultEntries[f];if(i.branchIndices.includes(d.originalIndex)){const m=Jy(t.node.branches[d.originalIndex],t.location);m===null?l=null:l==null||l.push({originalIndex:d.originalIndex,branch:m})}else if(d.branch.hasKind("alias")&&a.hasKind("domain")&&a.domain==="object")l==null||l.push(d);else{if(d.branch.in.overlaps(a)){const m=Jy(d.branch,t.location);l==null||l.push({originalIndex:d.originalIndex,branch:m})}u.push(d)}}return t.defaultEntries=u,l},vC=(t,n)=>t.filter(a=>{const l=Object.values(a.cases).map(u=>u.branchIndices);for(let u=0;u<l.length-1;u++){const f=l[u];for(let d=u+1;d<l.length;d++){const m=l[d];for(const p of f)for(const g of m)if(p>g&&n[p].overlaps(n[g]))return!1}}return!0}),bC=(t,n,i)=>{let a=t==="undefined"?i.node("unit",{unit:void 0}):t==="null"?i.node("unit",{unit:null}):t==="boolean"?i.units([!0,!1]):t;for(let l=n.length-1;l>=0;l--){const u=n[l];a=i.node("intersection",typeof u=="number"?{proto:"Array",sequence:[...QA(u).map(f=>({})),a]}:{domain:"object",required:[{key:u,value:a}]})}return a},d0=t=>t.reduce((n,i)=>n+Mb(i,!0),"data"),xC=$t(PA),SC=$t(ze),h0={implementation:pC,Node:mC},wC=t=>({kind:t.kind,path:t.path.map(n=>typeof n=="string"?n:Ms(n)),cases:_e(t.cases,(n,i)=>[n,i===!0?i:i.hasKind("union")&&i.discriminantJson?i.discriminantJson:i.json])}),NC={delimiter:" | ",finalDelimiter:" | "},kC=t=>Qr(t,NC),Qr=(t,n)=>{const i=(n==null?void 0:n.delimiter)??", ",a=(n==null?void 0:n.finalDelimiter)??" or ";if(t.length===0)return"never";if(t.length===1)return t[0];if(t.length===2&&t[0]==="false"&&t[1]==="true"||t[0]==="true"&&t[1]==="false")return"boolean";const l={},u=t.filter(d=>l[d]?!1:l[d]=!0),f=u.pop();return`${u.join(i)}${u.length?a:""}${f}`},Ef=(t,n,i)=>{const a=n.map(()=>[]);for(let u=0;u<t.length;u++){let f={};for(let d=0;d<n.length;d++){if(a[d]===null)continue;if(t[u].equals(n[d])){a[d]=null,f={};break}const m=mt(t[u],n[d],i);if(!(m instanceof W)){if(m.equals(t[u])){a[d].push(t[u]),f={};break}m.equals(n[d])?a[d]=null:f[d]=m}}for(const d in f)a[d][u]=f[d]}const l=a.flatMap((u,f)=>(u==null?void 0:u.flatMap(d=>d.branches))??n[f]);return l.length===0?W.init("union",t,n):l},RC=({branches:t,ordered:n})=>{if(t.length<2)return t;const i=t.map(()=>!0);for(let a=0;a<t.length;a++)for(let l=a+1;l<t.length&&i[a]&&i[l];l++){if(t[a].equals(t[l])){i[l]=!1;continue}const u=Zn(t[a].in,t[l].in,t[0].$);u instanceof W||(n||EC(t[a],t[l]),u.equals(t[a].in)?i[a]=!!n:u.equals(t[l].in)&&(i[l]=!1))}return t.filter((a,l)=>i[l])},EC=(t,n)=>{!t.includesTransform&&!n.includesTransform||(Xr(t.shallowMorphs,n.shallowMorphs)||J(Yy(t.expression,n.expression)),Xr(t.flatMorphs,n.flatMorphs,{isEqual:(i,a)=>{var l,u;return i.propString===a.propString&&(i.node.hasKind("morph")&&a.node.hasKind("morph")?i.node.hasEqualMorphs(a.node):i.node.hasKind("intersection")&&a.node.hasKind("intersection")?((l=i.node.structure)==null?void 0:l.structuralMorphRef)===((u=a.node.structure)==null?void 0:u.structuralMorphRef):!1)}})||J(Yy(t.expression,n.expression)))},Jy=(t,n)=>t.transform((i,a)=>i==="domain"||i==="unit"?null:a,{shouldTransform:(i,a)=>{const l=d0(a.path);return n.optionallyChainedPropString.startsWith(l)?i.hasKind("domain")&&i.domain==="object"||(i.hasKind("domain")||n.kind==="unit")&&l===n.optionallyChainedPropString?!0:i.children.length!==0&&i.kind!=="index":!1}}),Yy=(t,n)=>`An unordered union of a type including a morph and a type with overlapping input is indeterminate:
98
- Left: ${t}
99
- Right: ${n}`,AC=(t,n)=>`The intersection of two ordered unions is indeterminate:
100
- Left: ${t}
101
- Right: ${n}`,$C=Fe({kind:"unit",hasAssociatedError:!0,keys:{unit:{preserveUndefined:!0,serialize:t=>t instanceof Date?t.toISOString():Xi(t)}},normalize:t=>t,defaults:{description:t=>ze(t.unit),problem:({expected:t,actual:n})=>`${t===n?`must be reference equal to ${t} (serialized to the same value)`:`must be ${t} (was ${n})`}`},intersections:{unit:(t,n)=>W.init("unit",t,n),...zs("unit",(t,n)=>{if(n.allows(t.unit))return t;const i=n.hasKind("intersection")?n.basis:n;if(i){const a=i.hasKind("domain")?i:Z.intrinsic.object;if(t.domain!==a.domain){const l=t.domain==="undefined"||t.domain==="null"||t.domain==="boolean"?t.domain:Z.intrinsic[t.domain];return W.init("domain",l,a)}}return W.init("assignability",t,n.hasKind("intersection")?n.children.find(a=>!a.allows(t.unit)):n)})}});class CC extends Ld{constructor(){super(...arguments);w(this,"compiledValue",this.json.unit);w(this,"serializedValue",typeof this.unit=="string"||this.unit instanceof Date?JSON.stringify(this.compiledValue):`${this.compiledValue}`);w(this,"compiledCondition",Iy(this.unit,this.serializedValue));w(this,"compiledNegation",Iy(this.unit,this.serializedValue,"negated"));w(this,"expression",ze(this.unit));w(this,"domain",hn(this.unit));w(this,"traverseAllows",this.unit instanceof Date?i=>i instanceof Date&&i.toISOString()===this.compiledValue:Number.isNaN(this.unit)?i=>Number.isNaN(i):i=>i===this.unit)}get defaultShortDescription(){return this.domain==="object"?Jn.object:this.description}innerToJsonSchema(i){return this.unit===null?{type:"null"}:Z.intrinsic.jsonPrimitive.allows(this.unit)?{const:this.unit}:i.fallback.unit({code:"unit",base:{},unit:this.unit})}}const p0={implementation:$C,Node:CC},Iy=(t,n,i)=>{if(t instanceof Date){const a=`data instanceof Date && data.toISOString() === ${n}`;return i?`!(${a})`:a}return Number.isNaN(t)?`${i?"!":""}Number.isNaN(data)`:`data ${i?"!":"="}== ${n}`},TC=Fe({kind:"index",hasAssociatedError:!1,intersectionIsOpen:!0,keys:{signature:{child:!0,parse:(t,n)=>{const i=n.$.parseSchema(t);if(!i.extends(Z.intrinsic.key))return J(DC(i.expression));const a=i.branches.filter(l=>l.hasKind("unit"));return a.length?J(jC(a.map(l=>ze(l.unit)))):i}},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)}},normalize:t=>t,defaults:{description:t=>`[${t.signature.expression}]: ${t.value.description}`},intersections:{index:(t,n,i)=>{if(t.signature.equals(n.signature)){const a=mt(t.value,n.value,i),l=a instanceof W?Z.intrinsic.never.internal:a;return i.$.node("index",{signature:t.signature,value:l})}return t.signature.extends(n.signature)&&t.value.subsumes(n.value)?n:n.signature.extends(t.signature)&&n.value.subsumes(t.value)?t:null}}});class OC extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"expression",`[${this.signature.expression}]: ${this.value.expression}`);w(this,"flatRefs",Be(this.value.flatRefs.map(i=>Ni([this.signature,...i.path],i.node)),Ni([this.signature],this.value)));w(this,"traverseAllows",(i,a)=>No(i).every(l=>this.signature.traverseAllows(l[0],a)?In(l[0],()=>this.value.traverseAllows(l[1],a),a):!0));w(this,"traverseApply",(i,a)=>{for(const l of No(i))this.signature.traverseAllows(l[0],a)&&In(l[0],()=>this.value.traverseApply(l[1],a),a)})}_transform(i,a){a.path.push(this.signature);const l=super._transform(i,a);return a.path.pop(),l}compile(){}}const m0={implementation:TC,Node:OC},jC=t=>`Index keys ${t.join(", ")} should be specified as named props.`,DC=t=>`Indexed key definition '${t}' must be a string or symbol`,MC=Fe({kind:"required",hasAssociatedError:!0,intersectionIsOpen:!0,keys:{key:{},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)}},normalize:t=>t,defaults:{description:t=>`${t.compiledKey}: ${t.value.description}`,expected:t=>t.missingValueDescription,actual:()=>"missing"},intersections:{required:ed,optional:ed}});class LC extends l0{constructor(){super(...arguments);w(this,"expression",`${this.compiledKey}: ${this.value.expression}`);w(this,"errorContext",Object.freeze({code:"required",missingValueDescription:this.value.defaultShortDescription,relativePath:[this.key],meta:this.meta}));w(this,"compiledErrorContext",Ho(this.errorContext))}}const g0={implementation:MC,Node:LC},zC=Fe({kind:"sequence",hasAssociatedError:!1,collapsibleKey:"variadic",keys:{prefix:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}},optionals:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}},defaultables:{child:t=>t.map(n=>n[0]),parse:(t,n)=>{if(t.length!==0)return t.map(i=>{const a=n.$.parseSchema(i[0]);return Dd(a,i[1],null),[a,i[1]]})},serialize:t=>t.map(n=>[n[0].collapsibleJson,Xi(n[1])])},variadic:{child:!0,parse:(t,n)=>n.$.parseSchema(t,n)},minVariadicLength:{parse:t=>t===0?void 0:t},postfix:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}}},normalize:t=>{var n,i,a;if(typeof t=="string")return{variadic:t};if("variadic"in t||"prefix"in t||"defaultables"in t||"optionals"in t||"postfix"in t||"minVariadicLength"in t){if((n=t.postfix)!=null&&n.length){if(!t.variadic)return J(qC);if((i=t.optionals)!=null&&i.length||(a=t.defaultables)!=null&&a.length)return J(v0)}return t.minVariadicLength&&!t.variadic?J("minVariadicLength may not be specified without a variadic element"):t}return{variadic:t}},reduce:(t,n)=>{var d,m,p,g,v,b,k;let i=t.minVariadicLength??0;const a=((d=t.prefix)==null?void 0:d.slice())??[],l=((m=t.defaultables)==null?void 0:m.slice())??[],u=((p=t.optionals)==null?void 0:p.slice())??[],f=((g=t.postfix)==null?void 0:g.slice())??[];if(t.variadic){for(;(v=u.at(-1))!=null&&v.equals(t.variadic);)u.pop();if(u.length===0&&l.length===0)for(;(b=a.at(-1))!=null&&b.equals(t.variadic);)a.pop(),i++;for(;(k=f[0])!=null&&k.equals(t.variadic);)f.shift(),i++}else u.length===0&&l.length===0&&a.push(...f.splice(0));if(i!==t.minVariadicLength||t.prefix&&t.prefix.length!==a.length)return n.node("sequence",{...t,prefix:a,defaultables:l,optionals:u,postfix:f,minVariadicLength:i},{prereduced:!0})},defaults:{description:t=>t.isVariadicOnly?`${t.variadic.nestableExpression}[]`:`[${t.tuple.map(i=>i.kind==="defaultables"?`${i.node.nestableExpression} = ${ze(i.default)}`:i.kind==="optionals"?`${i.node.nestableExpression}?`:i.kind==="variadic"?`...${i.node.nestableExpression}[]`:i.node.expression).join(", ")}]`},intersections:{sequence:(t,n,i)=>{const a=ms({l:t.tuple,r:n.tuple,disjoint:new W,result:[],fixedVariants:[],ctx:i}),l=a.disjoint.length===0?[a,...a.fixedVariants]:a.fixedVariants;return l.length===0?a.disjoint:l.length===1?i.$.node("sequence",Zy(l[0].result)):i.$.node("union",l.map(u=>({proto:Array,sequence:Zy(u.result)})))}}});var Vv,Hv,Gv,Jv;class UC extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.Array.internal);w(this,"tuple",_C(this.inner));w(this,"prefixLength",((Vv=this.prefix)==null?void 0:Vv.length)??0);w(this,"defaultablesLength",((Hv=this.defaultables)==null?void 0:Hv.length)??0);w(this,"optionalsLength",((Gv=this.optionals)==null?void 0:Gv.length)??0);w(this,"postfixLength",((Jv=this.postfix)==null?void 0:Jv.length)??0);w(this,"defaultablesAndOptionals",[]);w(this,"prevariadic",this.tuple.filter(i=>i.kind==="defaultables"||i.kind==="optionals"?(this.defaultablesAndOptionals.push(i.node),!0):i.kind==="prefix"));w(this,"variadicOrPostfix",Zi(this.variadic&&[this.variadic],this.postfix));w(this,"flatRefs",this.addFlatRefs());w(this,"isVariadicOnly",this.prevariadic.length+this.postfixLength===0);w(this,"minVariadicLength",this.inner.minVariadicLength??0);w(this,"minLength",this.prefixLength+this.minVariadicLength+this.postfixLength);w(this,"minLengthNode",this.minLength===0?null:this.$.node("minLength",this.minLength));w(this,"maxLength",this.variadic?null:this.tuple.length);w(this,"maxLengthNode",this.maxLength===null?null:this.$.node("maxLength",this.maxLength));w(this,"impliedSiblings",this.minLengthNode?this.maxLengthNode?[this.minLengthNode,this.maxLengthNode]:[this.minLengthNode]:this.maxLengthNode?[this.maxLengthNode]:[]);w(this,"defaultValueMorphs",BC(this));w(this,"defaultValueMorphsReference",this.defaultValueMorphs.length?$t(this.defaultValueMorphs):void 0);w(this,"traverseAllows",(i,a)=>{for(let l=0;l<i.length;l++)if(!this.elementAtIndex(i,l).node.traverseAllows(i[l],a))return!1;return!0});w(this,"traverseApply",(i,a)=>{let l=0;for(;l<i.length;l++)In(l,()=>this.elementAtIndex(i,l).node.traverseApply(i[l],a),a)});w(this,"expression",this.description)}addFlatRefs(){return Uy(this.flatRefs,this.prevariadic.flatMap((i,a)=>Be(i.node.flatRefs.map(l=>Ni([`${a}`,...l.path],l.node)),Ni([`${a}`],i.node)))),Uy(this.flatRefs,this.variadicOrPostfix.flatMap(i=>Be(i.flatRefs.map(a=>Ni([Z.intrinsic.nonNegativeIntegerString.internal,...a.path],a.node)),Ni([Z.intrinsic.nonNegativeIntegerString.internal],i)))),this.flatRefs}elementAtIndex(i,a){if(a<this.prevariadic.length)return this.tuple[a];const l=i.length-this.postfixLength;return a>=l?{kind:"postfix",node:this.postfix[a-l]}:{kind:"variadic",node:this.variadic??nt(`Unexpected attempt to access index ${a} on ${this}`)}}get element(){return this.cacheGetter("element",this.$.node("union",this.children))}compile(i){if(this.prefix)for(const[a,l]of this.prefix.entries())i.traverseKey(`${a}`,`data[${a}]`,l);for(const[a,l]of this.defaultablesAndOptionals.entries()){const u=`${a+this.prefixLength}`;i.if(`${u} >= ${i.data}.length`,()=>i.traversalKind==="Allows"?i.return(!0):i.return()),i.traverseKey(u,`data[${u}]`,l)}if(this.variadic&&(this.postfix&&i.const("firstPostfixIndex",`${i.data}.length${this.postfix?`- ${this.postfix.length}`:""}`),i.for(`i < ${this.postfix?"firstPostfixIndex":"data.length"}`,()=>i.traverseKey("i","data[i]",this.variadic),this.prevariadic.length),this.postfix))for(const[a,l]of this.postfix.entries()){const u=`firstPostfixIndex + ${a}`;i.traverseKey(u,`data[${u}]`,l)}i.traversalKind==="Allows"&&i.return(!0)}_transform(i,a){a.path.push(Z.intrinsic.nonNegativeIntegerString.internal);const l=super._transform(i,a);return a.path.pop(),l}reduceJsonSchema(i,a){if(this.prevariadic.length&&(i.prefixItems=this.prevariadic.map(l=>{const u=l.node.toJsonSchemaRecurse(a);if(l.kind==="defaultables"){const f=typeof l.default=="function"?l.default():l.default;u.default=Z.intrinsic.jsonData.allows(f)?f:a.fallback.defaultValue({code:"defaultValue",base:u,value:f})}return u})),this.minLength&&(i.minItems=this.minLength),this.variadic){const l=Object.assign(i,{items:this.variadic.toJsonSchemaRecurse(a)});if(this.maxLength&&(l.maxItems=this.maxLength),this.postfix){const u=this.postfix.map(f=>f.toJsonSchemaRecurse(a));i=a.fallback.arrayPostfix({code:"arrayPostfix",base:l,elements:u})}}else i.items=!1,delete i.maxItems;return i}}const Af={},BC=t=>{if(!t.defaultables)return[];const n=[];let i="[";const a=t.prefixLength+t.defaultablesLength-1;for(let l=t.prefixLength;l<=a;l++){const[u,f]=t.defaultables[l-t.prefixLength];n.push(u0(l,u,f)),i+=`${l}: ${u.id} = ${Xi(f)}, `}return i+="]",Af[i]??(Af[i]=n)},y0={implementation:zC,Node:UC},_C=t=>{const n=[];if(t.prefix)for(const i of t.prefix)n.push({kind:"prefix",node:i});if(t.defaultables)for(const[i,a]of t.defaultables)n.push({kind:"defaultables",node:i,default:a});if(t.optionals)for(const i of t.optionals)n.push({kind:"optionals",node:i});if(t.variadic&&n.push({kind:"variadic",node:t.variadic}),t.postfix)for(const i of t.postfix)n.push({kind:"postfix",node:i});return n},Zy=t=>t.reduce((n,i)=>(i.kind==="variadic"?n.variadic=i.node:i.kind==="defaultables"?n.defaultables=Be(n.defaultables,[[i.node,i.default]]):n[i.kind]=Be(n[i.kind],i.node),n),{}),v0="A postfix required element cannot follow an optional or defaultable element",qC="A postfix element requires a variadic element",ms=t=>{var v,b;const[n,...i]=t.l,[a,...l]=t.r;if(!n||!a)return t;const u=((v=i.at(-1))==null?void 0:v.kind)==="postfix",f=((b=l.at(-1))==null?void 0:b.kind)==="postfix",d=n.kind==="prefix"||a.kind==="prefix"?"prefix":n.kind==="postfix"||a.kind==="postfix"?"postfix":n.kind==="variadic"&&a.kind==="variadic"?"variadic":u||f?"prefix":n.kind==="defaultables"||a.kind==="defaultables"?"defaultables":"optionals";if(n.kind==="prefix"&&a.kind==="variadic"&&f){const k=ms({...t,fixedVariants:[],r:l.map(N=>({...N,kind:"prefix"}))});k.disjoint.length===0&&t.fixedVariants.push(k)}else if(a.kind==="prefix"&&n.kind==="variadic"&&u){const k=ms({...t,fixedVariants:[],l:i.map(N=>({...N,kind:"prefix"}))});k.disjoint.length===0&&t.fixedVariants.push(k)}const m=mt(n.node,a.node,t.ctx);if(m instanceof W)if(d==="prefix"||d==="postfix")t.disjoint.push(...m.withPrefixKey(d==="prefix"?t.result.length:`-${i.length+1}`,"required")),t.result=[...t.result,{kind:d,node:Z.intrinsic.never.internal}];else return d==="optionals"||d==="defaultables"?t:ms({...t,fixedVariants:[],l:i.map(k=>({...k,kind:"prefix"})),r:i.map(k=>({...k,kind:"prefix"}))});else d==="defaultables"?(n.kind==="defaultables"&&a.kind==="defaultables"&&n.default!==a.default&&J(o0(n.default,a.default)),t.result=[...t.result,{kind:d,node:m,default:n.kind==="defaultables"?n.default:a.kind==="defaultables"?a.default:nt(`Unexpected defaultable intersection from ${n.kind} and ${a.kind} elements.`)}]):t.result=[...t.result,{kind:d,node:m}];const p=t.l.length,g=t.r.length;return(n.kind!=="variadic"||p>=g&&(a.kind==="variadic"||g===1))&&(t.l=i),(a.kind!=="variadic"||g>=p&&(n.kind==="variadic"||p===1))&&(t.r=l),ms(t)},b0=t=>n=>{var i,a;if(n.props.length||n.index){const l=((i=n.index)==null?void 0:i.map(f=>f[t]))??[];for(const f of n.props)l.push(f[t]);n.undeclared&&l.push(`+ (undeclared): ${n.undeclared}`);const u=`{ ${l.join(", ")} }`;return n.sequence?`${u} & ${n.sequence.description}`:u}return((a=n.sequence)==null?void 0:a.description)??"{}"},KC=b0("description"),VC=b0("expression"),Qy=(t,n,i)=>{const a=t.required?"required":"optional";if(!n.signature.allows(t.key))return null;const l=Zn(t.value,n.value,i);return l instanceof W?a==="optional"?i.node("optional",{key:t.key,value:Z.intrinsic.never.internal}):l.withPrefixKey(t.key,t.kind):null},HC=Fe({kind:"structure",hasAssociatedError:!1,normalize:t=>t,applyConfig:(t,n)=>!t.undeclared&&n.onUndeclaredKey!=="ignore"?{...t,undeclared:n.onUndeclaredKey}:t,keys:{required:{child:!0,parse:Lt("required"),reduceIo:(t,n,i)=>{n.required=Be(n.required,i.map(a=>a[t]))}},optional:{child:!0,parse:Lt("optional"),reduceIo:(t,n,i)=>{if(t==="in"){n.optional=i.map(a=>a.in);return}for(const a of i)n[a.outProp.kind]=Be(n[a.outProp.kind],a.outProp.out)}},index:{child:!0,parse:Lt("index")},sequence:{child:!0,parse:Lt("sequence")},undeclared:{parse:t=>t==="ignore"?void 0:t,reduceIo:(t,n,i)=>{i==="delete"&&(t==="in"?delete n.undeclared:n.undeclared="reject")}}},defaults:{description:KC},intersections:{structure:(t,n,i)=>{const a={...t.inner},l={...n.inner},u=new W;if(t.undeclared){const m=t.keyof();for(const p of n.requiredKeys)m.allows(p)||u.add("presence",Z.intrinsic.never.internal,n.propsByKey[p].value,{path:[p]});l.optional&&(l.optional=l.optional.filter(p=>m.allows(p.key))),l.index&&(l.index=l.index.flatMap(p=>{if(p.signature.extends(m))return p;const g=Zn(m,p.signature,i.$);if(g instanceof W)return[];const v=td(g,p.value,i.$);return v.required&&(l.required=Zi(l.required,v.required)),v.optional&&(l.optional=Zi(l.optional,v.optional)),v.index??[]}))}if(n.undeclared){const m=n.keyof();for(const p of t.requiredKeys)m.allows(p)||u.add("presence",t.propsByKey[p].value,Z.intrinsic.never.internal,{path:[p]});a.optional&&(a.optional=a.optional.filter(p=>m.allows(p.key))),a.index&&(a.index=a.index.flatMap(p=>{if(p.signature.extends(m))return p;const g=Zn(m,p.signature,i.$);if(g instanceof W)return[];const v=td(g,p.value,i.$);return v.required&&(a.required=Zi(a.required,v.required)),v.optional&&(a.optional=Zi(a.optional,v.optional)),v.index??[]}))}const f={};(t.undeclared||n.undeclared)&&(f.undeclared=t.undeclared==="reject"||n.undeclared==="reject"?"reject":"delete");const d=Ao({kind:"structure",baseInner:f,l:$o(a),r:$o(l),roots:[],ctx:i});return d instanceof W&&u.push(...d),u.length?u:d}},reduce:(t,n)=>{if(t.index){if(!(t.required||t.optional))return;let i=!1;const a=t.required??[],l=t.optional??[],u=[...l];for(const f of t.index){for(const d of a){const m=Qy(d,f,n);if(m instanceof W)return m}for(const[d,m]of l.entries()){const p=Qy(m,f,n);if(p instanceof W)return p;p!==null&&(u[d]=p,i=!0)}}if(i)return n.node("structure",{...t,optional:u},{prereduced:!0})}}});var Yv,Iv;class GC extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"impliedSiblings",this.children.flatMap(i=>i.impliedSiblings??[]));w(this,"props",Zi(this.required,this.optional));w(this,"propsByKey",_e(this.props,(i,a)=>[a.key,a]));w(this,"propsByKeyReference",$t(this.propsByKey));w(this,"expression",VC(this));w(this,"requiredKeys",((Yv=this.required)==null?void 0:Yv.map(i=>i.key))??[]);w(this,"optionalKeys",((Iv=this.optional)==null?void 0:Iv.map(i=>i.key))??[]);w(this,"literalKeys",[...this.requiredKeys,...this.optionalKeys]);w(this,"_keyof");w(this,"traverseAllows",(i,a)=>this._traverse("Allows",i,a));w(this,"traverseApply",(i,a)=>this._traverse("Apply",i,a));w(this,"_traverse",(i,a,l)=>{const u=(l==null?void 0:l.currentErrorCount)??0;for(let f=0;f<this.props.length;f++)if(i==="Allows"){if(!this.props[f].traverseAllows(a,l))return!1}else if(this.props[f].traverseApply(a,l),l.failFast&&l.currentErrorCount>u)return!1;if(this.sequence){if(i==="Allows"){if(!this.sequence.traverseAllows(a,l))return!1}else if(this.sequence.traverseApply(a,l),l.failFast&&l.currentErrorCount>u)return!1}if(this.index||this.undeclared==="reject"){const f=Object.keys(a);f.push(...Object.getOwnPropertySymbols(a));for(let d=0;d<f.length;d++){const m=f[d];if(this.index){for(const p of this.index)if(p.signature.traverseAllows(m,l)){if(i==="Allows"){if(!In(m,()=>p.value.traverseAllows(a[m],l),l))return!1}else if(In(m,()=>p.value.traverseApply(a[m],l),l),l.failFast&&l.currentErrorCount>u)return!1}}if(this.undeclared==="reject"&&!this.declaresKey(m)&&(i==="Allows"||(l.errorFromNodeContext({code:"predicate",expected:"removed",actual:"",relativePath:[m],meta:this.meta}),l.failFast)))return!1}}return this.structuralMorph&&l&&!l.hasError()&&l.queueMorphs([this.structuralMorph]),!0});w(this,"declaresKey",i=>{var a;return i in this.propsByKey||((a=this.index)==null?void 0:a.some(l=>l.signature.allows(i)))||this.sequence!==void 0&&Z.intrinsic.nonNegativeIntegerString.allows(i)});w(this,"structuralMorphRef",this.structuralMorph&&$t(this.structuralMorph))}keyof(){if(this._keyof)return this._keyof;let i=this.$.units(this.literalKeys).branches;if(this.index)for(const{signature:a}of this.index)i=i.concat(a.branches);return this._keyof=this.$.node("union",i)}map(i){return this.$.node("structure",this.props.flatMap(i).reduce((a,l)=>{const u=this.propsByKey[l.key];if(Et(l))return l.kind!=="required"&&l.kind!=="optional"?J(`Map result must have kind "required" or "optional" (was ${l.kind})`):(a[l.kind]=Be(a[l.kind],l),a);const f=l.kind??(u==null?void 0:u.kind)??"required",d=_e(l,(m,p)=>m in jd.implementation.keys?[m,p]:[]);return a[f]=Be(a[f],this.$.node(f,d)),a},{}))}assertHasKeys(i){const a=i.filter(l=>!so(l,this.keyof()));if(a.length)return J(Fy(this.expression,a))}get(i,...a){var m;let l,u=!1;const f=ZC(i);if((typeof f=="string"||typeof f=="symbol")&&this.propsByKey[f]&&(l=this.propsByKey[f].value,u=this.propsByKey[f].required),this.index)for(const p of this.index)so(f,p.signature)&&(l=(l==null?void 0:l.and(p.value))??p.value);if(this.sequence&&so(f,Z.intrinsic.nonNegativeIntegerString))if(le(f,"root"))this.sequence.variadic&&(l=(l==null?void 0:l.and(this.sequence.element))??this.sequence.element);else{const p=Number.parseInt(f);if(p<this.sequence.prevariadic.length){const g=this.sequence.prevariadic[p].node;l=(l==null?void 0:l.and(g))??g,u||(u=p<this.sequence.prefixLength)}else if(this.sequence.variadic){const g=this.$.node("union",this.sequence.variadicOrPostfix);l=(l==null?void 0:l.and(g))??g}}if(!l)return(m=this.sequence)!=null&&m.variadic&&le(f,"root")&&f.extends(Z.intrinsic.number)?J(QC(f.expression,this.sequence.expression)):J(Fy(this.expression,[f]));const d=l.get(...a);return u?d:d.or(Z.intrinsic.undefined)}pick(...i){return this.assertHasKeys(i),this.$.node("structure",this.filterKeys("pick",i))}omit(...i){return this.assertHasKeys(i),this.$.node("structure",this.filterKeys("omit",i))}optionalize(){const{required:i,...a}=this.inner;return this.$.node("structure",{...a,optional:this.props.map(l=>l.hasKind("required")?this.$.node("optional",l.inner):l)})}require(){const{optional:i,...a}=this.inner;return this.$.node("structure",{...a,required:this.props.map(l=>l.hasKind("optional")?{key:l.key,value:l.value}:l)})}merge(i){const a=this.filterKeys("omit",[i.keyof()]);return i.required&&(a.required=Be(a.required,i.required)),i.optional&&(a.optional=Be(a.optional,i.optional)),i.index&&(a.index=Be(a.index,i.index)),i.sequence&&(a.sequence=i.sequence),i.undeclared?a.undeclared=i.undeclared:delete a.undeclared,this.$.node("structure",a)}filterKeys(i,a){const l=zb(this.inner),u=f=>{const d=a.some(m=>so(f,m));return i==="pick"?d:!d};return l.required&&(l.required=l.required.filter(f=>u(f.key))),l.optional&&(l.optional=l.optional.filter(f=>u(f.key))),l.index&&(l.index=l.index.filter(f=>u(f.signature))),l}get defaultable(){var i;return this.cacheGetter("defaultable",((i=this.optional)==null?void 0:i.filter(a=>a.hasDefault()))??[])}_compileDeclaresKey(i){const a=[];if(this.props.length&&a.push(`k in ${this.propsByKeyReference}`),this.index)for(const l of this.index)a.push(i.invoke(l.signature,{kind:"Allows",arg:"k"}));return this.sequence&&a.push("$ark.intrinsic.nonNegativeIntegerString.allows(k)"),a.join(" || ")||"false"}get structuralMorph(){return this.cacheGetter("structuralMorph",YC(this))}compile(i){i.traversalKind==="Apply"&&i.initializeErrorCount();for(const a of this.props)i.check(a),i.traversalKind==="Apply"&&i.returnIfFailFast();if(this.sequence&&(i.check(this.sequence),i.traversalKind==="Apply"&&i.returnIfFailFast()),(this.index||this.undeclared==="reject")&&(i.const("keys","Object.keys(data)"),i.line("keys.push(...Object.getOwnPropertySymbols(data))"),i.for("i < keys.length",()=>this.compileExhaustiveEntry(i))),i.traversalKind==="Allows")return i.return(!0);this.structuralMorphRef&&i.if("ctx && !ctx.hasError()",()=>(i.line("ctx.queueMorphs(["),IC(i,this),i.line("])")))}compileExhaustiveEntry(i){if(i.const("k","keys[i]"),this.index)for(const a of this.index)i.if(`${i.invoke(a.signature,{arg:"k",kind:"Allows"})}`,()=>i.traverseKey("k","data[k]",a.value));return this.undeclared==="reject"&&i.if(`!(${this._compileDeclaresKey(i)})`,()=>i.traversalKind==="Allows"?i.return(!1):i.line(`ctx.errorFromNodeContext({ code: "predicate", expected: "removed", actual: "", relativePath: [k], meta: ${this.compiledMeta} })`).if("ctx.failFast",()=>i.return())),i}reduceJsonSchema(i,a){var l;switch(i.type){case"object":return this.reduceObjectJsonSchema(i,a);case"array":const u=((l=this.sequence)==null?void 0:l.reduceJsonSchema(i,a))??i;return this.props.length||this.index?a.fallback.arrayObject({code:"arrayObject",base:u,object:this.reduceObjectJsonSchema({type:"object"},a)}):u;default:return lt.throwInternalOperandError("structure",i)}}reduceObjectJsonSchema(i,a){if(this.props.length){i.properties={};for(const l of this.props){const u=l.value.toJsonSchemaRecurse(a);if(typeof l.key=="symbol"){a.fallback.symbolKey({code:"symbolKey",base:i,key:l.key,value:u,optional:l.optional});continue}if(l.hasDefault()){const f=typeof l.default=="function"?l.default():l.default;u.default=Z.intrinsic.jsonData.allows(f)?f:a.fallback.defaultValue({code:"defaultValue",base:u,value:f})}i.properties[l.key]=u}this.requiredKeys.length&&i.properties&&(i.required=this.requiredKeys.filter(l=>typeof l=="string"&&l in i.properties))}if(this.index)for(const l of this.index){const u=l.value.toJsonSchemaRecurse(a);if(l.signature.equals(Z.intrinsic.string)){i.additionalProperties=u;continue}for(const f of l.signature.branches){if(!f.extends(Z.intrinsic.string)){i=a.fallback.symbolKey({code:"symbolKey",base:i,key:null,value:u,optional:!1});continue}let d={type:"string"};if(f.hasKind("morph")&&(d=a.fallback.morph({code:"morph",base:f.in.toJsonSchemaRecurse(a),out:f.out.toJsonSchemaRecurse(a)})),!f.hasKind("intersection"))return nt(`Unexpected index branch kind ${f.kind}.`);const{pattern:m}=f.inner;if(m){const p=Object.assign(d,{pattern:m[0].rule});for(let g=1;g<m.length;g++)d=a.fallback.patternIntersection({code:"patternIntersection",base:p,pattern:m[g].rule});i.patternProperties??(i.patternProperties={}),i.patternProperties[p.pattern]=u}}}return this.undeclared&&!i.additionalProperties&&(i.additionalProperties=!1),i}}const $f={},JC=t=>{var i,a;let n="";for(let l=0;l<t.defaultable.length;l++)n+=t.defaultable[l].defaultValueMorphRef;if((i=t.sequence)!=null&&i.defaultValueMorphsReference&&(n+=(a=t.sequence)==null?void 0:a.defaultValueMorphsReference),t.undeclared==="delete"){if(n+="delete !(",t.required)for(const l of t.required)n+=l.compiledKey+" | ";if(t.optional)for(const l of t.optional)n+=l.compiledKey+" | ";if(t.index)for(const l of t.index)n+=l.signature.id+" | ";if(t.sequence)if(t.sequence.maxLength===null)n+=de.nonNegativeIntegerString.id;else for(let l=0;l<t.sequence.tuple.length;l++)n+=l+" | ";n+=")"}return n},YC=t=>{const n=JC(t);if(!n)return;if($f[n])return $f[n];const i=(a,l)=>{var u;for(let f=0;f<t.defaultable.length;f++)t.defaultable[f].key in a||t.defaultable[f].defaultValueMorph(a,l);if((u=t.sequence)!=null&&u.defaultables)for(let f=a.length-t.sequence.prefixLength;f<t.sequence.defaultables.length;f++)t.sequence.defaultValueMorphs[f](a,l);if(t.undeclared==="delete")for(const f in a)t.declaresKey(f)||delete a[f];return a};return $f[n]=i},IC=(t,n)=>{var l;const a=`(data${n.defaultable.some(u=>u.defaultValueMorph.length===2)||((l=n.sequence)==null?void 0:l.defaultValueMorphs.some(u=>u.length===2))?", ctx":""})`;return t.block(`${a} => `,u=>{var f;for(let d=0;d<n.defaultable.length;d++){const{serializedKey:m,defaultValueMorphRef:p}=n.defaultable[d];u.if(`!(${m} in data)`,g=>g.line(`${p}${a}`))}return(f=n.sequence)!=null&&f.defaultables&&u.for(`i < ${n.sequence.defaultables.length}`,d=>d.set("data[i]",5),`data.length - ${n.sequence.prefixLength}`),n.undeclared==="delete"&&u.forIn("data",d=>d.if(`!(${n._compileDeclaresKey(d)})`,m=>m.line("delete data[k]"))),u.return("data")})},x0={implementation:HC,Node:GC},ZC=t=>(le(t,"root")&&t.hasKind("unit")&&(t=t.unit),typeof t=="number"&&(t=`${t}`),t),QC=(t,n)=>`${t} is not allowed as an array index on ${n}. Use the 'nonNegativeIntegerString' keyword instead.`,td=(t,n,i)=>{const[a,l]=ZA(t.branches,f=>f.hasKind("unit"));if(!a.length)return{index:i.node("index",{signature:t,value:n})};const u={};for(const f of a){const d=i.node("required",{key:f.unit,value:n});u[d.kind]=Be(u[d.kind],d)}return l.length&&(u.index=i.node("index",{signature:l,value:n})),u},FC=t=>le(t,"root")?t.expression:ze(t),Fy=(t,n)=>`Key${n.length===1?"":"s"} ${n.map(FC).join(", ")} ${n.length===1?"does":"do"} not exist on ${t}`,Jo={...q2,alias:Md.implementation,domain:zd.implementation,unit:p0.implementation,proto:To.implementation,union:h0.implementation,morph:f0.implementation,intersection:c0.implementation,divisor:Yb.implementation,pattern:r0.implementation,predicate:Jb.implementation,required:g0.implementation,optional:jd.implementation,index:m0.implementation,sequence:y0.implementation,structure:x0.implementation};Z.defaultConfig=s$(Object.assign(_e(Jo,(t,n)=>[t,n.defaults]),{jitless:g$(),clone:h$,onUndeclaredKey:"ignore",exactOptionalPropertyTypes:!0,numberAllowsNaN:!1,dateAllowsInvalid:!1,onFail:null,keywords:{},toJsonSchema:lt.defaultConfig}));Z.resolvedConfig=Ff(Z.defaultConfig,Z.config);const XC={...K2,alias:Md.Node,domain:zd.Node,unit:p0.Node,proto:To.Node,union:h0.Node,morph:f0.Node,intersection:c0.Node,divisor:Yb.Node,pattern:r0.Node,predicate:Jb.Node,required:g0.Node,optional:jd.Node,index:m0.Node,sequence:y0.Node,structure:x0.Node};class nd extends t${get[Yn](){return"module"}}const S0=(t,n)=>new nd(_e(t,(i,a)=>[i,le(a,"module")?S0(a,n):n.bindReference(a)])),PC=t=>kt(t)?t:"branches"in t&&kt(t.branches)?t.branches:void 0,WC=(t,n)=>J(`Node of kind ${n} is not valid as a ${t} definition`),Xy=t=>`#${t} duplicates public alias ${t}`,Cf={};Z.ambient??(Z.ambient={});let Py;const w0="function $",eT=t=>N0(t,k0(t)),N0=(t,n)=>{const i=n.write(w0,4),a=n.compile()();for(const l of t)l.precompilation||(l.traverseAllows=a[`${l.id}Allows`].bind(a),l.isRoot()&&!l.allowsRequiresContext&&(l.allows=l.traverseAllows),l.traverseApply=a[`${l.id}Apply`].bind(a),a[`${l.id}Optimistic`]&&(l.traverseOptimistic=a[`${l.id}Optimistic`].bind(a)),l.precompilation=i)},k0=t=>new Db().return(t.reduce((n,i)=>{const a=new kf({kind:"Allows"}).indent();i.compile(a);const l=a.write(`${i.id}Allows`),u=new kf({kind:"Apply"}).indent();i.compile(u);const f=u.write(`${i.id}Apply`),d=`${n}${l},
102
- ${f},
103
- `;if(!i.hasKind("union"))return d;const m=new kf({kind:"Allows",optimistic:!0}).indent();i.compile(m);const p=m.write(`${i.id}Optimistic`);return`${d}${p},
104
- `},`{
105
- `)+"}");class R0{constructor(n,i){w(this,"config");w(this,"resolvedConfig");w(this,"name");w(this,"referencesById",{});w(this,"references",[]);w(this,"resolutions",{});w(this,"exportedNames",[]);w(this,"aliases",{});w(this,"resolved",!1);w(this,"nodesByHash",{});w(this,"intrinsic");w(this,"_json");w(this,"generic",(...n)=>{const i=this;return(a,l)=>new Co(n,l?new Gb(a):a,i,i,l??null)});w(this,"units",(n,i)=>{const a=[];for(const u of n)a.includes(u)||a.push(u);const l=a.map(u=>this.node("unit",{unit:u},i));return this.node("union",l,{...i,prereduced:!0})});w(this,"lazyResolutions",[]);w(this,"schema",(n,i)=>this.finalize(this.parseSchema(n,i)));w(this,"parseSchema",(n,i)=>this.node(go(n),n,i));w(this,"precompilation");w(this,"_exportedResolutions");w(this,"_exports");w(this,"node",(n,i,a={})=>{const l=this.preparseNode(n,i,a);if(Et(l))return this.bindReference(l);const u=this.createParseContext(l),f=s0(u),d=this.bindReference(f);return an[u.id]=d});w(this,"parse",(n,i={})=>this.finalize(this.parseDefinition(n,i)));this.config=Ff(Z.config,i),this.resolvedConfig=Ff(Z.resolvedConfig,i),this.name=this.resolvedConfig.name??`anonymousScope${Object.keys(Cf).length}`,this.name in Cf&&J(`A Scope already named ${this.name} already exists`),Cf[this.name]=this;const a=Object.entries(n).map(l=>this.preparseOwnAliasEntry(...l));for(const[l,u]of a){let f=l;if(l[0]==="#"?(f=l.slice(1),f in this.aliases&&J(Xy(f)),this.aliases[f]=u):(f in this.aliases&&J(Xy(l)),this.aliases[f]=u,this.exportedNames.push(f)),!le(u,"module")&&!le(u,"generic")&&!_o(u)){const d=this.preparseOwnDefinitionFormat(u,{alias:f});this.resolutions[f]=le(d,"root")?this.bindReference(d):this.createParseContext(d).id}}Py??(Py=this.node("union",{branches:["string","number","object","bigint","symbol",{unit:!0},{unit:!1},{unit:void 0},{unit:null}]},{prereduced:!0})),this.nodesByHash[Py.hash]=this.node("intersection",{},{prereduced:!0}),this.intrinsic=Z.intrinsic?_e(Z.intrinsic,(l,u)=>l.startsWith("json")?[]:[l,this.bindReference(u)]):{}}get[Yn](){return"scope"}cacheGetter(n,i){return Object.defineProperty(this,n,{value:i}),i}get internal(){return this}get json(){return this._json||this.export(),this._json}defineSchema(n){return n}lazilyResolve(n,i){const a=this.node("alias",{reference:i??"synthetic",resolve:n},{prereduced:!0});return this.resolved||this.lazyResolutions.push(a),a}preparseNode(n,i,a){var d;let l=typeof n=="string"?n:go(i,n);if(Et(i)&&i.kind===l)return i;if(l==="alias"&&!(a!=null&&a.prereduced)){const{reference:m}=Md.implementation.normalize(i,this);if(m.startsWith("$")){const p=this.resolveRoot(m.slice(1));i=p,l=p.kind}}else if(l==="union"&&er(i,"object")){const m=PC(i);(m==null?void 0:m.length)===1&&(i=m[0],l=go(i))}if(Et(i)&&i.kind===l)return i;const u=Jo[l],f=((d=u.normalize)==null?void 0:d.call(u,i,this))??i;return Et(f)?f.kind===l?f:WC(l,f.kind):{...a,$:this,kind:l,def:f,prefix:a.alias??l}}bindReference(n){let i;return Et(n)?i=n.$===this?n:new n.constructor(n.attachments,this):i=n.$===this?n:new Co(n.params,n.bodyDef,n.$,this,n.hkt),this.resolved||Object.assign(this.referencesById,i.referencesById),i}resolveRoot(n){return this.maybeResolveRoot(n)??J(C0(n))}maybeResolveRoot(n){const i=this.maybeResolve(n);if(!le(i,"generic"))return i}maybeResolveSubalias(n){return id(this.aliases,n)??id(this.ambient,n)}get ambient(){return Z.ambient}maybeResolve(n){var l;const i=this.resolutions[n];if(i){if(typeof i!="string")return this.bindReference(i);const u=an[i];if(le(u,"root"))return this.resolutions[n]=u;if(le(u,"context")){if(u.phase==="resolving")return this.node("alias",{reference:`$${n}`},{prereduced:!0});if(u.phase==="resolved")return nt(`Unexpected resolved context for was uncached by its scope: ${ze(u)}`);u.phase="resolving";const f=this.bindReference(this.parseOwnDefinitionFormat(u.def,u));return u.phase="resolved",an[f.id]=f,an[u.id]=f,this.resolutions[n]=f}return nt(`Unexpected nodesById entry for ${i}: ${ze(u)}`)}let a=this.aliases[n]??((l=this.ambient)==null?void 0:l[n]);return a?(a=this.normalizeRootScopeValue(a),le(a,"generic")?this.resolutions[n]=this.bindReference(a):le(a,"module")?(a.root||J(T0(n)),this.resolutions[n]=this.bindReference(a.root)):this.resolutions[n]=this.parse(a,{alias:n})):this.maybeResolveSubalias(n)}createParseContext(n){const i=n.id??a0(n.prefix);return an[i]=Object.assign(n,{[Yn]:"context",$:this,id:i,phase:"unresolved"})}traversal(n){return new Ir(n,this.resolvedConfig)}import(...n){return new nd(_e(this.export(...n),(i,a)=>[`#${i}`,a]))}export(...n){if(!this._exports){this._exports={};for(const a of this.exportedNames){const l=this.aliases[a];this._exports[a]=le(l,"module")?S0(l,this):Wy(this.maybeResolve(a))}for(const a of this.lazyResolutions)a.resolution;if(this._exportedResolutions=$0(this,this._exports),this._json=A0(this._exportedResolutions),Object.assign(this.resolutions,this._exportedResolutions),this.references=Object.values(this.referencesById),!this.resolvedConfig.jitless){const a=k0(this.references);this.precompilation=a.write(w0,4),N0(this.references,a)}this.resolved=!0}const i=n.length?n:this.exportedNames;return new nd(_e(i,(a,l)=>[l,this._exports[l]]))}resolve(n){return this.export()[n]}parseDefinition(n,i={}){if(le(n,"root"))return this.bindReference(n);const a=this.preparseOwnDefinitionFormat(n,i);if(le(a,"root"))return this.bindReference(a);const l=this.createParseContext(a);an[l.id]=l;let u=this.bindReference(this.parseOwnDefinitionFormat(n,l));return u.isCyclic&&(u=Y2(u,l.id)),an[l.id]=u,u}finalize(n){return Wy(n),!n.precompilation&&!this.resolvedConfig.jitless&&eT(n.references),n}}class E0 extends R0{parseOwnDefinitionFormat(n,i){return s0(i)}preparseOwnDefinitionFormat(n,i){return this.preparseNode(go(n),n,i)}preparseOwnAliasEntry(n,i){return[n,i]}normalizeRootScopeValue(n){return n}}const Wy=t=>{const n=t.references.filter(i=>i.hasKind("alias"));for(const i of n){Object.assign(i.referencesById,i.resolution.referencesById);for(const a of t.references)i.id in a.referencesById&&Object.assign(a.referencesById,i.referencesById)}return t},A0=t=>_e(t,(n,i)=>[n,le(i,"root")||le(i,"generic")?i.json:le(i,"module")?A0(i):nt(`Unexpected resolution ${ze(i)}`)]),id=(t,n)=>{const i=n.indexOf(".");if(i===-1)return;const a=n.slice(0,i),l=t[a];if(l===void 0)return;if(!le(l,"module"))return J(tT(a));const u=n.slice(i+1),f=l[u];if(f===void 0)return id(l,u);if(le(f,"root")||le(f,"generic"))return f;if(le(f,"module"))return f.root??J(T0(n));nt(`Unexpected resolution for alias '${n}': ${ze(f)}`)},Ud=(t,n)=>new E0(t,n),Us=new E0({}),$0=(t,n)=>{const i={};for(const a in n){const l=n[a];if(le(l,"module")){const u=$0(t,l),f=_e(u,(d,m)=>[`${a}.${d}`,m]);Object.assign(i,f)}else le(l,"root")||le(l,"generic")?i[a]=l:nt(`Unexpected scope resolution ${ze(l)}`)}return i},C0=t=>`'${t}' is unresolvable`,tT=t=>`'${t}' must reference a module to be accessed using dot syntax`,T0=t=>`Reference to submodule '${t}' must specify an alias`;Us.export();const Ke=Us.schema,Bd=Us.node;Us.defineSchema;const Qn=Us.generic,O0="^(?:0|[1-9]\\d*)$",nT=new RegExp(O0);$t(nT);const j0=Ud({bigint:"bigint",boolean:[{unit:!1},{unit:!0}],false:{unit:!1},never:[],null:{unit:null},number:"number",object:"object",string:"string",symbol:"symbol",true:{unit:!0},unknown:{},undefined:{unit:void 0},Array,Date},{prereducedAliases:!0}).export();Z.intrinsic={...j0};const D0=Ud({integer:{domain:"number",divisor:1},lengthBoundable:["string",Array],key:["string","symbol"],nonNegativeIntegerString:{domain:"string",pattern:O0}},{prereducedAliases:!0}).export();Object.assign(Z.intrinsic,D0);const iT=Ud({jsonPrimitive:["string","number",{unit:!0},{unit:!1},{unit:null}],jsonObject:{domain:"object",index:{signature:"string",value:"$jsonData"}},jsonData:["$jsonPrimitive","$jsonObject"]},{prereducedAliases:!0}).export(),de={...j0,...D0,...iT,emptyStructure:Bd("structure",{},{prereduced:!0})};Z.intrinsic={...de};const rT=t=>typeof t=="string"&&t[0]==="d"&&(t[1]==="'"||t[1]==='"')&&t.at(-1)===t[1],ev=t=>t.toString()!=="Invalid Date",aT=t=>t.slice(2,-1),M0=t=>`'${t}' could not be parsed by the Date constructor`,sT=(t,n)=>lT(t,n),lT=(t,n)=>{const i=new Date(t);if(ev(i))return i;const a=D$(t);if(a!==void 0){const l=new Date(a);if(ev(l))return l}return n?J(n===!0?M0(t):n):void 0},tv=(t,n)=>{const i=t.scanner.shiftUntil(uT[z0[n]]);if(t.scanner.lookahead==="")return t.error(fT(i,n));if(t.scanner.shift(),n==="/"){try{new RegExp(i)}catch(a){J(String(a))}t.root=t.ctx.$.node("intersection",{domain:"string",pattern:i},{prereduced:!0})}else if(Nn(n,L0))t.root=t.ctx.$.node("unit",{unit:i});else{const a=sT(i,M0(i));t.root=t.ctx.$.node("unit",{meta:i,unit:a})}},L0={"'":1,'"':1},oT={"/":1,"'":1,'"':1},z0={"d'":"'",'d"':'"',"'":"'",'"':'"',"/":"/"},uT={"'":t=>t.lookahead==="'",'"':t=>t.lookahead==='"',"/":t=>t.lookahead==="/"},cT={'"':"double-quote","'":"single-quote","/":"forward slash"},fT=(t,n)=>`${n}${t} requires a closing ${cT[z0[n]]}`,dT=t=>`Private type references should not include '#'. Use '${t}' instead.`,U0="Optional definitions like 'string?' are only valid as properties in an object or tuple",B0="Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple",hT={">":!0,">=":!0},pT={"<":!0,"<=":!0},Oo={"<":">",">":"<","<=":">=",">=":"<=","==":"=="},mT=t=>`Unmatched )${t===""?"":` before ${t}`}`,_0=t=>`Missing ${t}`,gT=(t,n)=>`Left bounds are only valid when paired with right bounds (try ...${n}${t})`,q0=t=>`Left-bounded expressions must specify their limits using < or <= (was ${t})`,yT=(t,n,i,a)=>`An expression may have at most one left bound (parsed ${t}${Oo[n]}, ${i}${Oo[a]})`,vT=(t,n,i)=>K0(t,n,i,[]),K0=(t,n,i,a)=>{const l=i.parseUntilFinalizer();return a.push(l.root),l.finalizer===">"?a.length!==n.params.length?i.error(V0(t,n.names,a.map(u=>u.expression))):a:l.finalizer===","?K0(t,n,i,a):l.error(_0(">"))},V0=(t,n,i)=>`${t}<${n.join(", ")}> requires exactly ${n.length} args (got ${i.length}${i.length===0?"":`: ${i.join(", ")}`})`,nv=t=>{const n=t.scanner.shiftUntilNextTerminator();n==="keyof"?t.addPrefix("keyof"):t.root=xT(t,n)},bT=(t,n,i)=>{if(i.scanner.shiftUntilNonWhitespace(),i.scanner.shift()!=="<")return i.error(V0(t,n.names,[]));const l=vT(t,n,i);return n(...l)},xT=(t,n)=>ST(t,n)??wT(t,n)??t.error(n===""?t.scanner.lookahead==="#"?dT(t.shiftedByOne().scanner.shiftUntilNextTerminator()):H0(t):C0(n)),ST=(t,n)=>{var a;if((a=t.ctx.args)!=null&&a[n]){const l=t.ctx.args[n];return typeof l!="string"?l:t.ctx.$.node("alias",{reference:l},{prereduced:!0})}const i=t.ctx.$.maybeResolve(n);if(le(i,"root"))return i;if(i!==void 0)return le(i,"generic")?bT(n,i,t):J(`Unexpected resolution ${ze(i)}`)},wT=(t,n)=>{const i=M$(n);if(i!==void 0)return t.ctx.$.node("unit",{unit:i});const a=z$(n);if(a!==void 0)return t.ctx.$.node("unit",{unit:a})},H0=t=>{const n=t.previousOperator();return n?G0(n,t.scanner.unscanned):NT(t.scanner.unscanned)},G0=(t,n="")=>`Token '${t}' requires a right operand${n?` before '${n}'`:""}`,NT=t=>`Expected an expression${t?` before '${t}'`:""}`,J0=t=>t.scanner.lookahead===""?t.error(H0(t)):t.scanner.lookahead==="("?t.shiftedByOne().reduceGroupOpen():t.scanner.lookaheadIsIn(oT)?tv(t,t.scanner.shift()):t.scanner.lookaheadIsIn(qo)?J0(t.shiftedByOne()):t.scanner.lookahead==="d"&&t.scanner.nextLookahead in L0?tv(t,`${t.scanner.shift()}${t.scanner.shift()}`):nv(t),Ii=class Ii extends G${shiftUntilNextTerminator(){return this.shiftUntilNonWhitespace(),this.shiftUntil(()=>this.lookahead in Ii.terminatingChars)}};w(Ii,"terminatingChars",{"<":1,">":1,"=":1,"|":1,"&":1,")":1,"[":1,"%":1,",":1,":":1,"?":1,"#":1,...qo}),w(Ii,"finalizingLookaheads",{">":1,",":1,"":1,"=":1,"?":1}),w(Ii,"lookaheadIsFinalizing",(n,i)=>n===">"?i[0]==="="?i[1]==="=":i.trimStart()===""||Nn(i.trimStart()[0],Ii.terminatingChars):n==="="?i[0]!=="=":n===","||n==="?");let Ns=Ii;const kT=(t,n)=>{const i=ET(t,n);if(t.root.hasKind("unit")){if(typeof t.root.unit=="number"){t.reduceLeftBound(t.root.unit,i),t.unsetRoot();return}if(t.root.unit instanceof Date){const a=`d'${t.root.description??t.root.unit.toISOString()}'`;t.unsetRoot(),t.reduceLeftBound(a,i);return}}return $T(t,i)},RT={"<":1,">":1,"=":1},ET=(t,n)=>t.scanner.lookaheadIs("=")?`${n}${t.scanner.shift()}`:n,iv=(t,n,i,a)=>i.extends(Z.intrinsic.number)?typeof n!="number"?J(rd(t,n,a)):t==="=="?["min","max"]:t[0]===">"?["min"]:["max"]:i.extends(Z.intrinsic.lengthBoundable)?typeof n!="number"?J(rd(t,n,a)):t==="=="?["exactLength"]:t[0]===">"?["minLength"]:["maxLength"]:i.extends(Z.intrinsic.Date)?t==="=="?["after","before"]:t[0]===">"?["after"]:["before"]:J(R2(i.expression)),AT=t=>({rule:rT(t.limit)?aT(t.limit):t.limit,exclusive:t.comparator.length===1}),$T=(t,n)=>{const i=t.unsetRoot(),a=t.scanner.location;t.parseOperand();const l=t.unsetRoot(),u=t.scanner.sliceChars(a,t.scanner.location);if(t.root=i,!l.hasKind("unit")||typeof l.unit!="number"&&!(l.unit instanceof Date))return t.error(rd(n,u,"right"));const f=l.unit,d=n.length===1,m=iv(n,typeof f=="number"?f:u,i,"right");for(const g of m)t.constrainRoot(g,n==="=="?{rule:f}:{rule:f,exclusive:d});if(!t.branches.leftBound)return;if(!Nn(n,pT))return t.error(q0(n));const p=iv(t.branches.leftBound.comparator,t.branches.leftBound.limit,i,"left");t.constrainRoot(p[0],AT(t.branches.leftBound)),t.branches.leftBound=null},rd=(t,n,i)=>`Comparator ${i==="left"?Oo[t]:t} must be ${i==="left"?"preceded":"followed"} by a corresponding literal (was ${n})`,CT=t=>{t.scanner.shiftUntilNonWhitespace();const n=t.scanner.shiftUntilNextTerminator();t.root=t.root.brand(n)},TT=t=>{const n=t.scanner.shiftUntilNextTerminator(),i=L$(n,{errorOnFail:rv(n)});i===0&&t.error(rv(0)),t.root=t.root.constrain("divisor",i)},rv=t=>`% operator must be followed by a non-zero integer literal (was ${t})`,Y0=t=>{const n=t.scanner.shift();return n===""?t.finalize(""):n==="["?t.scanner.shift()==="]"?t.setRoot(t.root.array()):t.error(OT):n==="|"?t.scanner.lookahead===">"?t.shiftedByOne().pushRootToBranch("|>"):t.pushRootToBranch(n):n==="&"?t.pushRootToBranch(n):n===")"?t.finalizeGroup():Ns.lookaheadIsFinalizing(n,t.scanner.unscanned)?t.finalize(n):Nn(n,RT)?kT(t,n):n==="%"?TT(t):n==="#"?CT(t):n in qo?Y0(t):t.error(_d(n))},_d=(t,n="")=>`'${t}' is not allowed here${n&&` (should be ${n})`}`,OT="Missing expected ']'",jT=t=>{const n=t.unsetRoot();t.parseOperand();const i=t.unsetRoot();if(!i.hasKind("unit"))return t.error(DT(i.expression));const a=i.unit instanceof Date?()=>new Date(i.unit):i.unit;return[n,"=",a]},DT=t=>`Default value '${t}' must a literal value`,av=(t,n)=>{const i=n.$.maybeResolveRoot(t);if(i)return i;if(t.endsWith("[]")){const u=n.$.maybeResolveRoot(t.slice(0,-2));if(u)return u.array()}const a=new Yo(new Ns(t),n),l=MT(a);return a.finalizer===">"&&J(_d(">")),l},MT=t=>{t.parseOperand();let n=qd(t).root;return n?(t.finalizer==="="?n=jT(t):t.finalizer==="?"&&(n=[n,"?"]),t.scanner.shiftUntilNonWhitespace(),t.scanner.lookahead&&J(_d(t.scanner.lookahead)),n):nt(`Root was unexpectedly unset after parsing string '${t.scanner.scanned}'`)},qd=t=>{for(;t.finalizer===void 0;)LT(t);return t},LT=t=>t.hasRoot()?t.parseOperator():t.parseOperand();class Yo{constructor(n,i){w(this,"root");w(this,"branches",{prefixes:[],leftBound:null,intersection:null,union:null,pipe:null});w(this,"finalizer");w(this,"groups",[]);w(this,"scanner");w(this,"ctx");this.scanner=n,this.ctx=i}error(n){return J(n)}hasRoot(){return this.root!==void 0}setRoot(n){this.root=n}unsetRoot(){const n=this.root;return this.root=void 0,n}constrainRoot(...n){this.root=this.root.constrain(n[0],n[1])}finalize(n){if(this.groups.length)return this.error(_0(")"));this.finalizeBranches(),this.finalizer=n}reduceLeftBound(n,i){const a=Oo[i];if(!Nn(a,hT))return this.error(q0(i));if(this.branches.leftBound)return this.error(yT(this.branches.leftBound.limit,this.branches.leftBound.comparator,n,a));this.branches.leftBound={comparator:a,limit:n}}finalizeBranches(){if(this.assertRangeUnset(),this.branches.pipe){this.pushRootToBranch("|>"),this.root=this.branches.pipe;return}if(this.branches.union){this.pushRootToBranch("|"),this.root=this.branches.union;return}if(this.branches.intersection){this.pushRootToBranch("&"),this.root=this.branches.intersection;return}this.applyPrefixes()}finalizeGroup(){this.finalizeBranches();const n=this.groups.pop();if(!n)return this.error(mT(this.scanner.unscanned));this.branches=n}addPrefix(n){this.branches.prefixes.push(n)}applyPrefixes(){for(;this.branches.prefixes.length;){const n=this.branches.prefixes.pop();this.root=n==="keyof"?this.root.keyof():nt(`Unexpected prefix '${n}'`)}}pushRootToBranch(n){var a,l,u;this.assertRangeUnset(),this.applyPrefixes();const i=this.root;this.root=void 0,this.branches.intersection=((a=this.branches.intersection)==null?void 0:a.rawAnd(i))??i,n!=="&"&&(this.branches.union=((l=this.branches.union)==null?void 0:l.rawOr(this.branches.intersection))??this.branches.intersection,this.branches.intersection=null,n!=="|"&&(this.branches.pipe=((u=this.branches.pipe)==null?void 0:u.rawPipeOnce(this.branches.union))??this.branches.union,this.branches.union=null))}parseUntilFinalizer(){return qd(new Yo(this.scanner,this.ctx))}parseOperator(){return Y0(this)}parseOperand(){return J0(this)}assertRangeUnset(){if(this.branches.leftBound)return this.error(gT(this.branches.leftBound.limit,this.branches.leftBound.comparator))}reduceGroupOpen(){this.groups.push(this.branches),this.branches={prefixes:[],leftBound:null,union:null,intersection:null,pipe:null}}previousOperator(){var n;return((n=this.branches.leftBound)==null?void 0:n.comparator)??this.branches.prefixes.at(-1)??(this.branches.intersection?"&":this.branches.union?"|":this.branches.pipe?"|>":void 0)}shiftedByOne(){return this.scanner.shift(),this}}const zT="An empty string is not a valid generic parameter name",ad=(t,n,i)=>{t.shiftUntilNonWhitespace();const a=t.shiftUntilNextTerminator();return a===""?t.lookahead===""&&n.length?n:J(zT):(t.shiftUntilNonWhitespace(),UT(t,a,n,i))},sv="extends ",UT=(t,n,i,a)=>{if(t.shiftUntilNonWhitespace(),t.unscanned.startsWith(sv))t.jumpForward(sv.length);else return t.lookahead===","&&t.shift(),i.push(n),ad(t,i,a);const l=qd(new Yo(t,a));return i.push([n,l.root]),ad(t,i,a)};class BT extends sa{constructor(i){super((...a)=>new lo(i)(...a),{bind:i});w(this,"$");this.$=i}in(i){return new lo(this.$,i===void 0?void 0:this.$.parse(i))}at(i,a){return new lo(this.$).at(i,a)}case(i,a){return new lo(this.$).case(i,a)}}class lo extends sa{constructor(i,a){super(l=>this.caseEntries(Object.entries(l).map(([u,f])=>u==="default"?[u,f]:[this.$.parse(u),f])));w(this,"$");w(this,"in");w(this,"key");w(this,"branches",[]);this.$=i,this.in=a}at(i,a){return this.key&&J(qT),this.branches.length&&J(_T),this.key=i,a?this.match(a):this}case(i,a){return this.caseEntry(this.$.parse(i),a)}caseEntry(i,a){const u=(this.key?this.$.parse({[this.key]:i}):i).pipe(a);return this.branches.push(u),this}match(i){return this(i)}strings(i){return this.caseEntries(Object.entries(i).map(([a,l])=>a==="default"?[a,l]:[this.$.node("unit",{unit:a}),l]))}caseEntries(i){for(let a=0;a<i.length;a++){const[l,u]=i[a];if(l==="default")return a!==i.length-1&&J("default may only be specified as the last key of a switch definition"),this.default(u);if(typeof u!="function")return J(`Value for case "${l}" must be a function (was ${hn(u)})`);this.caseEntry(l,u)}return this}default(i){typeof i=="function"&&this.case(de.unknown,i);const a={branches:this.branches,ordered:!0};(i==="never"||i==="assert")&&(a.meta={onFail:lv});const l=this.$.node("union",a);if(!this.in)return this.$.finalize(l);let u=this.in.pipe(l);return(i==="never"||i==="assert")&&(u=u.configureReferences({onFail:lv},"self")),this.$.finalize(u)}}const lv=t=>t.throw(),_T="A key matcher must be specified before the first case i.e. match.at('foo') or match.in<object>().at('bar')",qT="At most one key matcher may be specified per expression",I0=(t,n)=>{if(kt(t)){if(t[1]==="=")return[n.$.parseOwnDefinitionFormat(t[0],n),"=",t[2]];if(t[1]==="?")return[n.$.parseOwnDefinitionFormat(t[0],n),"?"]}return ex(t,n)},KT="Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }",VT="Only required keys may specify default values, e.g. { value: 'number = 0' }",HT=(t,n)=>{var f;let i;const a={},l=No(t);for(const[d,m]of l){const p=YT(d);if(p.kind==="spread"){if(!Ts(a))return J(JT);const N=n.$.parseOwnDefinitionFormat(m,n);if(N.equals(de.object))continue;if(!N.hasKind("intersection")||!((f=N.basis)!=null&&f.equals(de.object)))return J(IT(N.expression));i=N.structure;continue}if(p.kind==="undeclared"){m!=="reject"&&m!=="delete"&&m!=="ignore"&&J(GT(m)),a.undeclared=m;continue}const g=I0(m,n),v=p;if(p.kind==="required"){kt(g)?Tf(a,"optional",g[1]==="="?{key:p.normalized,value:g[0],default:g[2]}:{key:p.normalized,value:g[0]},n):Tf(a,"required",{key:p.normalized,value:g},n);continue}if(kt(g)&&(g[1]==="?"&&J(KT),g[1]==="="&&J(VT)),p.kind==="optional"){Tf(a,"optional",{key:p.normalized,value:g},n);continue}const b=n.$.parseOwnDefinitionFormat(v.normalized,n),k=td(b,g,n.$);k.index&&(a.index=Be(a.index,k.index)),k.required&&(a.required=Be(a.required,k.required))}const u=n.$.node("structure",a);return n.$.parseSchema({domain:"object",structure:(i==null?void 0:i.merge(u))??u})},Tf=(t,n,i,a)=>{t[n]=Be(t[n],a.$.node(n,i))},GT=t=>`Value of '+' key must be 'reject', 'delete', or 'ignore' (was ${ze(t)})`,JT="Spread operator may only be used as the first key in an object",YT=t=>typeof t=="symbol"?{kind:"required",normalized:t}:t.at(-1)==="?"?t.at(-2)===Jf?{kind:"required",normalized:`${t.slice(0,-2)}?`}:{kind:"optional",normalized:t.slice(0,-1)}:t[0]==="["&&t.at(-1)==="]"?{kind:"index",normalized:t.slice(1,-1)}:t[0]===Jf&&t[1]==="["&&t.at(-1)==="]"?{kind:"required",normalized:t.slice(1)}:t==="..."?{kind:"spread"}:t==="+"?{kind:"undeclared"}:{kind:"required",normalized:t==="\\..."?"...":t==="\\+"?"+":t},IT=t=>`Spread operand must resolve to an object literal type (was ${t})`,ZT=(t,n)=>rO(t)?X0[t[0]](t,n):nO(t)?F0[t[1]](t,n):null,QT=(t,n)=>n.$.parseOwnDefinitionFormat(t[1],n).keyof(),Of=(t,n)=>{if(t[2]===void 0)return J(G0(t[1],""));const i=n.$.parseOwnDefinitionFormat(t[0],n),a=n.$.parseOwnDefinitionFormat(t[2],n);if(t[1]==="|")return n.$.node("union",{branches:[i,a]});const l=t[1]==="&"?Zn(i,a,n.$):Pf(i,a,n.$);return l instanceof W?l.throw():l},FT=(t,n)=>n.$.parseOwnDefinitionFormat(t[0],n).array(),XT=(t,n)=>typeof t[2]!="function"?J(Z0("=>",t[2])):n.$.parseOwnDefinitionFormat(t[0],n).pipe(t[2]),Z0=(t,n)=>`${t===":"?"Narrow":"Morph"} expression requires a function following '${t}' (was ${typeof n})`,PT=(t,n)=>typeof t[2]!="function"?J(Z0(":",t[2])):n.$.parseOwnDefinitionFormat(t[0],n).constrain("predicate",t[2]),WT=(t,n)=>n.$.parseOwnDefinitionFormat(t[0],n).configureReferences(t[2],"shallow"),Q0=t=>t,eO=Q0({"[]":FT,"?":()=>J(U0)}),tO=Q0({"|":Of,"&":Of,":":PT,"=>":XT,"|>":Of,"@":WT,"=":()=>J(B0)}),F0={...eO,...tO},nO=t=>F0[t[1]]!==void 0,iO=t=>t,X0=iO({keyof:QT,instanceof:(t,n)=>{if(typeof t[1]!="function")return J(ov(Gf(t[1])));const i=t.slice(1).map(a=>typeof a=="function"?n.$.node("proto",{proto:a}):J(ov(Gf(a))));return i.length===1?i[0]:n.$.node("union",{branches:i})},"===":(t,n)=>n.$.units(t.slice(1))}),rO=t=>X0[t[0]]!==void 0,ov=t=>`Expected a constructor following 'instanceof' operator (was ${t})`,aO=(t,n)=>{let i=[{}],a=0;for(;a<t.length;){let l=!1;t[a]==="..."&&a<t.length-1&&(l=!0,a++);const u=I0(t[a],n),[f,d,m]=kt(u)?u:[u];if(a++,l){if(!f.extends(Z.intrinsic.Array))return J(oO(f.expression));i=i.flatMap(p=>f.distribute(g=>lO(zb(p),g)))}else i=i.map(p=>d==="?"?P0(p,f):d==="="?sO(p,f,m):sd(p,f))}return n.$.parseSchema(i.map(l=>Ts(l)?{proto:Array,exactLength:0}:{proto:Array,sequence:l}))},sd=(t,n)=>t.defaultables||t.optionals?J(t.variadic?v0:uO):(t.variadic?t.postfix=Be(t.postfix,n):t.prefix=Be(t.prefix,n),t),P0=(t,n)=>t.variadic?J(W0):(t.optionals=Be(t.optionals,n),t),sO=(t,n,i)=>t.variadic?J(W0):t.optionals?J(cO):(t.defaultables=Be(t.defaultables,[[n,i]]),t),uv=(t,n)=>(t.postfix&&J(cv),t.variadic?t.variadic.equals(n)||J(cv):t.variadic=n.internal,t),lO=(t,n)=>{const i=n.select({method:"find",kind:"sequence"});if(!i)return uv(t,Z.intrinsic.unknown);if(i.prefix)for(const a of i.prefix)sd(t,a);if(i.optionals)for(const a of i.optionals)P0(t,a);if(i.variadic&&uv(t,i.variadic),i.postfix)for(const a of i.postfix)sd(t,a);return t},oO=t=>`Spread element must be an array (was ${t})`,cv="A tuple may have at most one variadic element",uO="A required element may not follow an optional element",W0="An optional element may not follow a variadic element",cO="A defaultable element may not follow an optional element without a default",jf={},ex=(t,n)=>{var i;if(typeof t=="string"){if(n.args&&Object.keys(n.args).some(l=>t.includes(l)))return av(t,n);const a=jf[i=n.$.name]??(jf[i]={});return a[t]??(a[t]=av(t,n))}return er(t,"object")?fO(t,n):J(ld(hn(t)))},fO=(t,n)=>{const i=kd(t);switch(i){case void 0:return le(t,"root")?t:HT(t,n);case"Array":return dO(t,n);case"RegExp":return n.$.node("intersection",{domain:"string",pattern:t},{prereduced:!0});case"Function":{const a=_o(t)?t():t;return le(a,"root")?a:J(ld("Function"))}default:return J(ld(i??ze(t)))}},dO=(t,n)=>ZT(t,n)??aO(t,n),ld=t=>`Type definitions must be strings or objects (was ${t})`;class hO extends sa{constructor(n){const i=Object.assign({errors:ki,hkt:kn,$:n,raw:n.parse,module:n.constructor.module,scope:n.constructor.scope,define:n.define,match:n.match,generic:n.generic,schema:n.schema,keywords:n.ambient,unit:n.unit,enumerated:n.enumerated,instanceOf:n.instanceOf,valueOf:n.valueOf,or:n.or,and:n.and,merge:n.merge,pipe:n.pipe},n.ambientAttachments);super((...a)=>{if(a.length===1)return n.parse(a[0]);if(a.length===2&&typeof a[0]=="string"&&a[0][0]==="<"&&a[0].at(-1)===">"){const l=a[0].slice(1,-1),u=n.parseGenericParams(l,{});return new Co(u,a[1],n,n,null)}return n.parse(a)},{bind:n,attach:i})}}const ks=Z,Zr=class Zr extends R0{constructor(){super(...arguments);w(this,"unit",i=>this.units([i]));w(this,"valueOf",i=>this.units(l$(i)));w(this,"enumerated",(...i)=>this.units(i));w(this,"instanceOf",i=>this.node("proto",{proto:i},{prereduced:!0}));w(this,"or",(...i)=>this.schema(i.map(a=>this.parse(a))));w(this,"and",(...i)=>i.reduce((a,l)=>a.and(this.parse(l)),this.intrinsic.unknown));w(this,"merge",(...i)=>i.reduce((a,l)=>a.merge(this.parse(l)),this.intrinsic.object));w(this,"pipe",(...i)=>this.intrinsic.unknown.pipe(...i));w(this,"match",new BT(this));w(this,"declare",()=>({type:this.type}));w(this,"type",new hO(this))}get ambientAttachments(){if(ks.typeAttachments)return this.cacheGetter("ambientAttachments",_e(ks.typeAttachments,(i,a)=>[i,this.bindReference(a)]))}preparseOwnAliasEntry(i,a){var d;const l=i.indexOf("<");if(l===-1){if(le(a,"module")||le(a,"generic"))return[i,a];const m=this.name==="ark"?i:i==="root"?this.name:`${this.name}.${i}`,p=(d=this.resolvedConfig.keywords)==null?void 0:d[m];return p&&(a=[a,"@",p]),[i,a]}i.at(-1)!==">"&&J("'>' must be the last character of a generic declaration in a scope");const u=i.slice(0,l),f=i.slice(l+1,-1);return[u,()=>{const m=this.parseGenericParams(f,{alias:u});return f2(m,a,this)}]}parseGenericParams(i,a){return ad(new Ns(i),[],this.createParseContext({...a,def:i,prefix:"generic"}))}normalizeRootScopeValue(i){return _o(i)&&!le(i,"generic")?i():i}preparseOwnDefinitionFormat(i,a){return{...a,def:i,prefix:a.alias??"type"}}parseOwnDefinitionFormat(i,a){!(a.alias&&a.alias in this.aliases)&&!a.args&&(a.args={this:a.id});const u=ex(i,a);if(kt(u)){if(u[1]==="=")return J(B0);if(u[1]==="?")return J(U0)}return u}define(i){return i}};w(Zr,"scope",(i,a={})=>new Zr(i,a)),w(Zr,"module",(i,a={})=>Zr.scope(i,a).export());let jo=Zr;const pO=Object.assign(jo.scope,{define:t=>t}),Ae=jo;class mO extends kn{constructor(){super(...arguments);w(this,"description",'merge an object\'s properties onto another like `Merge(User, { isAdmin: "true" })`')}}const gO=Qn(["base",de.object],["props",de.object])(t=>t.base.merge(t.props),mO),yO=Ae.module({Key:de.key,Merge:gO});class vO extends kn{}const bO=Qn("element")(t=>{const n=t.element.exclude(de.Array),i=n.array();return n.rawOr(i).pipe(Cs).distribute(a=>a.assertHasKind("morph").declareOut(i),Ke)},vO),xO=Ae.module({root:de.Array,readonly:"root",index:de.nonNegativeIntegerString,liftFrom:bO},{name:"Array"}),od=Ke(["string",Os.FileConstructor]),SO=od.rawOr(od.array()),fv=Ke({meta:"an object representing parsed form data",domain:"object",index:{signature:"string",value:SO}}),wO=Ae.module({root:["instanceof",FormData],value:od,parsed:fv,parse:Ke({in:FormData,morphs:t=>{const n={};for(const[i,a]of t)if(i in n){const l=n[i];typeof l=="string"||l instanceof Os.FileConstructor?n[i]=[l,a]:l.push(a)}else n[i]=a;return n},declaredOut:fv})},{name:"FormData"}),NO=Ae.module({Int8:["instanceof",Int8Array],Uint8:["instanceof",Uint8Array],Uint8Clamped:["instanceof",Uint8ClampedArray],Int16:["instanceof",Int16Array],Uint16:["instanceof",Uint16Array],Int32:["instanceof",Int32Array],Uint32:["instanceof",Uint32Array],Float32:["instanceof",Float32Array],Float64:["instanceof",Float64Array],BigInt64:["instanceof",BigInt64Array],BigUint64:["instanceof",BigUint64Array]},{name:"TypedArray"}),kO={Boolean:1,Number:1,String:1},RO=Ae.module({..._e({...Sb,...Nb},(t,n)=>t in kO?[]:[t,["instanceof",n]]),Array:xO,TypedArray:NO,FormData:wO}),EO=Ke({domain:{domain:"number",meta:"a number representing a Unix timestamp"},divisor:{rule:1,meta:"an integer representing a Unix timestamp"},min:{rule:-864e13,meta:"a Unix timestamp after -8640000000000000"},max:{rule:864e13,meta:"a Unix timestamp before 8640000000000000"},meta:"an integer representing a safe Unix timestamp"}),AO=Ke({domain:"number",divisor:1}),tx=Ae.module({root:de.number,integer:AO,epoch:EO,safe:Ke({domain:{domain:"number",numberAllowsNaN:!1},min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),NaN:["===",Number.NaN],Infinity:["===",Number.POSITIVE_INFINITY],NegativeInfinity:["===",Number.NEGATIVE_INFINITY]},{name:"number"}),He=(t,n,i)=>{const a={domain:"string",pattern:{rule:t.source,flags:t.flags,meta:n}};return i&&(a.meta={format:i}),Bd("intersection",a)},dv=He(ko,"a well-formed integer string"),nx=Ae.module({root:dv,parse:Ke({in:dv,morphs:(t,n)=>{const i=Number.parseInt(t);return Number.isSafeInteger(i)?i:n.error("an integer in the range Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER")},declaredOut:de.integer})},{name:"string.integer"}),$O=He(/^[\dA-Fa-f]+$/,"hex characters only"),CO=Ae.module({root:He(/^(?:[\d+/A-Za-z]{4})*(?:[\d+/A-Za-z]{2}==|[\d+/A-Za-z]{3}=)?$/,"base64-encoded"),url:He(/^(?:[\w-]{4})*(?:[\w-]{2}(?:==|%3D%3D)?|[\w-]{3}(?:=|%3D)?)?$/,"base64url-encoded")},{name:"string.base64"}),hv=He(/^[A-Z].*$/,"capitalized"),TO=Ae.module({root:Ke({in:"string",morphs:t=>t.charAt(0).toUpperCase()+t.slice(1),declaredOut:hv}),preformatted:hv},{name:"string.capitalize"}),OO=t=>{const n=t.replaceAll(/[ -]+/g,"");let i=0,a,l,u=!1;for(let f=n.length-1;f>=0;f--)a=n.substring(f,f+1),l=Number.parseInt(a,10),u?(l*=2,i+=l>=10?l%10+1:l):i+=l,u=!u;return!!(i%10===0&&n)},jO=/^(?:4\d{12}(?:\d{3,6})?|5[1-5]\d{14}|(222[1-9]|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}|6(?:011|5\d\d)\d{12,15}|3[47]\d{13}|3(?:0[0-5]|[68]\d)\d{11}|(?:2131|1800|35\d{3})\d{11}|6[27]\d{14}|^(81\d{14,17}))$/,DO=Ke({domain:"string",pattern:{meta:"a credit card number",rule:jO.source},predicate:{meta:"a credit card number",predicate:OO}}),MO=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))(T((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([,.]\d+(?!:))?)?(\17[0-5]\d([,.]\d+)?)?([Zz]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,LO=t=>!Number.isNaN(new Date(t).valueOf()),pv=Ke({domain:"string",predicate:{meta:"a parsable date",predicate:LO}}).assertHasKind("intersection"),mv=nx.root.internal.narrow((t,n)=>{const i=Number.parseInt(t),a=tx.epoch(i);return a instanceof ki?(n.errors.merge(a),!1):!0}).configure({description:"an integer string representing a safe Unix timestamp"},"self").assertHasKind("intersection"),zO=Ae.module({root:mv,parse:Ke({in:mv,morphs:t=>new Date(t),declaredOut:de.Date})},{name:"string.date.epoch"}),gv=He(MO,"an ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) date").internal.assertHasKind("intersection"),UO=Ae.module({root:gv,parse:Ke({in:gv,morphs:t=>new Date(t),declaredOut:de.Date})},{name:"string.date.iso"}),BO=Ae.module({root:pv,parse:Ke({declaredIn:pv,in:"string",morphs:(t,n)=>{const i=new Date(t);return Number.isNaN(i.valueOf())?n.error("a parsable date"):i},declaredOut:de.Date}),iso:UO,epoch:zO},{name:"string.date"}),_O=He(/^[\w%+.-]+@[\d.A-Za-z-]+\.[A-Za-z]{2,}$/,"an email address","email"),yv="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Si=`(${yv}[.]){3}${yv}`,qO=new RegExp(`^${Si}$`),tt="(?:[0-9a-fA-F]{1,4})",KO=new RegExp(`^((?:${tt}:){7}(?:${tt}|:)|(?:${tt}:){6}(?:${Si}|:${tt}|:)|(?:${tt}:){5}(?::${Si}|(:${tt}){1,2}|:)|(?:${tt}:){4}(?:(:${tt}){0,1}:${Si}|(:${tt}){1,3}|:)|(?:${tt}:){3}(?:(:${tt}){0,2}:${Si}|(:${tt}){1,4}|:)|(?:${tt}:){2}(?:(:${tt}){0,3}:${Si}|(:${tt}){1,5}|:)|(?:${tt}:){1}(?:(:${tt}){0,4}:${Si}|(:${tt}){1,6}|:)|(?::((?::${tt}){0,5}:${Si}|(?::${tt}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?$`),VO=Ae.module({root:["v4 | v6","@","an IP address"],v4:He(qO,"an IPv4 address","ipv4"),v6:He(KO,"an IPv6 address","ipv6")},{name:"string.ip"}),Fr="a JSON string",ix=t=>{if(!(t instanceof SyntaxError))throw t;return`must be ${Fr} (${t})`},HO=Ke({meta:Fr,domain:"string",predicate:{meta:Fr,predicate:(t,n)=>{try{return JSON.parse(t),!0}catch(i){return n.reject({code:"predicate",expected:Fr,problem:ix(i)})}}}}),GO=(t,n)=>{if(t.length===0)return n.error({code:"predicate",expected:Fr,actual:"empty"});try{return JSON.parse(t)}catch(i){return n.error({code:"predicate",expected:Fr,problem:ix(i)})}},JO=Ae.module({root:HO,parse:Ke({meta:"safe JSON string parser",in:"string",morphs:GO,declaredOut:de.jsonObject})},{name:"string.json"}),vv=He(/^[a-z]*$/,"only lowercase letters"),YO=Ae.module({root:Ke({in:"string",morphs:t=>t.toLowerCase(),declaredOut:vv}),preformatted:vv},{name:"string.lower"}),rx=["NFC","NFD","NFKC","NFKD"],Bs=_e(rx,(t,n)=>[n,Ke({domain:"string",predicate:i=>i.normalize(n)===i,meta:`${n}-normalized unicode`})]),Io=_e(rx,(t,n)=>[n,Ke({in:"string",morphs:i=>i.normalize(n),declaredOut:Bs[n]})]),IO=Ae.module({root:Io.NFC,preformatted:Bs.NFC},{name:"string.normalize.NFC"}),ZO=Ae.module({root:Io.NFD,preformatted:Bs.NFD},{name:"string.normalize.NFD"}),QO=Ae.module({root:Io.NFKC,preformatted:Bs.NFKC},{name:"string.normalize.NFKC"}),FO=Ae.module({root:Io.NFKD,preformatted:Bs.NFKD},{name:"string.normalize.NFKD"}),XO=Ae.module({root:"NFC",NFC:IO,NFD:ZO,NFKC:QO,NFKD:FO},{name:"string.normalize"}),bv=He(Yf,"a well-formed numeric string"),PO=Ae.module({root:bv,parse:Ke({in:bv,morphs:t=>Number.parseFloat(t),declaredOut:de.number})},{name:"string.numeric"}),xv="a regex pattern",WO=Ke({domain:"string",predicate:{meta:xv,predicate:(t,n)=>{try{return new RegExp(t),!0}catch(i){return n.reject({code:"predicate",expected:xv,problem:String(i)})}}},meta:{format:"regex"}}),ej=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?$/,tj=He(ej,"a semantic version (see https://semver.org/)"),Sv=He(/^\S.*\S$|^\S?$/,"trimmed"),nj=Ae.module({root:Ke({in:"string",morphs:t=>t.trim(),declaredOut:Sv}),preformatted:Sv},{name:"string.trim"}),wv=He(/^[A-Z]*$/,"only uppercase letters"),ij=Ae.module({root:Ke({in:"string",morphs:t=>t.toUpperCase(),declaredOut:wv}),preformatted:wv},{name:"string.upper"}),rj=t=>{if(URL.canParse)return URL.canParse(t);try{return new URL(t),!0}catch{return!1}},Nv=Ke({domain:"string",predicate:{meta:"a URL string",predicate:rj},meta:{format:"uri"}}),aj=Ae.module({root:Nv,parse:Ke({declaredIn:Nv,in:"string",morphs:(t,n)=>{try{return new URL(t)}catch{return n.error("a URL string")}},declaredOut:Ke(URL)})},{name:"string.url"}),sj=Ae.module({root:["versioned | nil | max","@",{description:"a UUID",format:"uuid"}],"#nil":"'00000000-0000-0000-0000-000000000000'","#max":"'ffffffff-ffff-ffff-ffff-ffffffffffff'","#versioned":/[\da-f]{8}-[\da-f]{4}-[1-8][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}/i,v1:He(/^[\da-f]{8}-[\da-f]{4}-1[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv1"),v2:He(/^[\da-f]{8}-[\da-f]{4}-2[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv2"),v3:He(/^[\da-f]{8}-[\da-f]{4}-3[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv3"),v4:He(/^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv4"),v5:He(/^[\da-f]{8}-[\da-f]{4}-5[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv5"),v6:He(/^[\da-f]{8}-[\da-f]{4}-6[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv6"),v7:He(/^[\da-f]{8}-[\da-f]{4}-7[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv7"),v8:He(/^[\da-f]{8}-[\da-f]{4}-8[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv8")},{name:"string.uuid"}),lj=Ae.module({root:de.string,alpha:He(/^[A-Za-z]*$/,"only letters"),alphanumeric:He(/^[\dA-Za-z]*$/,"only letters and digits 0-9"),hex:$O,base64:CO,capitalize:TO,creditCard:DO,date:BO,digits:He(/^\d*$/,"only digits 0-9"),email:_O,integer:nx,ip:VO,json:JO,lower:YO,normalize:XO,numeric:PO,regex:WO,semver:tj,trim:nj,upper:ij,url:aj,uuid:sj},{name:"string"}),oj=Ae.module({bigint:de.bigint,boolean:de.boolean,false:de.false,never:de.never,null:de.null,number:de.number,object:de.object,string:de.string,symbol:de.symbol,true:de.true,unknown:de.unknown,undefined:de.undefined}),uj=Ae.module({root:de.unknown,any:de.unknown},{name:"unknown"}),cj=Ae.module({root:de.jsonObject,stringify:Bd("morph",{in:de.jsonObject,morphs:t=>JSON.stringify(t),declaredOut:de.string})},{name:"object.json"}),fj=Ae.module({root:de.object,json:cj},{name:"object"});class dj extends kn{constructor(){super(...arguments);w(this,"description",'instantiate an object from an index signature and corresponding value type like `Record("string", "number")`')}}const hj=Qn(["K",de.key],"V")(t=>({domain:"object",index:{signature:t.K,value:t.V}}),dj);class pj extends kn{constructor(){super(...arguments);w(this,"description",'pick a set of properties from an object like `Pick(User, "name | age")`')}}const mj=Qn(["T",de.object],["K",de.key])(t=>t.T.pick(t.K),pj);class gj extends kn{constructor(){super(...arguments);w(this,"description",'omit a set of properties from an object like `Omit(User, "age")`')}}const yj=Qn(["T",de.object],["K",de.key])(t=>t.T.omit(t.K),gj);class vj extends kn{constructor(){super(...arguments);w(this,"description","make all named properties of an object optional like `Partial(User)`")}}const bj=Qn(["T",de.object])(t=>t.T.partial(),vj);class xj extends kn{constructor(){super(...arguments);w(this,"description","make all named properties of an object required like `Required(User)`")}}const Sj=Qn(["T",de.object])(t=>t.T.required(),xj);class wj extends kn{constructor(){super(...arguments);w(this,"description",'exclude branches of a union like `Exclude("boolean", "true")`')}}const Nj=Qn("T","U")(t=>t.T.exclude(t.U),wj);class kj extends kn{constructor(){super(...arguments);w(this,"description",'extract branches of a union like `Extract("0 | false | 1", "number")`')}}const Rj=Qn("T","U")(t=>t.T.extract(t.U),kj),Ej=Ae.module({Exclude:Nj,Extract:Rj,Omit:yj,Partial:bj,Pick:mj,Record:hj,Required:Sj}),tr=pO({...oj,...Ej,...RO,...yO,string:lj,number:tx,object:fj,unknown:uj},{prereducedAliases:!0,name:"ark"}),pt=tr.export();Object.assign(ks.ambient,pt);ks.typeAttachments={string:pt.string.root,number:pt.number.root,bigint:pt.bigint,boolean:pt.boolean,symbol:pt.symbol,undefined:pt.undefined,null:pt.null,object:pt.object.root,unknown:pt.unknown.root,false:pt.false,true:pt.true,never:pt.never,arrayIndex:pt.Array.index,Key:pt.Key,Record:pt.Record,Array:pt.Array.root,Date:pt.Date};const ax=Object.assign(tr.type,ks.typeAttachments);tr.match;tr.generic;tr.schema;tr.define;tr.declare;const Aj=ax("string|undefined"),kv=Aj.assert(void 0),$j=`${kv?`//${document.location.hostname}:${kv}`:`//${document.location.host}`}/api/plugin/site-generator`;let sx;const[Df]=document.getElementsByClassName("js-script-site-generator");Df&&Df instanceof HTMLScriptElement&&(sx=ax("string").assert(Df.dataset.googleRecaptchaSiteKey));const Mf=sx;async function Ri(t){try{const n=await fetch($j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${IA(n)}`}}}const Nt=A.forwardRef((t,n)=>{const{label:i,severity:a="primary",loading:l,children:u,onClick:f,className:d="",disabled:m,...p}=t,[g,v]=A.useState(!1),b=g||l,k=["Button",a==="secondary"?"secondary":"",b?"loading":"",d].filter(Boolean).join(" "),N=async T=>{if(f)try{T.preventDefault(),v(!0),await f(T)}finally{v(!1)}};return S.jsxs("button",{ref:n,type:"button",className:k,onClick:N,disabled:m||b,...p,children:[!b&&u,!b&&i]})});Nt.displayName="Button";function lx({initialValue:t="",placeholder:n,submitLabel:i,onSubmit:a,isLoading:l=!1,error:u}){const{t:f}=Ct(),[d,m]=A.useState(t),p=v=>{m(v.target.value)},g=async()=>{d.trim()&&await a(d.trim())};return S.jsxs("div",{className:"PromptForm",children:[u&&S.jsx("div",{className:"Alert error mb-3",children:S.jsx("p",{children:u})}),S.jsx("textarea",{className:"PromptForm-textarea",placeholder:n||f("createPromptPlaceholder"),value:d,onChange:p,rows:6,disabled:l}),S.jsx(Nt,{onClick:g,loading:l,disabled:!d.trim()||l,className:"PromptForm-button mt-3",children:i})]})}const Rv=t=>{let n;const i=new Set,a=(p,g)=>{const v=typeof p=="function"?p(n):p;if(!Object.is(v,n)){const b=n;n=g??(typeof v!="object"||v===null)?v:Object.assign({},n,v),i.forEach(k=>k(n,b))}},l=()=>n,d={setState:a,getState:l,getInitialState:()=>m,subscribe:p=>(i.add(p),()=>i.delete(p))},m=n=t(a,l,d);return d},Cj=t=>t?Rv(t):Rv,Tj=t=>t;function Oj(t,n=Tj){const i=Bf.useSyncExternalStore(t.subscribe,()=>n(t.getState()),()=>n(t.getInitialState()));return Bf.useDebugValue(i),i}const Ev=t=>{const n=Cj(t),i=a=>Oj(n,a);return Object.assign(i,n),i},jj=t=>t?Ev(t):Ev,Kd="site-generator-session-token";function Av(t){try{sessionStorage.setItem(Kd,t)}catch(n){console.error("Failed to save session token",n)}}function Rs(){try{return sessionStorage.getItem(Kd)??void 0}catch(t){console.error("Failed to get session token",t)}}function Dj(){try{sessionStorage.removeItem(Kd)}catch(t){console.error("Failed to remove session token",t)}}const Mj=2e3,na=new Map;function Lj(t){if(na.has(t))return;const n=window.setInterval(()=>{zj(t)},Mj);na.set(t,n)}function oo(t){const n=na.get(t);n&&(window.clearInterval(n),na.delete(t))}function Vd(){na.forEach(t=>{window.clearInterval(t)}),na.clear()}async function zj(t){const n=Rs();if(!n){oo(t);return}try{const i=await Ri({command:"loadStep",sessionToken:n,stepNumber:t});if(i.success&&i.result){const a=i.result;Uj(a),a.status!=="pending"&&oo(t)}else console.error("Error polling step:",i),oo(t)}catch(i){console.error("Error polling step:",i),oo(t)}}function Uj(t){const{updateStep:n}=nr.getState();n(t)}function Lf(t){Vd(),t.steps.forEach(n=>{n.status==="pending"&&Lj(n.stepNumber)})}const nr=jj((t,n)=>({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0,setWorkSession:i=>{t({workSession:i}),i&&Lf(i)},updateStep:i=>{const{workSession:a}=n();if(!a)return;const l=a.steps.map(f=>f.stepNumber===i.stepNumber?i:f),u={...a,steps:l};t({workSession:u}),i.status==="pending"&&Lf(u)},appendNewStep:i=>{const{workSession:a}=n();if(!a)return;const l={...a,steps:[...a.steps,i]};t({workSession:l}),i.status==="pending"&&Lf(l)},setIsLoading:i=>t({isLoading:i}),setError:i=>t({error:i}),setActiveStepNumber:i=>t({activeStepNumber:i}),resetSession:()=>{Vd(),t({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0})}}));function Zo({size:t="medium"}){return S.jsx("div",{className:`Spinner Spinner-${t}`})}function yo({activeStep:t}){const{t:n}=Ct(),i=aa(),{workSession:a}=nr(),l=async()=>{await i("/")},u=async f=>{await i(`/step/${f}`)};return!a||!a.steps||a.steps.length===0?S.jsx("div",{className:"Sidebar",children:S.jsx(Nt,{className:`Sidebar-button ${t===void 0?"active":""}`,onClick:l,children:n("startAgain")})}):S.jsxs("div",{className:"Sidebar",children:[S.jsx(Nt,{className:`Sidebar-button ${t===void 0?"active":""}`,onClick:l,children:n("startAgain")}),S.jsx("div",{className:"Sidebar-steps",children:a.steps.map(f=>S.jsxs("div",{className:"Sidebar-step",children:[S.jsx(Nt,{className:`Sidebar-button ${t===f.stepNumber?"active":""} ${f.status==="pending"?"has-spinner":""}`,onClick:()=>u(f.stepNumber),children:n("stepTitle",{stepNumber:f.stepNumber,kind:n(f.kind)})}),f.status==="pending"&&S.jsx("div",{className:"Sidebar-spinner",children:S.jsx(Zo,{size:"small"})})]},f.stepNumber))})]})}function It({header:t,footer:n,children:i,className:a=""}){const l=["Card",a].filter(Boolean).join(" ");return S.jsxs("div",{className:l,children:[t&&S.jsx("div",{className:"Card-header",children:t}),S.jsx("div",{className:"Card-body",children:i}),n&&S.jsx("div",{className:"Card-footer",children:n})]})}function Bj(){const{t}=Ct(),n=aa(),[i,a]=A.useState(!1),[l,u]=A.useState(void 0),{workSession:f,appendNewStep:d}=nr(),m=async p=>{if(!f)return;a(!0),u(void 0);const g=Rs();if(!g){u(t("sessionExpired")),a(!1);return}try{const v=await Ri({command:"createSiteSchema",sessionToken:g,prompt:p});if(v.success&&v.result){const b=v.result;d(b),await n(`/step/${b.stepNumber}`)}else u(t("promptSubmissionFailed"))}catch(v){console.error("Error submitting prompt:",v),u(t("errorOccurred"))}finally{a(!1)}};return S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsxs(It,{className:"p-4",children:[S.jsx("h1",{className:"mb-4",children:t("welcomeTitle")}),S.jsx("div",{className:"Text mb-4",dangerouslySetInnerHTML:{__html:t("startInstruction")}}),f&&f.steps.length>0&&S.jsx("p",{className:"InfoText",children:t("newTabRestartMessage")}),S.jsx(lx,{submitLabel:t("createSchema"),onSubmit:m,isLoading:i,error:l})]})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:void 0})})]})}function _j(t){return"siteId"in t}function Hd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ir=Hd();function ox(t){ir=t}var vs={exec:()=>null};function $e(t,n=""){let i=typeof t=="string"?t:t.source;const a={replace:(l,u)=>{let f=typeof u=="string"?u:u.source;return f=f.replace(At.caret,"$1"),i=i.replace(l,f),a},getRegex:()=>new RegExp(i,n)};return a}var At={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},qj=/^(?:[ \t]*(?:\n|$))+/,Kj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_s=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gd=/(?:[*+-]|\d{1,9}[.)])/,ux=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cx=$e(ux).replace(/bull/g,Gd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Gj=$e(ux).replace(/bull/g,Gd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jj=/^[^\n]+/,Yd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Yj=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ij=$e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gd).getRegex(),Qo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Id=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zj=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Id).replace("tag",Qo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fx=$e(Jd).replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),Qj=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fx).getRegex(),Zd={blockquote:Qj,code:Kj,def:Yj,fences:Vj,heading:Hj,hr:_s,html:Zj,lheading:cx,list:Ij,newline:qj,paragraph:fx,table:vs,text:Jj},$v=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),Fj={...Zd,lheading:Gj,table:$v,paragraph:$e(Jd).replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex()},Xj={...Zd,html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Id).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(Jd).replace("hr",_s).replace("heading",` *#{1,6} *[^
106
- ]`).replace("lheading",cx).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Wj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dx=/^( {2,}|\\)\n(?!\s*$)/,e3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fo=/[\p{P}\p{S}]/u,Qd=/[\s\p{P}\p{S}]/u,hx=/[^\s\p{P}\p{S}]/u,t3=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qd).getRegex(),px=/(?!~)[\p{P}\p{S}]/u,n3=/(?!~)[\s\p{P}\p{S}]/u,i3=/(?:[^\s\p{P}\p{S}]|~)/u,r3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,mx=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,a3=$e(mx,"u").replace(/punct/g,Fo).getRegex(),s3=$e(mx,"u").replace(/punct/g,px).getRegex(),gx="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",l3=$e(gx,"gu").replace(/notPunctSpace/g,hx).replace(/punctSpace/g,Qd).replace(/punct/g,Fo).getRegex(),o3=$e(gx,"gu").replace(/notPunctSpace/g,i3).replace(/punctSpace/g,n3).replace(/punct/g,px).getRegex(),u3=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hx).replace(/punctSpace/g,Qd).replace(/punct/g,Fo).getRegex(),c3=$e(/\\(punct)/,"gu").replace(/punct/g,Fo).getRegex(),f3=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),d3=$e(Id).replace("(?:-->|$)","-->").getRegex(),h3=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",d3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Do=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,p3=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Do).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yx=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Do).replace("ref",Yd).getRegex(),vx=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yd).getRegex(),m3=$e("reflink|nolink(?!\\()","g").replace("reflink",yx).replace("nolink",vx).getRegex(),Fd={_backpedal:vs,anyPunctuation:c3,autolink:f3,blockSkip:r3,br:dx,code:Wj,del:vs,emStrongLDelim:a3,emStrongRDelimAst:l3,emStrongRDelimUnd:u3,escape:Pj,link:p3,nolink:vx,punctuation:t3,reflink:yx,reflinkSearch:m3,tag:h3,text:e3,url:vs},g3={...Fd,link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Do).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Do).getRegex()},ud={...Fd,emStrongRDelimAst:o3,emStrongLDelim:s3,url:$e(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},y3={...ud,br:$e(dx).replace("{2,}","*").getRegex(),text:$e(ud.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uo={normal:Zd,gfm:Fj,pedantic:Xj},ds={normal:Fd,gfm:ud,breaks:y3,pedantic:g3},v3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cv=t=>v3[t];function Sn(t,n){if(n){if(At.escapeTest.test(t))return t.replace(At.escapeReplace,Cv)}else if(At.escapeTestNoEncode.test(t))return t.replace(At.escapeReplaceNoEncode,Cv);return t}function Tv(t){try{t=encodeURI(t).replace(At.percentDecode,"%")}catch{return null}return t}function Ov(t,n){var u;const i=t.replace(At.findPipe,(f,d,m)=>{let p=!1,g=d;for(;--g>=0&&m[g]==="\\";)p=!p;return p?"|":" |"}),a=i.split(At.splitPipe);let l=0;if(a[0].trim()||a.shift(),a.length>0&&!((u=a.at(-1))!=null&&u.trim())&&a.pop(),n)if(a.length>n)a.splice(n);else for(;a.length<n;)a.push("");for(;l<a.length;l++)a[l]=a[l].trim().replace(At.slashPipe,"|");return a}function hs(t,n,i){const a=t.length;if(a===0)return"";let l=0;for(;l<a&&t.charAt(a-l-1)===n;)l++;return t.slice(0,a-l)}function b3(t,n){if(t.indexOf(n[1])===-1)return-1;let i=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===n[0])i++;else if(t[a]===n[1]&&(i--,i<0))return a;return i>0?-2:-1}function jv(t,n,i,a,l){const u=n.href,f=n.title||null,d=t[1].replace(l.other.outputLinkReplace,"$1");a.state.inLink=!0;const m={type:t[0].charAt(0)==="!"?"image":"link",raw:i,href:u,title:f,text:d,tokens:a.inlineTokens(d)};return a.state.inLink=!1,m}function x3(t,n,i){const a=t.match(i.other.indentCodeCompensation);if(a===null)return n;const l=a[1];return n.split(`
107
- `).map(u=>{const f=u.match(i.other.beginningSpace);if(f===null)return u;const[d]=f;return d.length>=l.length?u.slice(l.length):u}).join(`
108
- `)}var Mo=class{constructor(t){w(this,"options");w(this,"rules");w(this,"lexer");this.options=t||ir}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const i=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:hs(i,`
109
- `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const i=n[0],a=x3(i,n[3]||"",this.rules);return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:a}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(this.rules.other.endingHash.test(i)){const a=hs(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:hs(n[0],`
110
- `)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let i=hs(n[0],`
61
+ Please change the parent <Route path="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let S=Ya(),x;if(n){let D=typeof n=="string"?hn(n):n;_e(d==="/"||((M=D.pathname)==null?void 0:M.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${D.pathname}" was given in the \`location\` prop.`),x=D}else x=S;let C=x.pathname||"/",E=C;if(d!=="/"){let D=d.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(D.length).join("/")}let L=pm(i,{pathname:E});Ut(v||L!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Ut(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.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.`);let V=T1(L&&L.map(D=>Object.assign({},D,{params:Object.assign({},h,D.params),pathname:ga([d,o.encodeLocation?o.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?d:ga([d,o.encodeLocation?o.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),f,r,s);return n&&V?w.createElement(bi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},V):V}function N1(){let i=k1(),n=p1(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),r=i instanceof Error?i.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},p=null;return console.error("Error handled by React Router default ErrorBoundary:",i),p=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},n),r?w.createElement("pre",{style:o},r):null,p)}var E1=w.createElement(N1,null),R1=class extends w.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,n){return n.location!==i.location||n.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:n.error,location:n.location,revalidation:i.revalidation||n.revalidation}}componentDidCatch(i,n){console.error("React Router caught the following error during render",i,n)}render(){return this.state.error!==void 0?w.createElement(Gt.Provider,{value:this.props.routeContext},w.createElement(Io.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function w1({routeContext:i,match:n,children:r}){let s=w.useContext(ll);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Gt.Provider,{value:i},r)}function T1(i,n=[],r=null,s=null){if(i==null){if(!r)return null;if(r.errors)i=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)i=r.matches;else return null}let o=i,f=r==null?void 0:r.errors;if(f!=null){let m=o.findIndex(d=>d.route.id&&(f==null?void 0:f[d.route.id])!==void 0);_e(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let p=!1,h=-1;if(r)for(let m=0;m<o.length;m++){let d=o[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(h=m),d.route.id){let{loaderData:v,errors:S}=r,x=d.route.loader&&!v.hasOwnProperty(d.route.id)&&(!S||S[d.route.id]===void 0);if(d.route.lazy||x){p=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((m,d,v)=>{let S,x=!1,C=null,E=null;r&&(S=f&&d.route.id?f[d.route.id]:void 0,C=d.route.errorElement||E1,p&&(h<0&&v===0?(Nm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,E=null):h===v&&(x=!0,E=d.route.hydrateFallbackElement||null)));let L=n.concat(o.slice(0,v+1)),V=()=>{let M;return S?M=C:x?M=E:d.route.Component?M=w.createElement(d.route.Component,null):d.route.element?M=d.route.element:M=m,w.createElement(w1,{match:d,routeContext:{outlet:m,matches:L,isDataRoute:r!=null},children:M})};return r&&(d.route.ErrorBoundary||d.route.errorElement||v===0)?w.createElement(R1,{location:r.location,revalidation:r.revalidation,component:C,error:S,children:V(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):V()},null)}function ec(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function C1(i){let n=w.useContext(ll);return _e(n,ec(i)),n}function j1(i){let n=w.useContext(ns);return _e(n,ec(i)),n}function A1(i){let n=w.useContext(Gt);return _e(n,ec(i)),n}function tc(i){let n=A1(i),r=n.matches[n.matches.length-1];return _e(r.route.id,`${i} can only be used on routes that contain a unique "id"`),r.route.id}function O1(){return tc("useRouteId")}function k1(){var s;let i=w.useContext(Io),n=j1("useRouteError"),r=tc("useRouteError");return i!==void 0?i:(s=n.errors)==null?void 0:s[r]}function L1(){let{router:i}=C1("useNavigate"),n=tc("useNavigate"),r=w.useRef(!1);return xm(()=>{r.current=!0}),w.useCallback(async(o,f={})=>{Ut(r.current,bm),r.current&&(typeof o=="number"?i.navigate(o):await i.navigate(o,{fromRouteId:n,...f}))},[i,n])}var Xp={};function Nm(i,n,r){!n&&!Xp[i]&&(Xp[i]=!0,Ut(!1,r))}w.memo(z1);function z1({routes:i,future:n,state:r}){return Sm(i,void 0,r,n)}function D1({to:i,replace:n,state:r,relative:s}){_e(il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=w.useContext(qt);Ut(!o,"<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:f}=w.useContext(Gt),{pathname:p}=Ya(),h=rl(),m=Wo(i,Po(f),p,s==="path"),d=JSON.stringify(m);return w.useEffect(()=>{h(JSON.parse(d),{replace:n,state:r,relative:s})},[h,d,s,n,r]),null}function Yr(i){_e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _1({basename:i="/",children:n=null,location:r,navigationType:s="POP",navigator:o,static:f=!1}){_e(!il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=i.replace(/^\/*/,"/"),h=w.useMemo(()=>({basename:p,navigator:o,static:f,future:{}}),[p,o,f]);typeof r=="string"&&(r=hn(r));let{pathname:m="/",search:d="",hash:v="",state:S=null,key:x="default"}=r,C=w.useMemo(()=>{let E=va(m,p);return E==null?null:{location:{pathname:E,search:d,hash:v,state:S,key:x},navigationType:s}},[p,m,d,v,S,x,s]);return Ut(C!=null,`<Router basename="${p}"> is not able to match the URL "${m}${d}${v}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:w.createElement(qt.Provider,{value:h},w.createElement(bi.Provider,{children:n,value:C}))}function M1({children:i,location:n}){return S1(Go(i),n)}function Go(i,n=[]){let r=[];return w.Children.forEach(i,(s,o)=>{if(!w.isValidElement(s))return;let f=[...n,o];if(s.type===w.Fragment){r.push.apply(r,Go(s.props.children,f));return}_e(s.type===Yr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_e(!s.props.index||!s.props.children,"An index route cannot have child routes.");let p={id:s.props.id||f.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(p.children=Go(s.props.children,f)),r.push(p)}),r}var Qr="get",Zr="application/x-www-form-urlencoded";function ls(i){return i!=null&&typeof i.tagName=="string"}function U1(i){return ls(i)&&i.tagName.toLowerCase()==="button"}function B1(i){return ls(i)&&i.tagName.toLowerCase()==="form"}function H1(i){return ls(i)&&i.tagName.toLowerCase()==="input"}function V1(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function $1(i,n){return i.button===0&&(!n||n==="_self")&&!V1(i)}var Hr=null;function q1(){if(Hr===null)try{new FormData(document.createElement("form"),0),Hr=!1}catch{Hr=!0}return Hr}var G1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zo(i){return i!=null&&!G1.has(i)?(Ut(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zr}"`),null):i}function Y1(i,n){let r,s,o,f,p;if(B1(i)){let h=i.getAttribute("action");s=h?va(h,n):null,r=i.getAttribute("method")||Qr,o=zo(i.getAttribute("enctype"))||Zr,f=new FormData(i)}else if(U1(i)||H1(i)&&(i.type==="submit"||i.type==="image")){let h=i.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=i.getAttribute("formaction")||h.getAttribute("action");if(s=m?va(m,n):null,r=i.getAttribute("formmethod")||h.getAttribute("method")||Qr,o=zo(i.getAttribute("formenctype"))||zo(h.getAttribute("enctype"))||Zr,f=new FormData(h,i),!q1()){let{name:d,type:v,value:S}=i;if(v==="image"){let x=d?`${d}.`:"";f.append(`${x}x`,"0"),f.append(`${x}y`,"0")}else d&&f.append(d,S)}}else{if(ls(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Qr,s=null,o=Zr,p=i}return f&&o==="text/plain"&&(p=f,f=void 0),{action:s,method:r.toLowerCase(),encType:o,formData:f,body:p}}function ac(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}async function Q1(i,n){if(i.id in n)return n[i.id];try{let r=await import(i.module);return n[i.id]=r,r}catch(r){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Z1(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function K1(i,n,r){let s=await Promise.all(i.map(async o=>{let f=n.routes[o.route.id];if(f){let p=await Q1(f,r);return p.links?p.links():[]}return[]}));return P1(s.flat(1).filter(Z1).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Jp(i,n,r,s,o,f){let p=(m,d)=>r[d]?m.route.id!==r[d].route.id:!0,h=(m,d)=>{var v;return r[d].pathname!==m.pathname||((v=r[d].route.path)==null?void 0:v.endsWith("*"))&&r[d].params["*"]!==m.params["*"]};return f==="assets"?n.filter((m,d)=>p(m,d)||h(m,d)):f==="data"?n.filter((m,d)=>{var S;let v=s.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(p(m,d)||h(m,d))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((S=r[0])==null?void 0:S.params)||{},nextUrl:new URL(i,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function X1(i,n,{includeHydrateFallback:r}={}){return J1(i.map(s=>{let o=n.routes[s.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function J1(i){return[...new Set(i)]}function F1(i){let n={},r=Object.keys(i).sort();for(let s of r)n[s]=i[s];return n}function P1(i,n){let r=new Set;return new Set(n),i.reduce((s,o)=>{let f=JSON.stringify(F1(o));return r.has(f)||(r.add(f),s.push({key:f,link:o})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var W1=new Set([100,101,204,205]);function I1(i,n){let r=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return r.pathname==="/"?r.pathname="_root.data":n&&va(r.pathname,n)==="/"?r.pathname=`${n.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Em(){let i=w.useContext(ll);return ac(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function e2(){let i=w.useContext(ns);return ac(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var nc=w.createContext(void 0);nc.displayName="FrameworkContext";function Rm(){let i=w.useContext(nc);return ac(i,"You must render this element inside a <HydratedRouter> element"),i}function t2(i,n){let r=w.useContext(nc),[s,o]=w.useState(!1),[f,p]=w.useState(!1),{onFocus:h,onBlur:m,onMouseEnter:d,onMouseLeave:v,onTouchStart:S}=n,x=w.useRef(null);w.useEffect(()=>{if(i==="render"&&p(!0),i==="viewport"){let L=M=>{M.forEach(D=>{p(D.isIntersecting)})},V=new IntersectionObserver(L,{threshold:.5});return x.current&&V.observe(x.current),()=>{V.disconnect()}}},[i]),w.useEffect(()=>{if(s){let L=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(L)}}},[s]);let C=()=>{o(!0)},E=()=>{o(!1),p(!1)};return r?i!=="intent"?[f,x,{}]:[f,x,{onFocus:oi(h,C),onBlur:oi(m,E),onMouseEnter:oi(d,C),onMouseLeave:oi(v,E),onTouchStart:oi(S,C)}]:[!1,x,{}]}function oi(i,n){return r=>{i&&i(r),r.defaultPrevented||n(r)}}function a2({page:i,...n}){let{router:r}=Em(),s=w.useMemo(()=>pm(r.routes,i,r.basename),[r.routes,i,r.basename]);return s?w.createElement(l2,{page:i,matches:s,...n}):null}function n2(i){let{manifest:n,routeModules:r}=Rm(),[s,o]=w.useState([]);return w.useEffect(()=>{let f=!1;return K1(i,n,r).then(p=>{f||o(p)}),()=>{f=!0}},[i,n,r]),s}function l2({page:i,matches:n,...r}){let s=Ya(),{manifest:o,routeModules:f}=Rm(),{basename:p}=Em(),{loaderData:h,matches:m}=e2(),d=w.useMemo(()=>Jp(i,n,m,o,s,"data"),[i,n,m,o,s]),v=w.useMemo(()=>Jp(i,n,m,o,s,"assets"),[i,n,m,o,s]),S=w.useMemo(()=>{if(i===s.pathname+s.search+s.hash)return[];let E=new Set,L=!1;if(n.forEach(M=>{var G;let D=o.routes[M.route.id];!D||!D.hasLoader||(!d.some(X=>X.route.id===M.route.id)&&M.route.id in h&&((G=f[M.route.id])!=null&&G.shouldRevalidate)||D.hasClientLoader?L=!0:E.add(M.route.id))}),E.size===0)return[];let V=I1(i,p);return L&&E.size>0&&V.searchParams.set("_routes",n.filter(M=>E.has(M.route.id)).map(M=>M.route.id).join(",")),[V.pathname+V.search]},[p,h,s,o,d,n,i,f]),x=w.useMemo(()=>X1(v,o),[v,o]),C=n2(v);return w.createElement(w.Fragment,null,S.map(E=>w.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),x.map(E=>w.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),C.map(({key:E,link:L})=>w.createElement("link",{key:E,...L})))}function i2(...i){return n=>{i.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var wm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wm&&(window.__reactRouterVersion="7.6.3")}catch{}function r2({basename:i,children:n,window:r}){let s=w.useRef();s.current==null&&(s.current=QS({window:r,v5Compat:!0}));let o=s.current,[f,p]=w.useState({action:o.action,location:o.location}),h=w.useCallback(m=>{w.startTransition(()=>p(m))},[p]);return w.useLayoutEffect(()=>o.listen(h),[o,h]),w.createElement(_1,{basename:i,children:n,location:f.location,navigationType:f.action,navigator:o})}var Tm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cm=w.forwardRef(function({onClick:n,discover:r="render",prefetch:s="none",relative:o,reloadDocument:f,replace:p,state:h,target:m,to:d,preventScrollReset:v,viewTransition:S,...x},C){let{basename:E}=w.useContext(qt),L=typeof d=="string"&&Tm.test(d),V,M=!1;if(typeof d=="string"&&L&&(V=d,wm))try{let F=new URL(window.location.href),ne=d.startsWith("//")?new URL(F.protocol+d):new URL(d),pe=va(ne.pathname,E);ne.origin===F.origin&&pe!=null?d=pe+ne.search+ne.hash:M=!0}catch{Ut(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let D=y1(d,{relative:o}),[G,X,K]=t2(s,x),se=c2(d,{replace:p,state:h,target:m,preventScrollReset:v,relative:o,viewTransition:S});function re(F){n&&n(F),F.defaultPrevented||se(F)}let ee=w.createElement("a",{...x,...K,href:V||D,onClick:M||f?n:re,ref:i2(C,X),target:m,"data-discover":!L&&r==="render"?"true":void 0});return G&&!L?w.createElement(w.Fragment,null,ee,w.createElement(a2,{page:D})):ee});Cm.displayName="Link";var s2=w.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:s="",end:o=!1,style:f,to:p,viewTransition:h,children:m,...d},v){let S=xi(p,{relative:d.relative}),x=Ya(),C=w.useContext(ns),{navigator:E,basename:L}=w.useContext(qt),V=C!=null&&m2(S)&&h===!0,M=E.encodeLocation?E.encodeLocation(S).pathname:S.pathname,D=x.pathname,G=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(D=D.toLowerCase(),G=G?G.toLowerCase():null,M=M.toLowerCase()),G&&L&&(G=va(G,L)||G);const X=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let K=D===M||!o&&D.startsWith(M)&&D.charAt(X)==="/",se=G!=null&&(G===M||!o&&G.startsWith(M)&&G.charAt(M.length)==="/"),re={isActive:K,isPending:se,isTransitioning:V},ee=K?n:void 0,F;typeof s=="function"?F=s(re):F=[s,K?"active":null,se?"pending":null,V?"transitioning":null].filter(Boolean).join(" ");let ne=typeof f=="function"?f(re):f;return w.createElement(Cm,{...d,"aria-current":ee,className:F,ref:v,style:ne,to:p,viewTransition:h},typeof m=="function"?m(re):m)});s2.displayName="NavLink";var u2=w.forwardRef(({discover:i="render",fetcherKey:n,navigate:r,reloadDocument:s,replace:o,state:f,method:p=Qr,action:h,onSubmit:m,relative:d,preventScrollReset:v,viewTransition:S,...x},C)=>{let E=h2(),L=p2(h,{relative:d}),V=p.toLowerCase()==="get"?"get":"post",M=typeof h=="string"&&Tm.test(h),D=G=>{if(m&&m(G),G.defaultPrevented)return;G.preventDefault();let X=G.nativeEvent.submitter,K=(X==null?void 0:X.getAttribute("formmethod"))||p;E(X||G.currentTarget,{fetcherKey:n,method:K,navigate:r,replace:o,state:f,relative:d,preventScrollReset:v,viewTransition:S})};return w.createElement("form",{ref:C,method:V,action:L,onSubmit:s?m:D,...x,"data-discover":!M&&i==="render"?"true":void 0})});u2.displayName="Form";function o2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jm(i){let n=w.useContext(ll);return _e(n,o2(i)),n}function c2(i,{target:n,replace:r,state:s,preventScrollReset:o,relative:f,viewTransition:p}={}){let h=rl(),m=Ya(),d=xi(i,{relative:f});return w.useCallback(v=>{if($1(v,n)){v.preventDefault();let S=r!==void 0?r:gi(m)===gi(d);h(i,{replace:S,state:s,preventScrollReset:o,relative:f,viewTransition:p})}},[m,h,d,r,s,n,i,o,f,p])}var f2=0,d2=()=>`__${String(++f2)}__`;function h2(){let{router:i}=jm("useSubmit"),{basename:n}=w.useContext(qt),r=O1();return w.useCallback(async(s,o={})=>{let{action:f,method:p,encType:h,formData:m,body:d}=Y1(s,n);if(o.navigate===!1){let v=o.fetcherKey||d2();await i.fetch(v,r,o.action||f,{preventScrollReset:o.preventScrollReset,formData:m,body:d,formMethod:o.method||p,formEncType:o.encType||h,flushSync:o.flushSync})}else await i.navigate(o.action||f,{preventScrollReset:o.preventScrollReset,formData:m,body:d,formMethod:o.method||p,formEncType:o.encType||h,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[i,n,r])}function p2(i,{relative:n}={}){let{basename:r}=w.useContext(qt),s=w.useContext(Gt);_e(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),f={...xi(i||".",{relative:n})},p=Ya();if(i==null){f.search=p.search;let h=new URLSearchParams(f.search),m=h.getAll("index");if(m.some(v=>v==="")){h.delete("index"),m.filter(S=>S).forEach(S=>h.append("index",S));let v=h.toString();f.search=v?`?${v}`:""}}return(!i||i===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:ga([r,f.pathname])),gi(f)}function m2(i,n={}){let r=w.useContext(ym);_e(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=jm("useViewTransitionState"),o=xi(i,{relative:n.relative});if(!r.isTransitioning)return!1;let f=va(r.currentLocation.pathname,s)||r.currentLocation.pathname,p=va(r.nextLocation.pathname,s)||r.nextLocation.pathname;return Wr(o.pathname,p)!=null||Wr(o.pathname,f)!=null}[...W1];function g2(i){if(i===null)return"null";if(i===void 0)return"undefined";if(i instanceof Error)return i.message;switch(typeof i){case"bigint":case"number":case"boolean":return String(i);case"string":return i;case"symbol":return`Symbol(${i.description??""})`;case"object":return String("message"in i?i.message:i);case"function":return`function ${i.name}`;default:return"invalid error type"}}const v2="/api/plugin/site-generator-plugin",y2=`${`//${document.location.host}`}${v2}`;let Am;const[Vr]=document.getElementsByClassName("js-script-site-generator");if(Vr&&Vr instanceof HTMLScriptElement){if(!Vr.dataset.googleRecaptchaSiteKey)throw new Error('missing "data-google-recaptcha-site-key" in ".js-script-site-generator" element');Am=Vr.dataset.googleRecaptchaSiteKey}const Do=Am;async function Ga(i){try{const n=await fetch(y2,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${g2(n)}`}}}const rt=w.forwardRef((i,n)=>{const{label:r,severity:s="primary",loading:o,children:f,onClick:p,className:h="",disabled:m,...d}=i,[v,S]=w.useState(!1),x=v||o,C=["Button",s==="secondary"?"secondary":"",x?"loading":"",h].filter(Boolean).join(" "),E=async L=>{if(p)try{L.preventDefault(),S(!0),await p(L)}finally{S(!1)}};return b.jsxs("button",{ref:n,type:"button",className:C,onClick:E,disabled:m||x,...d,children:[!x&&f,!x&&r]})});rt.displayName="Button";function Om({initialValue:i="",placeholder:n,submitLabel:r,onSubmit:s,isLoading:o=!1,error:f}){const{t:p}=ot(),[h,m]=w.useState(i),d=S=>{m(S.target.value)},v=async()=>{h.trim()&&await s(h.trim())};return b.jsxs("div",{className:"PromptForm",children:[f&&b.jsx("div",{className:"Alert error mb-3",children:b.jsx("p",{children:f})}),b.jsx("textarea",{className:"PromptForm-textarea",placeholder:n||p("createPromptPlaceholder"),value:h,onChange:d,rows:6,disabled:o}),b.jsx(rt,{onClick:v,loading:o,disabled:!h.trim()||o,className:"PromptForm-button mt-3",children:r})]})}const Fp=i=>{let n;const r=new Set,s=(d,v)=>{const S=typeof d=="function"?d(n):d;if(!Object.is(S,n)){const x=n;n=v??(typeof S!="object"||S===null)?S:Object.assign({},n,S),r.forEach(C=>C(n,x))}},o=()=>n,h={setState:s,getState:o,getInitialState:()=>m,subscribe:d=>(r.add(d),()=>r.delete(d))},m=n=i(s,o,h);return h},b2=i=>i?Fp(i):Fp,x2=i=>i;function S2(i,n=x2){const r=Bo.useSyncExternalStore(i.subscribe,()=>n(i.getState()),()=>n(i.getInitialState()));return Bo.useDebugValue(r),r}const Pp=i=>{const n=b2(i),r=s=>S2(n,s);return Object.assign(r,n),r},N2=i=>i?Pp(i):Pp,lc="site-generator-session-token";function Wp(i){try{sessionStorage.setItem(lc,i)}catch(n){console.error("Failed to save session token",n)}}function vi(){try{return sessionStorage.getItem(lc)??void 0}catch(i){console.error("Failed to get session token",i)}}function E2(){try{sessionStorage.removeItem(lc)}catch(i){console.error("Failed to remove session token",i)}}const R2=2e3,nl=new Map;function w2(i){if(nl.has(i))return;const n=window.setInterval(()=>{T2(i)},R2);nl.set(i,n)}function $r(i){const n=nl.get(i);n&&(window.clearInterval(n),nl.delete(i))}function ic(){nl.forEach(i=>{window.clearInterval(i)}),nl.clear()}async function T2(i){const n=vi();if(!n){$r(i);return}try{const r=await Ga({command:"loadStep",sessionToken:n,stepNumber:i});if(r.success&&r.result){const s=r.result;C2(s),s.status!=="pending"&&$r(i)}else console.error("Error polling step:",r),$r(i)}catch(r){console.error("Error polling step:",r),$r(i)}}function C2(i){const{updateStep:n}=pn.getState();n(i)}function _o(i){ic(),i.steps.forEach(n=>{n.status==="pending"&&w2(n.stepNumber)})}const pn=N2((i,n)=>({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0,setWorkSession:r=>{i({workSession:r}),r&&_o(r)},updateStep:r=>{const{workSession:s}=n();if(!s)return;const o=s.steps.map(p=>p.stepNumber===r.stepNumber?r:p),f={...s,steps:o};i({workSession:f}),r.status==="pending"&&_o(f)},appendNewStep:r=>{const{workSession:s}=n();if(!s)return;const o={...s,steps:[...s.steps,r]};i({workSession:o}),r.status==="pending"&&_o(o)},setIsLoading:r=>i({isLoading:r}),setError:r=>i({error:r}),setActiveStepNumber:r=>i({activeStepNumber:r}),resetSession:()=>{ic(),i({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0})}}));function is({size:i="medium"}){return b.jsx("div",{className:`Spinner Spinner-${i}`})}function Kr({activeStep:i}){const{t:n}=ot(),r=rl(),{workSession:s}=pn(),o=async()=>{await r("/")},f=async p=>{await r(`/step/${p}`)};return!s||!s.steps||s.steps.length===0?b.jsx("div",{className:"Sidebar",children:b.jsx(rt,{className:`Sidebar-button ${i===void 0?"active":""}`,onClick:o,children:n("startAgain")})}):b.jsxs("div",{className:"Sidebar",children:[b.jsx(rt,{className:`Sidebar-button ${i===void 0?"active":""}`,onClick:o,children:n("startAgain")}),b.jsx("div",{className:"Sidebar-steps",children:s.steps.map(p=>b.jsxs("div",{className:"Sidebar-step",children:[b.jsx(rt,{className:`Sidebar-button ${i===p.stepNumber?"active":""} ${p.status==="pending"?"has-spinner":""}`,onClick:()=>f(p.stepNumber),children:n("stepTitle",{stepNumber:p.stepNumber,kind:n(p.kind)})}),p.status==="pending"&&b.jsx("div",{className:"Sidebar-spinner",children:b.jsx(is,{size:"small"})})]},p.stepNumber))})]})}function Tt({header:i,footer:n,children:r,className:s=""}){const o=["Card",s].filter(Boolean).join(" ");return b.jsxs("div",{className:o,children:[i&&b.jsx("div",{className:"Card-header",children:i}),b.jsx("div",{className:"Card-body",children:r}),n&&b.jsx("div",{className:"Card-footer",children:n})]})}function j2(){const{t:i}=ot(),n=rl(),[r,s]=w.useState(!1),[o,f]=w.useState(void 0),{workSession:p,appendNewStep:h}=pn(),m=async d=>{if(!p)return;s(!0),f(void 0);const v=vi();if(!v){f(i("sessionExpired")),s(!1);return}try{const S=await Ga({command:"createSiteSchema",sessionToken:v,prompt:d});if(S.success&&S.result){const x=S.result;h(x),await n(`/step/${x.stepNumber}`)}else f(i("promptSubmissionFailed"))}catch(S){console.error("Error submitting prompt:",S),f(i("errorOccurred"))}finally{s(!1)}};return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsxs(Tt,{className:"p-4",children:[b.jsx("h1",{className:"mb-4",children:i("welcomeTitle")}),b.jsx("div",{className:"Text mb-4",dangerouslySetInnerHTML:{__html:i("startInstruction")}}),p&&p.steps.length>0&&b.jsx("p",{className:"InfoText",children:i("newTabRestartMessage")}),b.jsx(Om,{submitLabel:i("createSchema"),onSubmit:m,isLoading:r,error:o})]})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:void 0})})]})}function A2(i){return"siteId"in i}function rc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var mn=rc();function km(i){mn=i}var hi={exec:()=>null};function Se(i,n=""){let r=typeof i=="string"?i:i.source;const s={replace:(o,f)=>{let p=typeof f=="string"?f:f.source;return p=p.replace(ut.caret,"$1"),r=r.replace(o,p),s},getRegex:()=>new RegExp(r,n)};return s}var ut={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},O2=/^(?:[ \t]*(?:\n|$))+/,k2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,z2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,sc=/(?:[*+-]|\d{1,9}[.)])/,Lm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zm=Se(Lm).replace(/bull/g,sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),D2=Se(Lm).replace(/bull/g,sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),uc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_2=/^[^\n]+/,oc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M2=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",oc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),U2=Se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,sc).getRegex(),rs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,B2=Se("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cc).replace("tag",rs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dm=Se(uc).replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rs).getRegex(),H2=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dm).getRegex(),fc={blockquote:H2,code:k2,def:M2,fences:L2,heading:z2,hr:Si,html:B2,lheading:zm,list:U2,newline:O2,paragraph:Dm,table:hi,text:_2},Ip=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rs).getRegex(),V2={...fc,lheading:D2,table:Ip,paragraph:Se(uc).replace("hr",Si).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ip).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rs).getRegex()},$2={...fc,html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(uc).replace("hr",Si).replace("heading",` *#{1,6} *[^
62
+ ]`).replace("lheading",zm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_m=/^( {2,}|\\)\n(?!\s*$)/,Y2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ss=/[\p{P}\p{S}]/u,dc=/[\s\p{P}\p{S}]/u,Mm=/[^\s\p{P}\p{S}]/u,Q2=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dc).getRegex(),Um=/(?!~)[\p{P}\p{S}]/u,Z2=/(?!~)[\s\p{P}\p{S}]/u,K2=/(?:[^\s\p{P}\p{S}]|~)/u,X2=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Bm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,J2=Se(Bm,"u").replace(/punct/g,ss).getRegex(),F2=Se(Bm,"u").replace(/punct/g,Um).getRegex(),Hm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",P2=Se(Hm,"gu").replace(/notPunctSpace/g,Mm).replace(/punctSpace/g,dc).replace(/punct/g,ss).getRegex(),W2=Se(Hm,"gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,Z2).replace(/punct/g,Um).getRegex(),I2=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mm).replace(/punctSpace/g,dc).replace(/punct/g,ss).getRegex(),eN=Se(/\\(punct)/,"gu").replace(/punct/g,ss).getRegex(),tN=Se(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aN=Se(cc).replace("(?:-->|$)","-->").getRegex(),nN=Se("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",aN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ir=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lN=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ir).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vm=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",Ir).replace("ref",oc).getRegex(),$m=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",oc).getRegex(),iN=Se("reflink|nolink(?!\\()","g").replace("reflink",Vm).replace("nolink",$m).getRegex(),hc={_backpedal:hi,anyPunctuation:eN,autolink:tN,blockSkip:X2,br:_m,code:G2,del:hi,emStrongLDelim:J2,emStrongRDelimAst:P2,emStrongRDelimUnd:I2,escape:q2,link:lN,nolink:$m,punctuation:Q2,reflink:Vm,reflinkSearch:iN,tag:nN,text:Y2,url:hi},rN={...hc,link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",Ir).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ir).getRegex()},Yo={...hc,emStrongRDelimAst:W2,emStrongLDelim:F2,url:Se(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},sN={...Yo,br:Se(_m).replace("{2,}","*").getRegex(),text:Se(Yo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qr={normal:fc,gfm:V2,pedantic:$2},ci={normal:hc,gfm:Yo,breaks:sN,pedantic:rN},uN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},em=i=>uN[i];function Pt(i,n){if(n){if(ut.escapeTest.test(i))return i.replace(ut.escapeReplace,em)}else if(ut.escapeTestNoEncode.test(i))return i.replace(ut.escapeReplaceNoEncode,em);return i}function tm(i){try{i=encodeURI(i).replace(ut.percentDecode,"%")}catch{return null}return i}function am(i,n){var f;const r=i.replace(ut.findPipe,(p,h,m)=>{let d=!1,v=h;for(;--v>=0&&m[v]==="\\";)d=!d;return d?"|":" |"}),s=r.split(ut.splitPipe);let o=0;if(s[0].trim()||s.shift(),s.length>0&&!((f=s.at(-1))!=null&&f.trim())&&s.pop(),n)if(s.length>n)s.splice(n);else for(;s.length<n;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(ut.slashPipe,"|");return s}function fi(i,n,r){const s=i.length;if(s===0)return"";let o=0;for(;o<s&&i.charAt(s-o-1)===n;)o++;return i.slice(0,s-o)}function oN(i,n){if(i.indexOf(n[1])===-1)return-1;let r=0;for(let s=0;s<i.length;s++)if(i[s]==="\\")s++;else if(i[s]===n[0])r++;else if(i[s]===n[1]&&(r--,r<0))return s;return r>0?-2:-1}function nm(i,n,r,s,o){const f=n.href,p=n.title||null,h=i[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;const m={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:f,title:p,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,m}function cN(i,n,r){const s=i.match(r.other.indentCodeCompensation);if(s===null)return n;const o=s[1];return n.split(`
63
+ `).map(f=>{const p=f.match(r.other.beginningSpace);if(p===null)return f;const[h]=p;return h.length>=o.length?f.slice(o.length):f}).join(`
64
+ `)}var es=class{constructor(i){Oe(this,"options");Oe(this,"rules");Oe(this,"lexer");this.options=i||mn}space(i){const n=this.rules.block.newline.exec(i);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(i){const n=this.rules.block.code.exec(i);if(n){const r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:fi(r,`
65
+ `)}}}fences(i){const n=this.rules.block.fences.exec(i);if(n){const r=n[0],s=cN(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(i){const n=this.rules.block.heading.exec(i);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){const s=fi(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(i){const n=this.rules.block.hr.exec(i);if(n)return{type:"hr",raw:fi(n[0],`
66
+ `)}}blockquote(i){const n=this.rules.block.blockquote.exec(i);if(n){let r=fi(n[0],`
111
67
  `).split(`
112
- `),a="",l="";const u=[];for(;i.length>0;){let f=!1;const d=[];let m;for(m=0;m<i.length;m++)if(this.rules.other.blockquoteStart.test(i[m]))d.push(i[m]),f=!0;else if(!f)d.push(i[m]);else break;i=i.slice(m);const p=d.join(`
113
- `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
114
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
115
- ${p}`:p,l=l?`${l}
116
- ${g}`:g;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,u,!0),this.lexer.state.top=v,i.length===0)break;const b=u.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){const k=b,N=k.raw+`
117
- `+i.join(`
118
- `),T=this.blockquote(N);u[u.length-1]=T,a=a.substring(0,a.length-k.raw.length)+T.raw,l=l.substring(0,l.length-k.text.length)+T.text;break}else if((b==null?void 0:b.type)==="list"){const k=b,N=k.raw+`
119
- `+i.join(`
120
- `),T=this.list(N);u[u.length-1]=T,a=a.substring(0,a.length-b.raw.length)+T.raw,l=l.substring(0,l.length-k.raw.length)+T.raw,i=N.substring(u.at(-1).raw.length).split(`
121
- `);continue}}return{type:"blockquote",raw:a,tokens:u,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i=n[1].trim();const a=i.length>1,l={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");const u=this.rules.other.listItemRegex(i);let f=!1;for(;t;){let m=!1,p="",g="";if(!(n=u.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let v=n[2].split(`
122
- `,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),b=t.split(`
123
- `,1)[0],k=!v.trim(),N=0;if(this.options.pedantic?(N=2,g=v.trimStart()):k?N=n[1].length+1:(N=n[2].search(this.rules.other.nonSpaceChar),N=N>4?1:N,g=v.slice(N),N+=n[1].length),k&&this.rules.other.blankLine.test(b)&&(p+=b+`
124
- `,t=t.substring(b.length+1),m=!0),!m){const M=this.rules.other.nextBulletRegex(N),z=this.rules.other.hrRegex(N),G=this.rules.other.fencesBeginRegex(N),X=this.rules.other.headingBeginRegex(N),F=this.rules.other.htmlBeginRegex(N);for(;t;){const he=t.split(`
125
- `,1)[0];let fe;if(b=he,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),fe=b):fe=b.replace(this.rules.other.tabCharGlobal," "),G.test(b)||X.test(b)||F.test(b)||M.test(b)||z.test(b))break;if(fe.search(this.rules.other.nonSpaceChar)>=N||!b.trim())g+=`
126
- `+fe.slice(N);else{if(k||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||G.test(v)||X.test(v)||z.test(v))break;g+=`
127
- `+b}!k&&!b.trim()&&(k=!0),p+=he+`
128
- `,t=t.substring(he.length+1),v=fe.slice(N)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(f=!0));let T=null,U;this.options.gfm&&(T=this.rules.other.listIsTask.exec(g),T&&(U=T[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!T,checked:U,loose:!1,text:g,tokens:[]}),l.raw+=p}const d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let m=0;m<l.items.length;m++)if(this.lexer.state.top=!1,l.items[m].tokens=this.lexer.blockTokens(l.items[m].text,[]),!l.loose){const p=l.items[m].tokens.filter(v=>v.type==="space"),g=p.length>0&&p.some(v=>this.rules.other.anyLine.test(v.raw));l.loose=g}if(l.loose)for(let m=0;m<l.items.length;m++)l.items[m].loose=!0;return l}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:a,title:l}}}table(t){var f;const n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const i=Ov(n[1]),a=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(f=n[3])!=null&&f.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
129
- `):[],u={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===a.length){for(const d of a)this.rules.other.tableAlignRight.test(d)?u.align.push("right"):this.rules.other.tableAlignCenter.test(d)?u.align.push("center"):this.rules.other.tableAlignLeft.test(d)?u.align.push("left"):u.align.push(null);for(let d=0;d<i.length;d++)u.header.push({text:i[d],tokens:this.lexer.inline(i[d]),header:!0,align:u.align[d]});for(const d of l)u.rows.push(Ov(d,u.header.length).map((m,p)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:u.align[p]})));return u}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const i=n[1].charAt(n[1].length-1)===`
130
- `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const u=hs(i.slice(0,-1),"\\");if((i.length-u.length)%2===0)return}else{const u=b3(n[2],"()");if(u===-2)return;if(u>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let a=n[2],l="";if(this.options.pedantic){const u=this.rules.other.pedanticHrefTitle.exec(a);u&&(a=u[1],l=u[3])}else l=n[3]?n[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),jv(n,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[a.toLowerCase()];if(!l){const u=i[0].charAt(0);return{type:"text",raw:u,text:u}}return jv(i,l,i[0],this.lexer,this.rules)}}emStrong(t,n,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const u=[...a[0]].length-1;let f,d,m=u,p=0;const g=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,n=n.slice(-1*t.length+u);(a=g.exec(n))!=null;){if(f=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!f)continue;if(d=[...f].length,a[3]||a[4]){m+=d;continue}else if((a[5]||a[6])&&u%3&&!((u+d)%3)){p+=d;continue}if(m-=d,m>0)continue;d=Math.min(d,d+m+p);const v=[...a[0]][0].length,b=t.slice(0,u+a.index+v+d);if(Math.min(u,d)%2){const N=b.slice(1,-1);return{type:"em",raw:b,text:N,tokens:this.lexer.inlineTokens(N)}}const k=b.slice(2,-2);return{type:"strong",raw:b,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(i),l=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&l&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:n[0],text:i}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let i,a;return n[2]==="@"?(i=n[1],a="mailto:"+i):(i=n[1],a=i),{type:"link",raw:n[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let n;if(n=this.rules.inline.url.exec(t)){let a,l;if(n[2]==="@")a=n[0],l="mailto:"+a;else{let u;do u=n[0],n[0]=((i=this.rules.inline._backpedal.exec(n[0]))==null?void 0:i[0])??"";while(u!==n[0]);a=n[0],n[1]==="www."?l="http://"+n[0]:l=n[0]}return{type:"link",raw:n[0],text:a,href:l,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){const i=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:i}}}},Kn=class cd{constructor(n){w(this,"tokens");w(this,"options");w(this,"state");w(this,"tokenizer");w(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=n||ir,this.options.tokenizer=this.options.tokenizer||new Mo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:At,block:uo.normal,inline:ds.normal};this.options.pedantic?(i.block=uo.pedantic,i.inline=ds.pedantic):this.options.gfm&&(i.block=uo.gfm,this.options.breaks?i.inline=ds.breaks:i.inline=ds.gfm),this.tokenizer.rules=i}static get rules(){return{block:uo,inline:ds}}static lex(n,i){return new cd(i).lex(n)}static lexInline(n,i){return new cd(i).inlineTokens(n)}lex(n){n=n.replace(At.carriageReturn,`
131
- `),this.blockTokens(n,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,i=[],a=!1){var l,u,f;for(this.options.pedantic&&(n=n.replace(At.tabCharGlobal," ").replace(At.spaceLine,""));n;){let d;if((u=(l=this.options.extensions)==null?void 0:l.block)!=null&&u.some(p=>(d=p.call({lexer:this},n,i))?(n=n.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.space(n)){n=n.substring(d.raw.length);const p=i.at(-1);d.raw.length===1&&p!==void 0?p.raw+=`
132
- `:i.push(d);continue}if(d=this.tokenizer.code(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=`
133
- `+d.raw,p.text+=`
134
- `+d.text,this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(d=this.tokenizer.fences(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.heading(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.hr(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.blockquote(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.list(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.html(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.def(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=`
135
- `+d.raw,p.text+=`
136
- `+d.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title});continue}if(d=this.tokenizer.table(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.lheading(n)){n=n.substring(d.raw.length),i.push(d);continue}let m=n;if((f=this.options.extensions)!=null&&f.startBlock){let p=1/0;const g=n.slice(1);let v;this.options.extensions.startBlock.forEach(b=>{v=b.call({lexer:this},g),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(m=n.substring(0,p+1))}if(this.state.top&&(d=this.tokenizer.paragraph(m))){const p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=`
137
- `+d.raw,p.text+=`
138
- `+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d),a=m.length!==n.length,n=n.substring(d.raw.length);continue}if(d=this.tokenizer.text(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=`
139
- `+d.raw,p.text+=`
140
- `+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(n){const p="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){var d,m,p;let a=n,l=null;if(this.tokens.links){const g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let u=!1,f="";for(;n;){u||(f=""),u=!1;let g;if((m=(d=this.options.extensions)==null?void 0:d.inline)!=null&&m.some(b=>(g=b.call({lexer:this},n,i))?(n=n.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(g.raw.length);const b=i.at(-1);g.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=g.raw,b.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(n,a,f)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(n)){n=n.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(n))){n=n.substring(g.raw.length),i.push(g);continue}let v=n;if((p=this.options.extensions)!=null&&p.startInline){let b=1/0;const k=n.slice(1);let N;this.options.extensions.startInline.forEach(T=>{N=T.call({lexer:this},k),typeof N=="number"&&N>=0&&(b=Math.min(b,N))}),b<1/0&&b>=0&&(v=n.substring(0,b+1))}if(g=this.tokenizer.inlineText(v)){n=n.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(f=g.raw.slice(-1)),u=!0;const b=i.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=g.raw,b.text+=g.text):i.push(g);continue}if(n){const b="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return i}},Lo=class{constructor(t){w(this,"options");w(this,"parser");this.options=t||ir}space(t){return""}code({text:t,lang:n,escaped:i}){var u;const a=(u=(n||"").match(At.notSpaceStart))==null?void 0:u[0],l=t.replace(At.endingNewline,"")+`
141
- `;return a?'<pre><code class="language-'+Sn(a)+'">'+(i?l:Sn(l,!0))+`</code></pre>
142
- `:"<pre><code>"+(i?l:Sn(l,!0))+`</code></pre>
143
- `}blockquote({tokens:t}){return`<blockquote>
144
- ${this.parser.parse(t)}</blockquote>
145
- `}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
146
- `}hr(t){return`<hr>
147
- `}list(t){const n=t.ordered,i=t.start;let a="";for(let f=0;f<t.items.length;f++){const d=t.items[f];a+=this.listitem(d)}const l=n?"ol":"ul",u=n&&i!==1?' start="'+i+'"':"";return"<"+l+u+`>
148
- `+a+"</"+l+`>
149
- `}listitem(t){var i;let n="";if(t.task){const a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+Sn(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):n+=a+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
150
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
151
- `}table(t){let n="",i="";for(let l=0;l<t.header.length;l++)i+=this.tablecell(t.header[l]);n+=this.tablerow({text:i});let a="";for(let l=0;l<t.rows.length;l++){const u=t.rows[l];i="";for(let f=0;f<u.length;f++)i+=this.tablecell(u[f]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
68
+ `),s="",o="";const f=[];for(;r.length>0;){let p=!1;const h=[];let m;for(m=0;m<r.length;m++)if(this.rules.other.blockquoteStart.test(r[m]))h.push(r[m]),p=!0;else if(!p)h.push(r[m]);else break;r=r.slice(m);const d=h.join(`
69
+ `),v=d.replace(this.rules.other.blockquoteSetextReplace,`
70
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
71
+ ${d}`:d,o=o?`${o}
72
+ ${v}`:v;const S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(v,f,!0),this.lexer.state.top=S,r.length===0)break;const x=f.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const C=x,E=C.raw+`
73
+ `+r.join(`
74
+ `),L=this.blockquote(E);f[f.length-1]=L,s=s.substring(0,s.length-C.raw.length)+L.raw,o=o.substring(0,o.length-C.text.length)+L.text;break}else if((x==null?void 0:x.type)==="list"){const C=x,E=C.raw+`
75
+ `+r.join(`
76
+ `),L=this.list(E);f[f.length-1]=L,s=s.substring(0,s.length-x.raw.length)+L.raw,o=o.substring(0,o.length-C.raw.length)+L.raw,r=E.substring(f.at(-1).raw.length).split(`
77
+ `);continue}}return{type:"blockquote",raw:s,tokens:f,text:o}}}list(i){let n=this.rules.block.list.exec(i);if(n){let r=n[1].trim();const s=r.length>1,o={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");const f=this.rules.other.listItemRegex(r);let p=!1;for(;i;){let m=!1,d="",v="";if(!(n=f.exec(i))||this.rules.block.hr.test(i))break;d=n[0],i=i.substring(d.length);let S=n[2].split(`
78
+ `,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),x=i.split(`
79
+ `,1)[0],C=!S.trim(),E=0;if(this.options.pedantic?(E=2,v=S.trimStart()):C?E=n[1].length+1:(E=n[2].search(this.rules.other.nonSpaceChar),E=E>4?1:E,v=S.slice(E),E+=n[1].length),C&&this.rules.other.blankLine.test(x)&&(d+=x+`
80
+ `,i=i.substring(x.length+1),m=!0),!m){const M=this.rules.other.nextBulletRegex(E),D=this.rules.other.hrRegex(E),G=this.rules.other.fencesBeginRegex(E),X=this.rules.other.headingBeginRegex(E),K=this.rules.other.htmlBeginRegex(E);for(;i;){const se=i.split(`
81
+ `,1)[0];let re;if(x=se,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),re=x):re=x.replace(this.rules.other.tabCharGlobal," "),G.test(x)||X.test(x)||K.test(x)||M.test(x)||D.test(x))break;if(re.search(this.rules.other.nonSpaceChar)>=E||!x.trim())v+=`
82
+ `+re.slice(E);else{if(C||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||G.test(S)||X.test(S)||D.test(S))break;v+=`
83
+ `+x}!C&&!x.trim()&&(C=!0),d+=se+`
84
+ `,i=i.substring(se.length+1),S=re.slice(E)}}o.loose||(p?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(p=!0));let L=null,V;this.options.gfm&&(L=this.rules.other.listIsTask.exec(v),L&&(V=L[0]!=="[ ] ",v=v.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!L,checked:V,loose:!1,text:v,tokens:[]}),o.raw+=d}const h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let m=0;m<o.items.length;m++)if(this.lexer.state.top=!1,o.items[m].tokens=this.lexer.blockTokens(o.items[m].text,[]),!o.loose){const d=o.items[m].tokens.filter(S=>S.type==="space"),v=d.length>0&&d.some(S=>this.rules.other.anyLine.test(S.raw));o.loose=v}if(o.loose)for(let m=0;m<o.items.length;m++)o.items[m].loose=!0;return o}}html(i){const n=this.rules.block.html.exec(i);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(i){const n=this.rules.block.def.exec(i);if(n){const r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:s,title:o}}}table(i){var p;const n=this.rules.block.table.exec(i);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const r=am(n[1]),s=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(p=n[3])!=null&&p.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
85
+ `):[],f={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===s.length){for(const h of s)this.rules.other.tableAlignRight.test(h)?f.align.push("right"):this.rules.other.tableAlignCenter.test(h)?f.align.push("center"):this.rules.other.tableAlignLeft.test(h)?f.align.push("left"):f.align.push(null);for(let h=0;h<r.length;h++)f.header.push({text:r[h],tokens:this.lexer.inline(r[h]),header:!0,align:f.align[h]});for(const h of o)f.rows.push(am(h,f.header.length).map((m,d)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:f.align[d]})));return f}}lheading(i){const n=this.rules.block.lheading.exec(i);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(i){const n=this.rules.block.paragraph.exec(i);if(n){const r=n[1].charAt(n[1].length-1)===`
86
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(i){const n=this.rules.block.text.exec(i);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(i){const n=this.rules.inline.escape.exec(i);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(i){const n=this.rules.inline.tag.exec(i);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(i){const n=this.rules.inline.link.exec(i);if(n){const r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const f=fi(r.slice(0,-1),"\\");if((r.length-f.length)%2===0)return}else{const f=oN(n[2],"()");if(f===-2)return;if(f>-1){const h=(n[0].indexOf("!")===0?5:4)+n[1].length+f;n[2]=n[2].substring(0,f),n[0]=n[0].substring(0,h).trim(),n[3]=""}}let s=n[2],o="";if(this.options.pedantic){const f=this.rules.other.pedanticHrefTitle.exec(s);f&&(s=f[1],o=f[3])}else o=n[3]?n[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),nm(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(i,n){let r;if((r=this.rules.inline.reflink.exec(i))||(r=this.rules.inline.nolink.exec(i))){const s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=n[s.toLowerCase()];if(!o){const f=r[0].charAt(0);return{type:"text",raw:f,text:f}}return nm(r,o,r[0],this.lexer,this.rules)}}emStrong(i,n,r=""){let s=this.rules.inline.emStrongLDelim.exec(i);if(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const f=[...s[0]].length-1;let p,h,m=f,d=0;const v=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,n=n.slice(-1*i.length+f);(s=v.exec(n))!=null;){if(p=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!p)continue;if(h=[...p].length,s[3]||s[4]){m+=h;continue}else if((s[5]||s[6])&&f%3&&!((f+h)%3)){d+=h;continue}if(m-=h,m>0)continue;h=Math.min(h,h+m+d);const S=[...s[0]][0].length,x=i.slice(0,f+s.index+S+h);if(Math.min(f,h)%2){const E=x.slice(1,-1);return{type:"em",raw:x,text:E,tokens:this.lexer.inlineTokens(E)}}const C=x.slice(2,-2);return{type:"strong",raw:x,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(i){const n=this.rules.inline.code.exec(i);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(i){const n=this.rules.inline.br.exec(i);if(n)return{type:"br",raw:n[0]}}del(i){const n=this.rules.inline.del.exec(i);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(i){const n=this.rules.inline.autolink.exec(i);if(n){let r,s;return n[2]==="@"?(r=n[1],s="mailto:"+r):(r=n[1],s=r),{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(i){var r;let n;if(n=this.rules.inline.url.exec(i)){let s,o;if(n[2]==="@")s=n[0],o="mailto:"+s;else{let f;do f=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(f!==n[0]);s=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(i){const n=this.rules.inline.text.exec(i);if(n){const r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},pa=class Qo{constructor(n){Oe(this,"tokens");Oe(this,"options");Oe(this,"state");Oe(this,"tokenizer");Oe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=n||mn,this.options.tokenizer=this.options.tokenizer||new es,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:ut,block:qr.normal,inline:ci.normal};this.options.pedantic?(r.block=qr.pedantic,r.inline=ci.pedantic):this.options.gfm&&(r.block=qr.gfm,this.options.breaks?r.inline=ci.breaks:r.inline=ci.gfm),this.tokenizer.rules=r}static get rules(){return{block:qr,inline:ci}}static lex(n,r){return new Qo(r).lex(n)}static lexInline(n,r){return new Qo(r).inlineTokens(n)}lex(n){n=n.replace(ut.carriageReturn,`
87
+ `),this.blockTokens(n,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,r=[],s=!1){var o,f,p;for(this.options.pedantic&&(n=n.replace(ut.tabCharGlobal," ").replace(ut.spaceLine,""));n;){let h;if((f=(o=this.options.extensions)==null?void 0:o.block)!=null&&f.some(d=>(h=d.call({lexer:this},n,r))?(n=n.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(n)){n=n.substring(h.raw.length);const d=r.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
88
+ `:r.push(h);continue}if(h=this.tokenizer.code(n)){n=n.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
89
+ `+h.raw,d.text+=`
90
+ `+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(n)){n=n.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
91
+ `+h.raw,d.text+=`
92
+ `+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(n)){n=n.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(n)){n=n.substring(h.raw.length),r.push(h);continue}let m=n;if((p=this.options.extensions)!=null&&p.startBlock){let d=1/0;const v=n.slice(1);let S;this.options.extensions.startBlock.forEach(x=>{S=x.call({lexer:this},v),typeof S=="number"&&S>=0&&(d=Math.min(d,S))}),d<1/0&&d>=0&&(m=n.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(m))){const d=r.at(-1);s&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
93
+ `+h.raw,d.text+=`
94
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),s=m.length!==n.length,n=n.substring(h.raw.length);continue}if(h=this.tokenizer.text(n)){n=n.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
95
+ `+h.raw,d.text+=`
96
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(n){const d="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(n,r=[]){return this.inlineQueue.push({src:n,tokens:r}),r}inlineTokens(n,r=[]){var h,m,d;let s=n,o=null;if(this.tokens.links){const v=Object.keys(this.tokens.links);if(v.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)v.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let f=!1,p="";for(;n;){f||(p=""),f=!1;let v;if((m=(h=this.options.extensions)==null?void 0:h.inline)!=null&&m.some(x=>(v=x.call({lexer:this},n,r))?(n=n.substring(v.raw.length),r.push(v),!0):!1))continue;if(v=this.tokenizer.escape(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.tag(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.link(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(v.raw.length);const x=r.at(-1);v.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=v.raw,x.text+=v.text):r.push(v);continue}if(v=this.tokenizer.emStrong(n,s,p)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.codespan(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.br(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.del(n)){n=n.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.autolink(n)){n=n.substring(v.raw.length),r.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(n))){n=n.substring(v.raw.length),r.push(v);continue}let S=n;if((d=this.options.extensions)!=null&&d.startInline){let x=1/0;const C=n.slice(1);let E;this.options.extensions.startInline.forEach(L=>{E=L.call({lexer:this},C),typeof E=="number"&&E>=0&&(x=Math.min(x,E))}),x<1/0&&x>=0&&(S=n.substring(0,x+1))}if(v=this.tokenizer.inlineText(S)){n=n.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(p=v.raw.slice(-1)),f=!0;const x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=v.raw,x.text+=v.text):r.push(v);continue}if(n){const x="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},ts=class{constructor(i){Oe(this,"options");Oe(this,"parser");this.options=i||mn}space(i){return""}code({text:i,lang:n,escaped:r}){var f;const s=(f=(n||"").match(ut.notSpaceStart))==null?void 0:f[0],o=i.replace(ut.endingNewline,"")+`
97
+ `;return s?'<pre><code class="language-'+Pt(s)+'">'+(r?o:Pt(o,!0))+`</code></pre>
98
+ `:"<pre><code>"+(r?o:Pt(o,!0))+`</code></pre>
99
+ `}blockquote({tokens:i}){return`<blockquote>
100
+ ${this.parser.parse(i)}</blockquote>
101
+ `}html({text:i}){return i}heading({tokens:i,depth:n}){return`<h${n}>${this.parser.parseInline(i)}</h${n}>
102
+ `}hr(i){return`<hr>
103
+ `}list(i){const n=i.ordered,r=i.start;let s="";for(let p=0;p<i.items.length;p++){const h=i.items[p];s+=this.listitem(h)}const o=n?"ol":"ul",f=n&&r!==1?' start="'+r+'"':"";return"<"+o+f+`>
104
+ `+s+"</"+o+`>
105
+ `}listitem(i){var r;let n="";if(i.task){const s=this.checkbox({checked:!!i.checked});i.loose?((r=i.tokens[0])==null?void 0:r.type)==="paragraph"?(i.tokens[0].text=s+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=s+" "+Pt(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):n+=s+" "}return n+=this.parser.parse(i.tokens,!!i.loose),`<li>${n}</li>
106
+ `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
107
+ `}table(i){let n="",r="";for(let o=0;o<i.header.length;o++)r+=this.tablecell(i.header[o]);n+=this.tablerow({text:r});let s="";for(let o=0;o<i.rows.length;o++){const f=i.rows[o];r="";for(let p=0;p<f.length;p++)r+=this.tablecell(f[p]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
152
108
  <thead>
153
109
  `+n+`</thead>
154
- `+a+`</table>
155
- `}tablerow({text:t}){return`<tr>
156
- ${t}</tr>
157
- `}tablecell(t){const n=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+n+`</${i}>
158
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Sn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:i}){const a=this.parser.parseInline(i),l=Tv(t);if(l===null)return a;t=l;let u='<a href="'+t+'"';return n&&(u+=' title="'+Sn(n)+'"'),u+=">"+a+"</a>",u}image({href:t,title:n,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));const l=Tv(t);if(l===null)return Sn(i);t=l;let u=`<img src="${t}" alt="${i}"`;return n&&(u+=` title="${Sn(n)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Sn(t.text)}},Xd=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Vn=class fd{constructor(n){w(this,"options");w(this,"renderer");w(this,"textRenderer");this.options=n||ir,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xd}static parse(n,i){return new fd(i).parse(n)}static parseInline(n,i){return new fd(i).parseInline(n)}parse(n,i=!0){var l,u;let a="";for(let f=0;f<n.length;f++){const d=n[f];if((u=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&u[d.type]){const p=d,g=this.options.extensions.renderers[p.type].call({parser:this},p);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)){a+=g||"";continue}}const m=d;switch(m.type){case"space":{a+=this.renderer.space(m);continue}case"hr":{a+=this.renderer.hr(m);continue}case"heading":{a+=this.renderer.heading(m);continue}case"code":{a+=this.renderer.code(m);continue}case"table":{a+=this.renderer.table(m);continue}case"blockquote":{a+=this.renderer.blockquote(m);continue}case"list":{a+=this.renderer.list(m);continue}case"html":{a+=this.renderer.html(m);continue}case"paragraph":{a+=this.renderer.paragraph(m);continue}case"text":{let p=m,g=this.renderer.text(p);for(;f+1<n.length&&n[f+1].type==="text";)p=n[++f],g+=`
159
- `+this.renderer.text(p);i?a+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):a+=g;continue}default:{const p='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return a}parseInline(n,i=this.renderer){var l,u;let a="";for(let f=0;f<n.length;f++){const d=n[f];if((u=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&u[d.type]){const p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(d.type)){a+=p||"";continue}}const m=d;switch(m.type){case"escape":{a+=i.text(m);break}case"html":{a+=i.html(m);break}case"link":{a+=i.link(m);break}case"image":{a+=i.image(m);break}case"strong":{a+=i.strong(m);break}case"em":{a+=i.em(m);break}case"codespan":{a+=i.codespan(m);break}case"br":{a+=i.br(m);break}case"del":{a+=i.del(m);break}case"text":{a+=i.text(m);break}default:{const p='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return a}},zf,vo=(zf=class{constructor(t){w(this,"options");w(this,"block");this.options=t||ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Kn.lex:Kn.lexInline}provideParser(){return this.block?Vn.parse:Vn.parseInline}},w(zf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),zf),S3=class{constructor(...t){w(this,"defaults",Hd());w(this,"options",this.setOptions);w(this,"parse",this.parseMarkdown(!0));w(this,"parseInline",this.parseMarkdown(!1));w(this,"Parser",Vn);w(this,"Renderer",Lo);w(this,"TextRenderer",Xd);w(this,"Lexer",Kn);w(this,"Tokenizer",Mo);w(this,"Hooks",vo);this.use(...t)}walkTokens(t,n){var a,l;let i=[];for(const u of t)switch(i=i.concat(n.call(this,u)),u.type){case"table":{const f=u;for(const d of f.header)i=i.concat(this.walkTokens(d.tokens,n));for(const d of f.rows)for(const m of d)i=i.concat(this.walkTokens(m.tokens,n));break}case"list":{const f=u;i=i.concat(this.walkTokens(f.items,n));break}default:{const f=u;(l=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&l[f.type]?this.defaults.extensions.childTokens[f.type].forEach(d=>{const m=f[d].flat(1/0);i=i.concat(this.walkTokens(m,n))}):f.tokens&&(i=i.concat(this.walkTokens(f.tokens,n)))}}return i}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){const u=n.renderers[l.name];u?n.renderers[l.name]=function(...f){let d=l.renderer.apply(this,f);return d===!1&&(d=u.apply(this,f)),d}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const u=n[l.level];u?u.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),a.extensions=n),i.renderer){const l=this.defaults.renderer||new Lo(this.defaults);for(const u in i.renderer){if(!(u in l))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;const f=u,d=i.renderer[f],m=l[f];l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g||""}}a.renderer=l}if(i.tokenizer){const l=this.defaults.tokenizer||new Mo(this.defaults);for(const u in i.tokenizer){if(!(u in l))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;const f=u,d=i.tokenizer[f],m=l[f];l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g}}a.tokenizer=l}if(i.hooks){const l=this.defaults.hooks||new vo;for(const u in i.hooks){if(!(u in l))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;const f=u,d=i.hooks[f],m=l[f];vo.passThroughHooks.has(u)?l[f]=p=>{if(this.defaults.async)return Promise.resolve(d.call(l,p)).then(v=>m.call(l,v));const g=d.call(l,p);return m.call(l,g)}:l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g}}a.hooks=l}if(i.walkTokens){const l=this.defaults.walkTokens,u=i.walkTokens;a.walkTokens=function(f){let d=[];return d.push(u.call(this,f)),l&&(d=d.concat(l.call(this,f))),d}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Kn.lex(t,n??this.defaults)}parser(t,n){return Vn.parse(t,n??this.defaults)}parseMarkdown(t){return(i,a)=>{const l={...a},u={...this.defaults,...l},f=this.onError(!!u.silent,!!u.async);if(this.defaults.async===!0&&l.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));u.hooks&&(u.hooks.options=u,u.hooks.block=t);const d=u.hooks?u.hooks.provideLexer():t?Kn.lex:Kn.lexInline,m=u.hooks?u.hooks.provideParser():t?Vn.parse:Vn.parseInline;if(u.async)return Promise.resolve(u.hooks?u.hooks.preprocess(i):i).then(p=>d(p,u)).then(p=>u.hooks?u.hooks.processAllTokens(p):p).then(p=>u.walkTokens?Promise.all(this.walkTokens(p,u.walkTokens)).then(()=>p):p).then(p=>m(p,u)).then(p=>u.hooks?u.hooks.postprocess(p):p).catch(f);try{u.hooks&&(i=u.hooks.preprocess(i));let p=d(i,u);u.hooks&&(p=u.hooks.processAllTokens(p)),u.walkTokens&&this.walkTokens(p,u.walkTokens);let g=m(p,u);return u.hooks&&(g=u.hooks.postprocess(g)),g}catch(p){return f(p)}}}onError(t,n){return i=>{if(i.message+=`
160
- Please report this to https://github.com/markedjs/marked.`,t){const a="<p>An error occurred:</p><pre>"+Sn(i.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(i);throw i}}},Pi=new S3;function Oe(t,n){return Pi.parse(t,n)}Oe.options=Oe.setOptions=function(t){return Pi.setOptions(t),Oe.defaults=Pi.defaults,ox(Oe.defaults),Oe};Oe.getDefaults=Hd;Oe.defaults=ir;Oe.use=function(...t){return Pi.use(...t),Oe.defaults=Pi.defaults,ox(Oe.defaults),Oe};Oe.walkTokens=function(t,n){return Pi.walkTokens(t,n)};Oe.parseInline=Pi.parseInline;Oe.Parser=Vn;Oe.parser=Vn.parse;Oe.Renderer=Lo;Oe.TextRenderer=Xd;Oe.Lexer=Kn;Oe.lexer=Kn.lex;Oe.Tokenizer=Mo;Oe.Hooks=vo;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;Vn.parse;Kn.lex;function w3(t){if(!t)return"";try{return Oe.parse(t,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),t}}function qs({content:t,title:n,variant:i="default",className:a="",children:l}){const u=["Explanation",`Explanation-${i}`,a].filter(Boolean).join(" ");return S.jsxs("div",{className:u,children:[n&&S.jsx("h3",{className:"Explanation-title",children:n}),S.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:w3(t)}}),l]})}function N3({isOpen:t,title:n,message:i,confirmLabel:a,cancelLabel:l,onConfirm:u,onCancel:f}){const{t:d}=Ct(),[m,p]=A.useState(!0);if(!t)return null;const g=async()=>{await u({withSampleData:m})},v=b=>{b.key==="Escape"&&f()};return S.jsxs("div",{className:"ConfirmDialog",children:[S.jsx("div",{className:"ConfirmDialog-backdrop",onClick:f,onKeyDown:v,tabIndex:0,role:"button","aria-label":"Close dialog"}),S.jsxs("div",{className:"ConfirmDialog-container",children:[S.jsx("div",{className:"ConfirmDialog-header",children:S.jsx("h3",{className:"ConfirmDialog-title",children:n})}),S.jsxs("div",{className:"ConfirmDialog-body",children:[S.jsx("p",{children:i}),S.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:S.jsxs("label",{children:[S.jsx("input",{type:"checkbox",checked:m,onChange:b=>p(b.target.checked)}),S.jsx("span",{className:"ml-2",children:d("generateSiteWithData")})]})})]}),S.jsxs("div",{className:"ConfirmDialog-footer",children:[S.jsx(Nt,{onClick:f,severity:"secondary",className:"ConfirmDialog-button",children:l||d("cancel")}),S.jsx(Nt,{onClick:g,className:"ConfirmDialog-button",children:a||d("confirm")})]})]})]})}function _(){return _=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)({}).hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},_.apply(null,arguments)}function we(t,n){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(n.indexOf(a)!==-1)continue;i[a]=t[a]}return i}var bx={},xx=A.createContext(bx),k3=(t,n)=>_({},t,n),R3=()=>A.useContext(xx),Pd=A.createContext(()=>{});Pd.displayName="JVR.DispatchShowTools";function E3(){return A.useReducer(k3,bx)}function Sx(){return A.useContext(Pd)}var wx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(xx.Provider,{value:n,children:S.jsx(Pd.Provider,{value:i,children:a})})};wx.displayName="JVR.ShowTools";var Nx={},kx=A.createContext(Nx),A3=(t,n)=>_({},t,n),Xo=()=>A.useContext(kx),Wd=A.createContext(()=>{});Wd.displayName="JVR.DispatchExpands";function $3(){return A.useReducer(A3,Nx)}function C3(){return A.useContext(Wd)}var Rx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(kx.Provider,{value:n,children:S.jsx(Wd.Provider,{value:i,children:a})})};Rx.displayName="JVR.Expands";var Ex={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Ax=A.createContext(Ex),T3=(t,n)=>_({},t,n),Ve=()=>A.useContext(Ax),eh=A.createContext(()=>{});eh.displayName="JVR.DispatchTypes";function O3(){return A.useReducer(T3,Ex)}function j3(){return A.useContext(eh)}function $x(t){var{initial:n,dispatch:i,children:a}=t;return S.jsx(Ax.Provider,{value:n,children:S.jsx(eh.Provider,{value:i,children:a})})}$x.displayName="JVR.Types";var D3=["style"];function Cx(t){var{style:n}=t,i=we(t,D3),a=_({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return S.jsx("svg",_({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:a},i,{children:S.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Cx.displayName="JVR.TriangleArrow";var Tx={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:S.jsx(Cx,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},Ox=A.createContext(Tx),M3=(t,n)=>_({},t,n),zt=()=>A.useContext(Ox),th=A.createContext(()=>{});th.displayName="JVR.DispatchSymbols";function L3(){return A.useReducer(M3,Tx)}function z3(){return A.useContext(th)}var jx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(Ox.Provider,{value:n,children:S.jsx(th.Provider,{value:i,children:a})})};jx.displayName="JVR.Symbols";var Dx={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},Mx=A.createContext(Dx),U3=(t,n)=>_({},t,n),ln=()=>A.useContext(Mx),nh=A.createContext(()=>{});nh.displayName="JVR.DispatchSection";function B3(){return A.useReducer(U3,Dx)}function _3(){return A.useContext(nh)}var Lx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(Mx.Provider,{value:n,children:S.jsx(nh.Provider,{value:i,children:a})})};Lx.displayName="JVR.Section";var zx={objectSortKeys:!1,indentWidth:15},ih=A.createContext(zx);ih.displayName="JVR.Context";var Ux=A.createContext(()=>{});Ux.displayName="JVR.DispatchContext";function q3(t,n){return _({},t,n)}var rr=()=>A.useContext(ih),Bx=t=>{var{children:n,initialState:i,initialTypes:a}=t,[l,u]=A.useReducer(q3,Object.assign({},zx,i)),[f,d]=E3(),[m,p]=$3(),[g,v]=O3(),[b,k]=L3(),[N,T]=B3();return A.useEffect(()=>u(_({},i)),[i]),S.jsx(ih.Provider,{value:l,children:S.jsx(Ux.Provider,{value:u,children:S.jsx(wx,{initial:f,dispatch:d,children:S.jsx(Rx,{initial:m,dispatch:p,children:S.jsx($x,{initial:_({},g,a),dispatch:v,children:S.jsx(jx,{initial:b,dispatch:k,children:S.jsx(Lx,{initial:N,dispatch:T,children:n})})})})})})})};Bx.displayName="JVR.Provider";function K3(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var V3=["isNumber","value","parentValue","keyName","keys"],H3=["as","render"],G3=["as","render"],J3=["as","render"],Y3=["as","style","render"],I3=["as","render"],Z3=["as","render"],Q3=["as","render"],F3=["as","render"],dd=t=>{var{Quote:n={}}=zt(),{isNumber:i,value:a,parentValue:l,keyName:u,keys:f}=t,d=we(t,V3);if(i)return null;var{as:m,render:p}=n,g=we(n,H3),v=m||"span",b=_({},d,g),k={value:a,parentValue:l,keyName:u,keys:f||(u?[u]:[])},N=p&&typeof p=="function"&&p(b,k);return N||S.jsx(v,_({},b))};dd.displayName="JVR.Quote";var Es=t=>{var{ValueQuote:n={}}=zt(),i=_({},(K3(t),t)),{as:a,render:l}=n,u=we(n,G3),f=a||"span",d=_({},i,u),m=l&&typeof l=="function"&&l(d,{});return m||S.jsx(f,_({},d))};Es.displayName="JVR.ValueQuote";var _x=t=>{var{value:n,parentValue:i,keyName:a,keys:l}=t,{Colon:u={}}=zt(),{as:f,render:d}=u,m=we(u,J3),p=f||"span",g=d&&typeof d=="function"&&d(m,{value:n,parentValue:i,keyName:a,keys:l||(a?[a]:[])});return g||S.jsx(p,_({},m))};_x.displayName="JVR.Colon";var qx=t=>{var{Arrow:n={}}=zt(),i=Xo(),{expandKey:a,style:l,value:u,parentValue:f,keyName:d,keys:m}=t,p=!!i[a],{as:g,style:v,render:b}=n,k=we(n,Y3),N=g||"span",T=b&&typeof b=="function",U=_({},k,{"data-expanded":p,style:_({},v,l)}),M={value:u,parentValue:f,keyName:d,keys:m||(d?[d]:[])},z=T&&b(U,M);return z||S.jsx(N,_({},k,{style:_({},v,l)}))};qx.displayName="JVR.Arrow";var Kx=t=>{var{isBrackets:n,value:i,parentValue:a,keyName:l,keys:u}=t,{BracketsLeft:f={},BraceLeft:d={}}=zt(),m={value:i,parentValue:a,keyName:l,keys:u||(l?[l]:[])};if(n){var{as:p,render:g}=f,v=we(f,I3),b=p||"span",k=g&&typeof g=="function"&&g(v,m);return k||S.jsx(b,_({},v))}var{as:N,render:T}=d,U=we(d,Z3),M=N||"span",z=T&&typeof T=="function"&&T(U,m);return z||S.jsx(M,_({},U))};Kx.displayName="JVR.BracketsOpen";var rh=t=>{var{isBrackets:n,isVisiable:i,value:a,parentValue:l,keyName:u,keys:f}=t,d={value:a,parentValue:l,keyName:u,keys:f||(u?[u]:[])};if(!i)return null;var{BracketsRight:m={},BraceRight:p={}}=zt();if(n){var{as:g,render:v}=m,b=we(m,Q3),k=g||"span",N=v&&typeof v=="function"&&v(b,d);return N||S.jsx(k,_({},b))}var{as:T,render:U}=p,M=we(p,F3),z=T||"span",G=U&&typeof U=="function"&&U(M,d);return G||S.jsx(z,_({},M))};rh.displayName="JVR.BracketsClose";var Vx=t=>{var n,{value:i,expandKey:a,level:l,keys:u=[]}=t,f=Xo(),d=Array.isArray(i),{collapsed:m,shouldExpandNodeInitially:p}=rr(),g=i instanceof Set,v=typeof m=="boolean"?m:typeof m=="number"?l>m:!1,b=(n=f[a])!=null?n:v,k=Object.keys(i).length,N=p&&p(!b,{value:i,keys:u,level:l});if(f[a]===void 0&&p&&!N||b||k===0)return null;var T={paddingLeft:4};return S.jsx("div",{style:T,children:S.jsx(rh,{isBrackets:d||g,isVisiable:!0})})};Vx.displayName="JVR.NestedClose";var X3=["as","render"],P3=["as","render"],W3=["as","render"],eD=["as","render"],tD=["as","render"],nD=["as","render"],iD=["as","render"],rD=["as","render"],aD=["as","render"],sD=["as","render"],lD=["as","render"],oD=["as","render"],uD=["as","render"],hd=t=>{if(t===void 0)return"0n";if(typeof t=="string")try{t=BigInt(t)}catch{return"0n"}return t?t.toString()+"n":"0n"},Hx=t=>{var{value:n,keyName:i}=t,{Set:a={},displayDataTypes:l}=Ve(),u=n instanceof Set;if(!u||!l)return null;var{as:f,render:d}=a,m=we(a,X3),p=d&&typeof d=="function",g=p&&d(m,{type:"type",value:n,keyName:i});if(g)return g;var v=f||"span";return S.jsx(v,_({},m))};Hx.displayName="JVR.SetComp";var Gx=t=>{var{value:n,keyName:i}=t,{Map:a={},displayDataTypes:l}=Ve(),u=n instanceof Map;if(!u||!l)return null;var{as:f,render:d}=a,m=we(a,P3),p=d&&typeof d=="function",g=p&&d(m,{type:"type",value:n,keyName:i});if(g)return g;var v=f||"span";return S.jsx(v,_({},m))};Gx.displayName="JVR.MapComp";var pn={opacity:.75,paddingRight:4},Jx=t=>{var{children:n="",keyName:i}=t,{Str:a={},displayDataTypes:l}=Ve(),{shortenTextAfterLength:u=30,stringEllipsis:f="..."}=rr(),{as:d,render:m}=a,p=we(a,W3),g=n,[v,b]=A.useState(u&&g.length>u);A.useEffect(()=>b(u&&g.length>u),[u]);var k=d||"span",N=_({},pn,a.style||{});u>0&&(p.style=_({},p.style,{cursor:g.length<=u?"initial":"pointer"}),g.length>u&&(p.onClick=()=>{b(!v)}));var T=v?""+g.slice(0,u)+f:g,U=m&&typeof m=="function",M=U&&m(_({},p,{style:N}),{type:"type",value:n,keyName:i}),z=v?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=U&&m(_({},p,{children:T,className:z}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(M||S.jsx(k,_({},p,{style:N}))),G||S.jsxs(A.Fragment,{children:[S.jsx(Es,{}),S.jsx(k,_({},p,{className:z,children:T})),S.jsx(Es,{})]})]})};Jx.displayName="JVR.TypeString";var Yx=t=>{var{children:n,keyName:i}=t,{True:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,eD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Yx.displayName="JVR.TypeTrue";var Ix=t=>{var{children:n,keyName:i}=t,{False:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,tD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Ix.displayName="JVR.TypeFalse";var Zx=t=>{var{children:n,keyName:i}=t,{Float:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,nD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Zx.displayName="JVR.TypeFloat";var Qx=t=>{var{children:n,keyName:i}=t,{Int:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,iD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Qx.displayName="JVR.TypeInt";var Fx=t=>{var{children:n,keyName:i}=t,{Bigint:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,rD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:hd(n==null?void 0:n.toString())}))]})};Fx.displayName="JVR.TypeFloat";var Xx=t=>{var{children:n,keyName:i}=t,{Url:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,aD),m=u||"span",p=_({},pn,a.style),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsxs("a",_({href:n==null?void 0:n.href,target:"_blank"},d,{className:"w-rjv-value",children:[S.jsx(Es,{}),n==null?void 0:n.href,S.jsx(Es,{})]}))]})};Xx.displayName="JVR.TypeUrl";var Px=t=>{var{children:n,keyName:i}=t,{Date:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,sD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=n instanceof Date?n.toLocaleString():n,k=g&&f(_({},d,{children:b,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),k||S.jsx(m,_({},d,{className:"w-rjv-value",children:b}))]})};Px.displayName="JVR.TypeDate";var Wx=t=>{var{children:n,keyName:i}=t,{Undefined:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,lD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};Wx.displayName="JVR.TypeUndefined";var eS=t=>{var{children:n,keyName:i}=t,{Null:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,oD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};eS.displayName="JVR.TypeNull";var tS=t=>{var{children:n,keyName:i}=t,{Nan:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,uD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};tS.displayName="JVR.TypeNan";var cD=t=>Number(t)===t&&t%1!==0||isNaN(t),nS=t=>{var{value:n,keyName:i}=t,a={keyName:i};return n instanceof URL?S.jsx(Xx,_({},a,{children:n})):typeof n=="string"?S.jsx(Jx,_({},a,{children:n})):n===!0?S.jsx(Yx,_({},a,{children:n})):n===!1?S.jsx(Ix,_({},a,{children:n})):n===null?S.jsx(eS,_({},a,{children:n})):n===void 0?S.jsx(Wx,_({},a,{children:n})):n instanceof Date?S.jsx(Px,_({},a,{children:n})):typeof n=="number"&&isNaN(n)?S.jsx(tS,_({},a,{children:n})):typeof n=="number"&&cD(n)?S.jsx(Zx,_({},a,{children:n})):typeof n=="bigint"?S.jsx(Fx,_({},a,{children:n})):typeof n=="number"?S.jsx(Qx,_({},a,{children:n})):null};nS.displayName="JVR.Value";function Ai(t,n,i){var a=z3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}function Zt(t,n,i){var a=j3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}function ua(t,n,i){var a=_3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}var fD=["as","render"],iS=t=>{var{KeyName:n={}}=ln();return ua(n,t,"KeyName"),null};iS.displayName="JVR.KeyName";var rS=t=>{var{children:n,value:i,parentValue:a,keyName:l,keys:u}=t,f=typeof n=="number",d={color:f?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=ln(),{as:p,render:g}=m,v=we(m,fD);v.style=_({},v.style,d);var b=p||"span",k=g&&typeof g=="function"&&g(_({},v,{children:n}),{value:i,parentValue:a,keyName:l,keys:u||(l?[l]:[])});return k||S.jsx(b,_({},v,{children:n}))};rS.displayName="JVR.KeyNameComp";var dD=["children","value","parentValue","keyName","keys"],hD=["as","render","children"],aS=t=>{var{Row:n={}}=ln();return ua(n,t,"Row"),null};aS.displayName="JVR.Row";var sS=t=>{var{children:n,value:i,parentValue:a,keyName:l,keys:u}=t,f=we(t,dD),{Row:d={}}=ln(),{as:m,render:p}=d,g=we(d,hD),v=m||"div",b=p&&typeof p=="function"&&p(_({},f,g,{children:n}),{value:i,keyName:l,parentValue:a,keys:u});return b||S.jsx(v,_({},f,g,{children:n}))};sS.displayName="JVR.RowComp";function pD(t){var n=A.useRef();return A.useEffect(()=>{n.current=t}),n.current}function mD(t){var{value:n,highlightUpdates:i,highlightContainer:a}=t,l=pD(n),u=A.useMemo(()=>{if(!i||l===void 0)return!1;if(typeof n!=typeof l)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(l)?!1:n!==l;if(Array.isArray(n)!==Array.isArray(l))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==l)return!0},[i,n]);A.useEffect(()=>{a&&a.current&&u&&"animate"in a.current&&a.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[u,n,a])}var gD=["keyName","value","parentValue","expandKey","keys"],yD=["as","render"],ah=t=>{var{keyName:n,value:i,parentValue:a,expandKey:l,keys:u}=t,f=we(t,gD),{onCopied:d,enableClipboard:m}=rr(),p=R3(),g=p[l],[v,b]=A.useState(!1),{Copied:k={}}=ln();if(m===!1||!g)return null;var N=F=>{F.stopPropagation();var he="";typeof i=="number"&&i===1/0?he="Infinity":typeof i=="number"&&isNaN(i)?he="NaN":typeof i=="bigint"?he=hd(i):i instanceof Date?he=i.toLocaleString():he=JSON.stringify(i,(re,ee)=>typeof ee=="bigint"?hd(ee):ee,2),d&&d(he,i),b(!0);var fe=navigator.clipboard||{writeText(re){return new Promise((ee,oe)=>{var xe=document.createElement("textarea");xe.style.position="absolute",xe.style.opacity="0",xe.style.left="-99999999px",xe.value=re,document.body.appendChild(xe),xe.select(),document.execCommand("copy")?ee():oe(),xe.remove()})}};fe.writeText(he).then(()=>{var re=setTimeout(()=>{b(!1),clearTimeout(re)},3e3)}).catch(re=>{})},T={style:{display:"inline-flex"},fill:v?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:N},{render:U}=k,M=we(k,yD),z=_({},M,f,T,{style:_({},M.style,f.style,T.style)}),G=U&&typeof U=="function",X=G&&U(_({},z,{"data-copied":v}),{value:i,keyName:n,keys:u,parentValue:a});return X||(v?S.jsx("svg",_({viewBox:"0 0 32 36"},z,{children:S.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):S.jsx("svg",_({viewBox:"0 0 32 36"},z,{children:S.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};ah.displayName="JVR.Copied";function lS(){var t=A.useRef(null);return t.current===null&&(t.current="custom-id-"+Math.random().toString(36).substr(2,9)),t.current}var oS=t=>{var n,{value:i,expandKey:a="",level:l,keys:u=[]}=t,f=Xo(),{objectSortKeys:d,indentWidth:m,collapsed:p,shouldExpandNodeInitially:g}=rr(),v=Array.isArray(i),b=typeof p=="boolean"?p:typeof p=="number"?l>p:!1,k=(n=f[a])!=null?n:b,N=g&&g(!k,{value:i,keys:u,level:l});if(f[a]===void 0&&g&&!N||k)return null;var T=v?Object.entries(i).map(M=>[Number(M[0]),M[1]]):Object.entries(i);d&&(T=d===!0?T.sort((M,z)=>{var[G]=M,[X]=z;return typeof G=="string"&&typeof X=="string"?G.localeCompare(X):0}):T.sort((M,z)=>{var[G,X]=M,[F,he]=z;return typeof G=="string"&&typeof F=="string"?d(G,F,X,he):0}));var U={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return S.jsx("div",{className:"w-rjv-wrap",style:U,children:T.map((M,z)=>{var[G,X]=M;return S.jsx(uS,{parentValue:i,keyName:G,keys:[...u,G],value:X,level:l},z)})})};oS.displayName="JVR.KeyValues";var sh=t=>{var{keyName:n,parentValue:i,keys:a,value:l}=t,{highlightUpdates:u}=rr(),f=typeof n=="number",d=A.useRef(null);mD({value:l,highlightUpdates:u,highlightContainer:d});var m={keyName:n,value:l,keys:a,parentValue:i};return S.jsxs(A.Fragment,{children:[S.jsxs("span",{ref:d,children:[S.jsx(dd,_({isNumber:f,"data-placement":"left"},m)),S.jsx(rS,_({},m,{children:n})),S.jsx(dd,_({isNumber:f,"data-placement":"right"},m))]}),S.jsx(_x,_({},m))]})};sh.displayName="JVR.KayName";var uS=t=>{var{keyName:n,value:i,parentValue:a,level:l=0,keys:u=[]}=t,f=Sx(),d=lS(),m=Array.isArray(i),p=i instanceof Set,g=i instanceof Map,v=i instanceof Date,b=i instanceof URL,k=i&&typeof i=="object"&&!m&&!p&&!g&&!v&&!b,N=k||m||p||g;if(N){var T=p?Array.from(i):g?Object.fromEntries(i):i;return S.jsx(lh,{keyName:n,value:T,parentValue:a,initialValue:i,keys:u,level:l+1})}var U={onMouseEnter:()=>f({[d]:!0}),onMouseLeave:()=>f({[d]:!1})};return S.jsxs(sS,_({className:"w-rjv-line",value:i,keyName:n,keys:u,parentValue:a},U,{children:[S.jsx(sh,{keyName:n,value:i,keys:u,parentValue:a}),S.jsx(nS,{keyName:n,value:i}),S.jsx(ah,{keyName:n,value:i,keys:u,parentValue:a,expandKey:d})]}))};uS.displayName="JVR.KeyValuesItem";var vD=["value","keyName"],bD=["as","render"],cS=t=>{var{CountInfoExtra:n={}}=ln();return ua(n,t,"CountInfoExtra"),null};cS.displayName="JVR.CountInfoExtra";var fS=t=>{var{value:n={},keyName:i}=t,a=we(t,vD),{CountInfoExtra:l={}}=ln(),{as:u,render:f}=l,d=we(l,bD);if(!f&&!d.children)return null;var m=u||"span",p=f&&typeof f=="function",g=_({},d,a),v=p&&f(g,{value:n,keyName:i});return v||S.jsx(m,_({},g))};fS.displayName="JVR.CountInfoExtraComps";var xD=["value","keyName"],SD=["as","render"],dS=t=>{var{CountInfo:n={}}=ln();return ua(n,t,"CountInfo"),null};dS.displayName="JVR.CountInfo";var hS=t=>{var{value:n={},keyName:i}=t,a=we(t,xD),{displayObjectSize:l}=rr(),{CountInfo:u={}}=ln();if(!l)return null;var{as:f,render:d}=u,m=we(u,SD),p=f||"span";m.style=_({},m.style,t.style);var g=Object.keys(n).length;m.children||(m.children=g+" item"+(g===1?"":"s"));var v=_({},m,a),b=d&&typeof d=="function",k=b&&d(_({},v,{"data-length":g}),{value:n,keyName:i});return k||S.jsx(p,_({},v))};hS.displayName="JVR.CountInfoComp";var wD=["as","render"],pS=t=>{var{Ellipsis:n={}}=ln();return ua(n,t,"Ellipsis"),null};pS.displayName="JVR.Ellipsis";var mS=t=>{var{isExpanded:n,value:i,keyName:a}=t,{Ellipsis:l={}}=ln(),{as:u,render:f}=l,d=we(l,wD),m=u||"span",p=f&&typeof f=="function"&&f(_({},d,{"data-expanded":n}),{value:i,keyName:a});return p||(!n||typeof i=="object"&&Object.keys(i).length==0?null:S.jsx(m,_({},d)))};mS.displayName="JVR.EllipsisComp";var gS=t=>{var n,{keyName:i,expandKey:a,keys:l=[],initialValue:u,value:f,parentValue:d,level:m}=t,p=Xo(),g=C3(),{onExpand:v,collapsed:b,shouldExpandNodeInitially:k}=rr(),N=Array.isArray(f),T=f instanceof Set,U=typeof b=="boolean"?b:typeof b=="number"?m>b:!1,M=typeof f=="object",z=(n=p[a])!=null?n:U,G=k&&k(!z,{value:f,keys:l,level:m});p[a]===void 0&&k&&!G&&(z=!G);var X=()=>{var xe={expand:!z,value:f,keyid:a,keyName:i};v&&v(xe),g({[a]:xe.expand})},F={display:"inline-flex",alignItems:"center"},he={transform:"rotate("+(z?"-90":"0")+"deg)",transition:"all 0.3s"},fe=Object.keys(f).length,re=fe!==0&&(N||T||M),ee={style:F};re&&(ee.onClick=X);var oe={keyName:i,value:f,keys:l,parentValue:d};return S.jsxs("span",_({},ee,{children:[re&&S.jsx(qx,_({style:he,expandKey:a},oe)),(i||typeof i=="number")&&S.jsx(sh,_({},oe)),S.jsx(Hx,{value:u,keyName:i}),S.jsx(Gx,{value:u,keyName:i}),S.jsx(Kx,_({isBrackets:N||T},oe)),S.jsx(mS,{keyName:i,value:f,isExpanded:z}),S.jsx(rh,_({isVisiable:z||!re,isBrackets:N||T},oe)),S.jsx(hS,{value:f,keyName:i}),S.jsx(fS,{value:f,keyName:i}),S.jsx(ah,{keyName:i,value:f,expandKey:a,parentValue:d,keys:l})]}))};gS.displayName="JVR.NestedOpen";var ND=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],lh=A.forwardRef((t,n)=>{var{className:i="",parentValue:a,level:l=1,value:u,initialValue:f,keys:d,keyName:m}=t,p=we(t,ND),g=Sx(),v=lS(),b=[i,"w-rjv-inner"].filter(Boolean).join(" "),k={onMouseEnter:()=>g({[v]:!0}),onMouseLeave:()=>g({[v]:!1})};return S.jsxs("div",_({className:b,ref:n},p,k,{children:[S.jsx(gS,{expandKey:v,value:u,level:l,keys:d,parentValue:a,keyName:m,initialValue:f}),S.jsx(oS,{expandKey:v,value:u,level:l,keys:d,parentValue:a,keyName:m}),S.jsx(Vx,{expandKey:v,value:u,level:l,keys:d})]}))});lh.displayName="JVR.Container";var yS=t=>{var{BraceLeft:n={}}=zt();return Ai(n,t,"BraceLeft"),null};yS.displayName="JVR.BraceLeft";var vS=t=>{var{BraceRight:n={}}=zt();return Ai(n,t,"BraceRight"),null};vS.displayName="JVR.BraceRight";var bS=t=>{var{BracketsLeft:n={}}=zt();return Ai(n,t,"BracketsLeft"),null};bS.displayName="JVR.BracketsLeft";var xS=t=>{var{BracketsRight:n={}}=zt();return Ai(n,t,"BracketsRight"),null};xS.displayName="JVR.BracketsRight";var SS=t=>{var{Arrow:n={}}=zt();return Ai(n,t,"Arrow"),null};SS.displayName="JVR.Arrow";var wS=t=>{var{Colon:n={}}=zt();return Ai(n,t,"Colon"),null};wS.displayName="JVR.Colon";var NS=t=>{var{Quote:n={}}=zt();return Ai(n,t,"Quote"),null};NS.displayName="JVR.Quote";var kS=t=>{var{ValueQuote:n={}}=zt();return Ai(n,t,"ValueQuote"),null};kS.displayName="JVR.ValueQuote";var RS=t=>{var{Bigint:n={}}=Ve();return Zt(n,t,"Bigint"),null};RS.displayName="JVR.Bigint";var ES=t=>{var{Date:n={}}=Ve();return Zt(n,t,"Date"),null};ES.displayName="JVR.Date";var AS=t=>{var{False:n={}}=Ve();return Zt(n,t,"False"),null};AS.displayName="JVR.False";var $S=t=>{var{Float:n={}}=Ve();return Zt(n,t,"Float"),null};$S.displayName="JVR.Float";var CS=t=>{var{Int:n={}}=Ve();return Zt(n,t,"Int"),null};CS.displayName="JVR.Int";var TS=t=>{var{Map:n={}}=Ve();return Zt(n,t,"Map"),null};TS.displayName="JVR.Map";var OS=t=>{var{Nan:n={}}=Ve();return Zt(n,t,"Nan"),null};OS.displayName="JVR.Nan";var jS=t=>{var{Null:n={}}=Ve();return Zt(n,t,"Null"),null};jS.displayName="JVR.Null";var DS=t=>{var{Set:n={}}=Ve();return Zt(n,t,"Set"),null};DS.displayName="JVR.Set";var MS=t=>{var{Str:n={}}=Ve();return Zt(n,t,"Str"),null};MS.displayName="JVR.StringText";var LS=t=>{var{True:n={}}=Ve();return Zt(n,t,"True"),null};LS.displayName="JVR.True";var zS=t=>{var{Undefined:n={}}=Ve();return Zt(n,t,"Undefined"),null};zS.displayName="JVR.Undefined";var US=t=>{var{Url:n={}}=Ve();return Zt(n,t,"Url"),null};US.displayName="JVR.Url";var BS=t=>{var{Copied:n={}}=ln();return ua(n,t,"Copied"),null};BS.displayName="JVR.Copied";var kD=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],je=A.forwardRef((t,n)=>{var{className:i="",style:a,value:l,children:u,collapsed:f,shouldExpandNodeInitially:d,indentWidth:m=15,displayObjectSize:p=!0,shortenTextAfterLength:g=30,stringEllipsis:v,highlightUpdates:b=!0,enableClipboard:k=!0,displayDataTypes:N=!0,objectSortKeys:T=!1,onExpand:U,onCopied:M}=t,z=we(t,kD),G=_({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},a),X=["w-json-view-container","w-rjv",i].filter(Boolean).join(" ");return S.jsxs(Bx,{initialState:{value:l,objectSortKeys:T,indentWidth:m,shouldExpandNodeInitially:d,displayObjectSize:p,collapsed:f,enableClipboard:k,shortenTextAfterLength:g,stringEllipsis:v,highlightUpdates:b,onCopied:M,onExpand:U},initialTypes:{displayDataTypes:N},children:[S.jsx(lh,_({value:l},z,{ref:n,className:X,style:G})),u]})});je.Bigint=RS;je.Date=ES;je.False=AS;je.Float=$S;je.Int=CS;je.Map=TS;je.Nan=OS;je.Null=jS;je.Set=DS;je.String=MS;je.True=LS;je.Undefined=zS;je.Url=US;je.ValueQuote=kS;je.Arrow=SS;je.Colon=wS;je.Quote=NS;je.Ellipsis=pS;je.BraceLeft=yS;je.BraceRight=vS;je.BracketsLeft=bS;je.BracketsRight=xS;je.Copied=BS;je.CountInfo=dS;je.CountInfoExtra=cS;je.KeyName=iS;je.Row=aS;je.displayName="JVR.JsonView";var Dv={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function RD(t){const n=Object.keys(t),i=n.length>0?n[0]:void 0;return(a,l,u={})=>{if(!i)return u.default??a;const f=t[l]??t[i],d=a.split(".");let m=f;for(const p of d){if(typeof m=="string"||!m||!Object.hasOwn(m,p))return u.default??a;m=m[p]}return typeof m=="string"?m:u.default??a}}function ED({siteSchema:t,schemaTranslate:n}){const i=new Set;return S.jsx("ul",{children:S.jsx(pd,{schema:t,schemaT:n,typeName:"home",displayedNodeTypeNames:i})})}function pd({schema:t,schemaT:n,typeName:i,depth:a=0,displayedNodeTypeNames:l}){const{i18n:u}=Ct(),f=AD(t,i);if(!f)return null;const d=f.routingChildren||[],m=f.regularChildren||[],p=f.lists||[],g=f.documentKind==="routing",v=n(`nodeTypes.${i}.label`,u.language,{default:i});return l.has(i)?S.jsx("li",{children:S.jsxs("div",{children:[g?S.jsx("strong",{children:v}):v," (",S.jsx("code",{children:i}),")"]})}):(l.add(i),S.jsxs("li",{children:[S.jsxs("div",{children:[g?S.jsx("strong",{children:v}):v," (",S.jsx("code",{children:i}),")"]}),p.map(b=>S.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${i}.lists.${b.listName}.label`,u.language,{default:b.listName})," ","(",S.jsx("code",{children:b.listName})," [",S.jsx("code",{children:b.parts.join("</code>, <code>")}),"])"]},b.listName)),d.length>0&&S.jsx("ul",{children:d.map(b=>S.jsx(pd,{schema:t,schemaT:n,typeName:b,depth:a+1,displayedNodeTypeNames:l},b))}),m.length>0&&S.jsx("ul",{children:m.map(b=>S.jsx(pd,{schema:t,schemaT:n,typeName:b,depth:a+1,displayedNodeTypeNames:l},b))})]}))}function AD(t,n){var i;return(i=t.nodeTypes)==null?void 0:i.find(a=>a.kind==="document"&&a.typeName===n)}const co=je;function $D({step:t}){const{t:n}=Ct(),[i,a]=A.useState("tree"),{siteSchema:l,l10n:u}=t,f=RD(u),d=(m,p)=>p.keys.length===1&&p.keys[0]==="plugins";return S.jsxs("div",{className:"SchemaViewer",children:[S.jsxs("div",{className:"SchemaViewer-tabs",children:[S.jsx(Nt,{className:`SchemaViewer-tab ${i==="tree"?"active":""}`,onClick:()=>a("tree"),children:n("treeView")}),S.jsx(Nt,{className:`SchemaViewer-tab ${i==="schema"?"active":""}`,onClick:()=>a("schema"),children:n("siteSchema")}),S.jsx(Nt,{className:`SchemaViewer-tab ${i==="locales"?"active":""}`,onClick:()=>a("locales"),children:n("labels")})]}),S.jsxs("div",{className:"SchemaViewer-main",children:[S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="tree"?"block":"none"},children:S.jsx(ED,{siteSchema:l,schemaTranslate:f})}),S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="locales"?"block":"none"},children:S.jsx(co,{value:u,style:Dv,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="schema"?"block":"none"},children:S.jsxs(co,{value:l,style:Dv,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:d,children:[S.jsx(co.Colon,{render:(m,{parentValue:p})=>Array.isArray(p)&&m.children===":"?S.jsx("span",{}):S.jsx("span",{...m})}),S.jsx(co.KeyName,{render:({...m},{parentValue:p})=>Array.isArray(p)&&Number.isFinite(m.children)?S.jsx("span",{}):S.jsx("span",{...m})})]})})]})]})}function CD({step:t}){const{t:n}=Ct(),{workSession:i,appendNewStep:a}=nr(),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[m,p]=A.useState(!1),[g,v]=A.useState(void 0),b=aa(),k=()=>{u(!l)},N=async U=>{if(!i)return;p(!0),v(void 0);const M=Rs();if(!M){v(n("sessionExpired")),p(!1);return}try{const z=await Ri({command:"updateSiteSchema",sessionToken:M,prompt:U,fromStepNumber:t.stepNumber});z.success&&z.result?(u(!1),a(z.result),await b(`/step/${z.result.stepNumber}`)):v(n("promptSubmissionFailed"))}catch(z){console.error("Error updating schema:",z),v(n("errorOccurred"))}finally{p(!1)}},T=async({withSampleData:U})=>{if(!i)return;p(!0),v(void 0),d(!1);const M=Rs();if(!M){v(n("sessionExpired")),p(!1);return}try{const z=await Ri({command:"generateSite",sessionToken:M,fromStepNumber:t.stepNumber,withSampleData:U});z.success&&z.result?(a(z.result),await b(`/step/${z.result.stepNumber}`)):v(n("generationFailed"))}catch(z){console.error("Error generating site:",z),v(n("errorOccurred"))}finally{p(!1)}};return S.jsx(It,{children:S.jsxs("div",{className:"CompletedStep",children:[S.jsx($D,{step:t}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation")}),S.jsxs("div",{className:"CompletedStep-actions",children:[S.jsx(Nt,{onClick:k,className:"CompletedStep-button",children:n("modifySchema")}),S.jsx(Nt,{onClick:()=>d(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),l&&S.jsxs("div",{className:"CompletedStep-updateForm",children:[S.jsx("h3",{children:n("updateSchema")}),S.jsx(lx,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:N,isLoading:m,error:g})]}),S.jsx(N3,{isOpen:f,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:T,onCancel:()=>d(!1)}),g&&!l&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:g})})]})})}function TD({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"ErrorStep",children:[S.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),t.explanation&&S.jsx(qs,{content:t.explanation,variant:"error"})]})})}function OD({step:t}){const{t:n}=Ct(),i=()=>{const a=`
110
+ `+s+`</table>
111
+ `}tablerow({text:i}){return`<tr>
112
+ ${i}</tr>
113
+ `}tablecell(i){const n=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+n+`</${r}>
114
+ `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Pt(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:n,tokens:r}){const s=this.parser.parseInline(r),o=tm(i);if(o===null)return s;i=o;let f='<a href="'+i+'"';return n&&(f+=' title="'+Pt(n)+'"'),f+=">"+s+"</a>",f}image({href:i,title:n,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));const o=tm(i);if(o===null)return Pt(r);i=o;let f=`<img src="${i}" alt="${r}"`;return n&&(f+=` title="${Pt(n)}"`),f+=">",f}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Pt(i.text)}},pc=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},ma=class Zo{constructor(n){Oe(this,"options");Oe(this,"renderer");Oe(this,"textRenderer");this.options=n||mn,this.options.renderer=this.options.renderer||new ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pc}static parse(n,r){return new Zo(r).parse(n)}static parseInline(n,r){return new Zo(r).parseInline(n)}parse(n,r=!0){var o,f;let s="";for(let p=0;p<n.length;p++){const h=n[p];if((f=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&f[h.type]){const d=h,v=this.options.extensions.renderers[d.type].call({parser:this},d);if(v!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){s+=v||"";continue}}const m=h;switch(m.type){case"space":{s+=this.renderer.space(m);continue}case"hr":{s+=this.renderer.hr(m);continue}case"heading":{s+=this.renderer.heading(m);continue}case"code":{s+=this.renderer.code(m);continue}case"table":{s+=this.renderer.table(m);continue}case"blockquote":{s+=this.renderer.blockquote(m);continue}case"list":{s+=this.renderer.list(m);continue}case"html":{s+=this.renderer.html(m);continue}case"paragraph":{s+=this.renderer.paragraph(m);continue}case"text":{let d=m,v=this.renderer.text(d);for(;p+1<n.length&&n[p+1].type==="text";)d=n[++p],v+=`
115
+ `+this.renderer.text(d);r?s+=this.renderer.paragraph({type:"paragraph",raw:v,text:v,tokens:[{type:"text",raw:v,text:v,escaped:!0}]}):s+=v;continue}default:{const d='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}parseInline(n,r=this.renderer){var o,f;let s="";for(let p=0;p<n.length;p++){const h=n[p];if((f=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&f[h.type]){const d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){s+=d||"";continue}}const m=h;switch(m.type){case"escape":{s+=r.text(m);break}case"html":{s+=r.html(m);break}case"link":{s+=r.link(m);break}case"image":{s+=r.image(m);break}case"strong":{s+=r.strong(m);break}case"em":{s+=r.em(m);break}case"codespan":{s+=r.codespan(m);break}case"br":{s+=r.br(m);break}case"del":{s+=r.del(m);break}case"text":{s+=r.text(m);break}default:{const d='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}},Mo,Xr=(Mo=class{constructor(i){Oe(this,"options");Oe(this,"block");this.options=i||mn}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?pa.lex:pa.lexInline}provideParser(){return this.block?ma.parse:ma.parseInline}},Oe(Mo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mo),fN=class{constructor(...i){Oe(this,"defaults",rc());Oe(this,"options",this.setOptions);Oe(this,"parse",this.parseMarkdown(!0));Oe(this,"parseInline",this.parseMarkdown(!1));Oe(this,"Parser",ma);Oe(this,"Renderer",ts);Oe(this,"TextRenderer",pc);Oe(this,"Lexer",pa);Oe(this,"Tokenizer",es);Oe(this,"Hooks",Xr);this.use(...i)}walkTokens(i,n){var s,o;let r=[];for(const f of i)switch(r=r.concat(n.call(this,f)),f.type){case"table":{const p=f;for(const h of p.header)r=r.concat(this.walkTokens(h.tokens,n));for(const h of p.rows)for(const m of h)r=r.concat(this.walkTokens(m.tokens,n));break}case"list":{const p=f;r=r.concat(this.walkTokens(p.items,n));break}default:{const p=f;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[p.type]?this.defaults.extensions.childTokens[p.type].forEach(h=>{const m=p[h].flat(1/0);r=r.concat(this.walkTokens(m,n))}):p.tokens&&(r=r.concat(this.walkTokens(p.tokens,n)))}}return r}use(...i){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const f=n.renderers[o.name];f?n.renderers[o.name]=function(...p){let h=o.renderer.apply(this,p);return h===!1&&(h=f.apply(this,p)),h}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=n[o.level];f?f.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),s.extensions=n),r.renderer){const o=this.defaults.renderer||new ts(this.defaults);for(const f in r.renderer){if(!(f in o))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const p=f,h=r.renderer[p],m=o[p];o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v||""}}s.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new es(this.defaults);for(const f in r.tokenizer){if(!(f in o))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const p=f,h=r.tokenizer[p],m=o[p];o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v}}s.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Xr;for(const f in r.hooks){if(!(f in o))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const p=f,h=r.hooks[p],m=o[p];Xr.passThroughHooks.has(f)?o[p]=d=>{if(this.defaults.async)return Promise.resolve(h.call(o,d)).then(S=>m.call(o,S));const v=h.call(o,d);return m.call(o,v)}:o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v}}s.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,f=r.walkTokens;s.walkTokens=function(p){let h=[];return h.push(f.call(this,p)),o&&(h=h.concat(o.call(this,p))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,n){return pa.lex(i,n??this.defaults)}parser(i,n){return ma.parse(i,n??this.defaults)}parseMarkdown(i){return(r,s)=>{const o={...s},f={...this.defaults,...o},p=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&o.async===!1)return p(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return p(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return p(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=i);const h=f.hooks?f.hooks.provideLexer():i?pa.lex:pa.lexInline,m=f.hooks?f.hooks.provideParser():i?ma.parse:ma.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(r):r).then(d=>h(d,f)).then(d=>f.hooks?f.hooks.processAllTokens(d):d).then(d=>f.walkTokens?Promise.all(this.walkTokens(d,f.walkTokens)).then(()=>d):d).then(d=>m(d,f)).then(d=>f.hooks?f.hooks.postprocess(d):d).catch(p);try{f.hooks&&(r=f.hooks.preprocess(r));let d=h(r,f);f.hooks&&(d=f.hooks.processAllTokens(d)),f.walkTokens&&this.walkTokens(d,f.walkTokens);let v=m(d,f);return f.hooks&&(v=f.hooks.postprocess(v)),v}catch(d){return p(d)}}}onError(i,n){return r=>{if(r.message+=`
116
+ Please report this to https://github.com/markedjs/marked.`,i){const s="<p>An error occurred:</p><pre>"+Pt(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},dn=new fN;function Re(i,n){return dn.parse(i,n)}Re.options=Re.setOptions=function(i){return dn.setOptions(i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.getDefaults=rc;Re.defaults=mn;Re.use=function(...i){return dn.use(...i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.walkTokens=function(i,n){return dn.walkTokens(i,n)};Re.parseInline=dn.parseInline;Re.Parser=ma;Re.parser=ma.parse;Re.Renderer=ts;Re.TextRenderer=pc;Re.Lexer=pa;Re.lexer=pa.lex;Re.Tokenizer=es;Re.Hooks=Xr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;ma.parse;pa.lex;function dN(i){if(!i)return"";try{return Re.parse(i,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),i}}function Ni({content:i,title:n,variant:r="default",className:s="",children:o}){const f=["Explanation",`Explanation-${r}`,s].filter(Boolean).join(" ");return b.jsxs("div",{className:f,children:[n&&b.jsx("h3",{className:"Explanation-title",children:n}),b.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:dN(i)}}),o]})}function hN({isOpen:i,title:n,message:r,confirmLabel:s,cancelLabel:o,onConfirm:f,onCancel:p}){const{t:h}=ot(),[m,d]=w.useState(!0);if(!i)return null;const v=async()=>{await f({withSampleData:m})},S=x=>{x.key==="Escape"&&p()};return b.jsxs("div",{className:"ConfirmDialog",children:[b.jsx("div",{className:"ConfirmDialog-backdrop",onClick:p,onKeyDown:S,tabIndex:0,role:"button","aria-label":"Close dialog"}),b.jsxs("div",{className:"ConfirmDialog-container",children:[b.jsx("div",{className:"ConfirmDialog-header",children:b.jsx("h3",{className:"ConfirmDialog-title",children:n})}),b.jsxs("div",{className:"ConfirmDialog-body",children:[b.jsx("p",{children:r}),b.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:b.jsxs("label",{children:[b.jsx("input",{type:"checkbox",checked:m,onChange:x=>d(x.target.checked)}),b.jsx("span",{className:"ml-2",children:h("generateSiteWithData")})]})})]}),b.jsxs("div",{className:"ConfirmDialog-footer",children:[b.jsx(rt,{onClick:p,severity:"secondary",className:"ConfirmDialog-button",children:o||h("cancel")}),b.jsx(rt,{onClick:v,className:"ConfirmDialog-button",children:s||h("confirm")})]})]})]})}function U(){return U=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var s in r)({}).hasOwnProperty.call(r,s)&&(i[s]=r[s])}return i},U.apply(null,arguments)}function ge(i,n){if(i==null)return{};var r={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(n.indexOf(s)!==-1)continue;r[s]=i[s]}return r}var qm={},Gm=w.createContext(qm),pN=(i,n)=>U({},i,n),mN=()=>w.useContext(Gm),mc=w.createContext(()=>{});mc.displayName="JVR.DispatchShowTools";function gN(){return w.useReducer(pN,qm)}function Ym(){return w.useContext(mc)}var Qm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Gm.Provider,{value:n,children:b.jsx(mc.Provider,{value:r,children:s})})};Qm.displayName="JVR.ShowTools";var Zm={},Km=w.createContext(Zm),vN=(i,n)=>U({},i,n),us=()=>w.useContext(Km),gc=w.createContext(()=>{});gc.displayName="JVR.DispatchExpands";function yN(){return w.useReducer(vN,Zm)}function bN(){return w.useContext(gc)}var Xm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Km.Provider,{value:n,children:b.jsx(gc.Provider,{value:r,children:s})})};Xm.displayName="JVR.Expands";var Jm={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Fm=w.createContext(Jm),xN=(i,n)=>U({},i,n),Le=()=>w.useContext(Fm),vc=w.createContext(()=>{});vc.displayName="JVR.DispatchTypes";function SN(){return w.useReducer(xN,Jm)}function NN(){return w.useContext(vc)}function Pm(i){var{initial:n,dispatch:r,children:s}=i;return b.jsx(Fm.Provider,{value:n,children:b.jsx(vc.Provider,{value:r,children:s})})}Pm.displayName="JVR.Types";var EN=["style"];function Wm(i){var{style:n}=i,r=ge(i,EN),s=U({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return b.jsx("svg",U({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:s},r,{children:b.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Wm.displayName="JVR.TriangleArrow";var Im={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:b.jsx(Wm,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},eg=w.createContext(Im),RN=(i,n)=>U({},i,n),mt=()=>w.useContext(eg),yc=w.createContext(()=>{});yc.displayName="JVR.DispatchSymbols";function wN(){return w.useReducer(RN,Im)}function TN(){return w.useContext(yc)}var tg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(eg.Provider,{value:n,children:b.jsx(yc.Provider,{value:r,children:s})})};tg.displayName="JVR.Symbols";var ag={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},ng=w.createContext(ag),CN=(i,n)=>U({},i,n),Bt=()=>w.useContext(ng),bc=w.createContext(()=>{});bc.displayName="JVR.DispatchSection";function jN(){return w.useReducer(CN,ag)}function AN(){return w.useContext(bc)}var lg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(ng.Provider,{value:n,children:b.jsx(bc.Provider,{value:r,children:s})})};lg.displayName="JVR.Section";var ig={objectSortKeys:!1,indentWidth:15},xc=w.createContext(ig);xc.displayName="JVR.Context";var rg=w.createContext(()=>{});rg.displayName="JVR.DispatchContext";function ON(i,n){return U({},i,n)}var gn=()=>w.useContext(xc),sg=i=>{var{children:n,initialState:r,initialTypes:s}=i,[o,f]=w.useReducer(ON,Object.assign({},ig,r)),[p,h]=gN(),[m,d]=yN(),[v,S]=SN(),[x,C]=wN(),[E,L]=jN();return w.useEffect(()=>f(U({},r)),[r]),b.jsx(xc.Provider,{value:o,children:b.jsx(rg.Provider,{value:f,children:b.jsx(Qm,{initial:p,dispatch:h,children:b.jsx(Xm,{initial:m,dispatch:d,children:b.jsx(Pm,{initial:U({},v,s),dispatch:S,children:b.jsx(tg,{initial:x,dispatch:C,children:b.jsx(lg,{initial:E,dispatch:L,children:n})})})})})})})};sg.displayName="JVR.Provider";function kN(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var LN=["isNumber","value","parentValue","keyName","keys"],zN=["as","render"],DN=["as","render"],_N=["as","render"],MN=["as","style","render"],UN=["as","render"],BN=["as","render"],HN=["as","render"],VN=["as","render"],Ko=i=>{var{Quote:n={}}=mt(),{isNumber:r,value:s,parentValue:o,keyName:f,keys:p}=i,h=ge(i,LN);if(r)return null;var{as:m,render:d}=n,v=ge(n,zN),S=m||"span",x=U({},h,v),C={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])},E=d&&typeof d=="function"&&d(x,C);return E||b.jsx(S,U({},x))};Ko.displayName="JVR.Quote";var yi=i=>{var{ValueQuote:n={}}=mt(),r=U({},(kN(i),i)),{as:s,render:o}=n,f=ge(n,DN),p=s||"span",h=U({},r,f),m=o&&typeof o=="function"&&o(h,{});return m||b.jsx(p,U({},h))};yi.displayName="JVR.ValueQuote";var ug=i=>{var{value:n,parentValue:r,keyName:s,keys:o}=i,{Colon:f={}}=mt(),{as:p,render:h}=f,m=ge(f,_N),d=p||"span",v=h&&typeof h=="function"&&h(m,{value:n,parentValue:r,keyName:s,keys:o||(s?[s]:[])});return v||b.jsx(d,U({},m))};ug.displayName="JVR.Colon";var og=i=>{var{Arrow:n={}}=mt(),r=us(),{expandKey:s,style:o,value:f,parentValue:p,keyName:h,keys:m}=i,d=!!r[s],{as:v,style:S,render:x}=n,C=ge(n,MN),E=v||"span",L=x&&typeof x=="function",V=U({},C,{"data-expanded":d,style:U({},S,o)}),M={value:f,parentValue:p,keyName:h,keys:m||(h?[h]:[])},D=L&&x(V,M);return D||b.jsx(E,U({},C,{style:U({},S,o)}))};og.displayName="JVR.Arrow";var cg=i=>{var{isBrackets:n,value:r,parentValue:s,keyName:o,keys:f}=i,{BracketsLeft:p={},BraceLeft:h={}}=mt(),m={value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])};if(n){var{as:d,render:v}=p,S=ge(p,UN),x=d||"span",C=v&&typeof v=="function"&&v(S,m);return C||b.jsx(x,U({},S))}var{as:E,render:L}=h,V=ge(h,BN),M=E||"span",D=L&&typeof L=="function"&&L(V,m);return D||b.jsx(M,U({},V))};cg.displayName="JVR.BracketsOpen";var Sc=i=>{var{isBrackets:n,isVisiable:r,value:s,parentValue:o,keyName:f,keys:p}=i,h={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])};if(!r)return null;var{BracketsRight:m={},BraceRight:d={}}=mt();if(n){var{as:v,render:S}=m,x=ge(m,HN),C=v||"span",E=S&&typeof S=="function"&&S(x,h);return E||b.jsx(C,U({},x))}var{as:L,render:V}=d,M=ge(d,VN),D=L||"span",G=V&&typeof V=="function"&&V(M,h);return G||b.jsx(D,U({},M))};Sc.displayName="JVR.BracketsClose";var fg=i=>{var n,{value:r,expandKey:s,level:o,keys:f=[]}=i,p=us(),h=Array.isArray(r),{collapsed:m,shouldExpandNodeInitially:d}=gn(),v=r instanceof Set,S=typeof m=="boolean"?m:typeof m=="number"?o>m:!1,x=(n=p[s])!=null?n:S,C=Object.keys(r).length,E=d&&d(!x,{value:r,keys:f,level:o});if(p[s]===void 0&&d&&!E||x||C===0)return null;var L={paddingLeft:4};return b.jsx("div",{style:L,children:b.jsx(Sc,{isBrackets:h||v,isVisiable:!0})})};fg.displayName="JVR.NestedClose";var $N=["as","render"],qN=["as","render"],GN=["as","render"],YN=["as","render"],QN=["as","render"],ZN=["as","render"],KN=["as","render"],XN=["as","render"],JN=["as","render"],FN=["as","render"],PN=["as","render"],WN=["as","render"],IN=["as","render"],Xo=i=>{if(i===void 0)return"0n";if(typeof i=="string")try{i=BigInt(i)}catch{return"0n"}return i?i.toString()+"n":"0n"},dg=i=>{var{value:n,keyName:r}=i,{Set:s={},displayDataTypes:o}=Le(),f=n instanceof Set;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,$N),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};dg.displayName="JVR.SetComp";var hg=i=>{var{value:n,keyName:r}=i,{Map:s={},displayDataTypes:o}=Le(),f=n instanceof Map;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,qN),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};hg.displayName="JVR.MapComp";var Yt={opacity:.75,paddingRight:4},pg=i=>{var{children:n="",keyName:r}=i,{Str:s={},displayDataTypes:o}=Le(),{shortenTextAfterLength:f=30,stringEllipsis:p="..."}=gn(),{as:h,render:m}=s,d=ge(s,GN),v=n,[S,x]=w.useState(f&&v.length>f);w.useEffect(()=>x(f&&v.length>f),[f]);var C=h||"span",E=U({},Yt,s.style||{});f>0&&(d.style=U({},d.style,{cursor:v.length<=f?"initial":"pointer"}),v.length>f&&(d.onClick=()=>{x(!S)}));var L=S?""+v.slice(0,f)+p:v,V=m&&typeof m=="function",M=V&&m(U({},d,{style:E}),{type:"type",value:n,keyName:r}),D=S?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=V&&m(U({},d,{children:L,className:D}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(M||b.jsx(C,U({},d,{style:E}))),G||b.jsxs(w.Fragment,{children:[b.jsx(yi,{}),b.jsx(C,U({},d,{className:D,children:L})),b.jsx(yi,{})]})]})};pg.displayName="JVR.TypeString";var mg=i=>{var{children:n,keyName:r}=i,{True:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,YN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};mg.displayName="JVR.TypeTrue";var gg=i=>{var{children:n,keyName:r}=i,{False:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,QN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};gg.displayName="JVR.TypeFalse";var vg=i=>{var{children:n,keyName:r}=i,{Float:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,ZN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};vg.displayName="JVR.TypeFloat";var yg=i=>{var{children:n,keyName:r}=i,{Int:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,KN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};yg.displayName="JVR.TypeInt";var bg=i=>{var{children:n,keyName:r}=i,{Bigint:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,XN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:Xo(n==null?void 0:n.toString())}))]})};bg.displayName="JVR.TypeFloat";var xg=i=>{var{children:n,keyName:r}=i,{Url:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,JN),m=f||"span",d=U({},Yt,s.style),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsxs("a",U({href:n==null?void 0:n.href,target:"_blank"},h,{className:"w-rjv-value",children:[b.jsx(yi,{}),n==null?void 0:n.href,b.jsx(yi,{})]}))]})};xg.displayName="JVR.TypeUrl";var Sg=i=>{var{children:n,keyName:r}=i,{Date:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,FN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=n instanceof Date?n.toLocaleString():n,C=v&&p(U({},h,{children:x,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),C||b.jsx(m,U({},h,{className:"w-rjv-value",children:x}))]})};Sg.displayName="JVR.TypeDate";var Ng=i=>{var{children:n,keyName:r}=i,{Undefined:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,PN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Ng.displayName="JVR.TypeUndefined";var Eg=i=>{var{children:n,keyName:r}=i,{Null:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,WN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Eg.displayName="JVR.TypeNull";var Rg=i=>{var{children:n,keyName:r}=i,{Nan:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,IN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Rg.displayName="JVR.TypeNan";var eE=i=>Number(i)===i&&i%1!==0||isNaN(i),wg=i=>{var{value:n,keyName:r}=i,s={keyName:r};return n instanceof URL?b.jsx(xg,U({},s,{children:n})):typeof n=="string"?b.jsx(pg,U({},s,{children:n})):n===!0?b.jsx(mg,U({},s,{children:n})):n===!1?b.jsx(gg,U({},s,{children:n})):n===null?b.jsx(Eg,U({},s,{children:n})):n===void 0?b.jsx(Ng,U({},s,{children:n})):n instanceof Date?b.jsx(Sg,U({},s,{children:n})):typeof n=="number"&&isNaN(n)?b.jsx(Rg,U({},s,{children:n})):typeof n=="number"&&eE(n)?b.jsx(vg,U({},s,{children:n})):typeof n=="bigint"?b.jsx(bg,U({},s,{children:n})):typeof n=="number"?b.jsx(yg,U({},s,{children:n})):null};wg.displayName="JVR.Value";function Qa(i,n,r){var s=TN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function Ct(i,n,r){var s=NN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function sl(i,n,r){var s=AN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}var tE=["as","render"],Tg=i=>{var{KeyName:n={}}=Bt();return sl(n,i,"KeyName"),null};Tg.displayName="JVR.KeyName";var Cg=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=typeof n=="number",h={color:p?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=Bt(),{as:d,render:v}=m,S=ge(m,tE);S.style=U({},S.style,h);var x=d||"span",C=v&&typeof v=="function"&&v(U({},S,{children:n}),{value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])});return C||b.jsx(x,U({},S,{children:n}))};Cg.displayName="JVR.KeyNameComp";var aE=["children","value","parentValue","keyName","keys"],nE=["as","render","children"],jg=i=>{var{Row:n={}}=Bt();return sl(n,i,"Row"),null};jg.displayName="JVR.Row";var Ag=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=ge(i,aE),{Row:h={}}=Bt(),{as:m,render:d}=h,v=ge(h,nE),S=m||"div",x=d&&typeof d=="function"&&d(U({},p,v,{children:n}),{value:r,keyName:o,parentValue:s,keys:f});return x||b.jsx(S,U({},p,v,{children:n}))};Ag.displayName="JVR.RowComp";function lE(i){var n=w.useRef();return w.useEffect(()=>{n.current=i}),n.current}function iE(i){var{value:n,highlightUpdates:r,highlightContainer:s}=i,o=lE(n),f=w.useMemo(()=>{if(!r||o===void 0)return!1;if(typeof n!=typeof o)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(o)?!1:n!==o;if(Array.isArray(n)!==Array.isArray(o))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==o)return!0},[r,n]);w.useEffect(()=>{s&&s.current&&f&&"animate"in s.current&&s.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[f,n,s])}var rE=["keyName","value","parentValue","expandKey","keys"],sE=["as","render"],Nc=i=>{var{keyName:n,value:r,parentValue:s,expandKey:o,keys:f}=i,p=ge(i,rE),{onCopied:h,enableClipboard:m}=gn(),d=mN(),v=d[o],[S,x]=w.useState(!1),{Copied:C={}}=Bt();if(m===!1||!v)return null;var E=K=>{K.stopPropagation();var se="";typeof r=="number"&&r===1/0?se="Infinity":typeof r=="number"&&isNaN(r)?se="NaN":typeof r=="bigint"?se=Xo(r):r instanceof Date?se=r.toLocaleString():se=JSON.stringify(r,(ee,F)=>typeof F=="bigint"?Xo(F):F,2),h&&h(se,r),x(!0);var re=navigator.clipboard||{writeText(ee){return new Promise((F,ne)=>{var pe=document.createElement("textarea");pe.style.position="absolute",pe.style.opacity="0",pe.style.left="-99999999px",pe.value=ee,document.body.appendChild(pe),pe.select(),document.execCommand("copy")?F():ne(),pe.remove()})}};re.writeText(se).then(()=>{var ee=setTimeout(()=>{x(!1),clearTimeout(ee)},3e3)}).catch(ee=>{})},L={style:{display:"inline-flex"},fill:S?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:E},{render:V}=C,M=ge(C,sE),D=U({},M,p,L,{style:U({},M.style,p.style,L.style)}),G=V&&typeof V=="function",X=G&&V(U({},D,{"data-copied":S}),{value:r,keyName:n,keys:f,parentValue:s});return X||(S?b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};Nc.displayName="JVR.Copied";function Og(){var i=w.useRef(null);return i.current===null&&(i.current="custom-id-"+Math.random().toString(36).substr(2,9)),i.current}var kg=i=>{var n,{value:r,expandKey:s="",level:o,keys:f=[]}=i,p=us(),{objectSortKeys:h,indentWidth:m,collapsed:d,shouldExpandNodeInitially:v}=gn(),S=Array.isArray(r),x=typeof d=="boolean"?d:typeof d=="number"?o>d:!1,C=(n=p[s])!=null?n:x,E=v&&v(!C,{value:r,keys:f,level:o});if(p[s]===void 0&&v&&!E||C)return null;var L=S?Object.entries(r).map(M=>[Number(M[0]),M[1]]):Object.entries(r);h&&(L=h===!0?L.sort((M,D)=>{var[G]=M,[X]=D;return typeof G=="string"&&typeof X=="string"?G.localeCompare(X):0}):L.sort((M,D)=>{var[G,X]=M,[K,se]=D;return typeof G=="string"&&typeof K=="string"?h(G,K,X,se):0}));var V={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return b.jsx("div",{className:"w-rjv-wrap",style:V,children:L.map((M,D)=>{var[G,X]=M;return b.jsx(Lg,{parentValue:r,keyName:G,keys:[...f,G],value:X,level:o},D)})})};kg.displayName="JVR.KeyValues";var Ec=i=>{var{keyName:n,parentValue:r,keys:s,value:o}=i,{highlightUpdates:f}=gn(),p=typeof n=="number",h=w.useRef(null);iE({value:o,highlightUpdates:f,highlightContainer:h});var m={keyName:n,value:o,keys:s,parentValue:r};return b.jsxs(w.Fragment,{children:[b.jsxs("span",{ref:h,children:[b.jsx(Ko,U({isNumber:p,"data-placement":"left"},m)),b.jsx(Cg,U({},m,{children:n})),b.jsx(Ko,U({isNumber:p,"data-placement":"right"},m))]}),b.jsx(ug,U({},m))]})};Ec.displayName="JVR.KayName";var Lg=i=>{var{keyName:n,value:r,parentValue:s,level:o=0,keys:f=[]}=i,p=Ym(),h=Og(),m=Array.isArray(r),d=r instanceof Set,v=r instanceof Map,S=r instanceof Date,x=r instanceof URL,C=r&&typeof r=="object"&&!m&&!d&&!v&&!S&&!x,E=C||m||d||v;if(E){var L=d?Array.from(r):v?Object.fromEntries(r):r;return b.jsx(Rc,{keyName:n,value:L,parentValue:s,initialValue:r,keys:f,level:o+1})}var V={onMouseEnter:()=>p({[h]:!0}),onMouseLeave:()=>p({[h]:!1})};return b.jsxs(Ag,U({className:"w-rjv-line",value:r,keyName:n,keys:f,parentValue:s},V,{children:[b.jsx(Ec,{keyName:n,value:r,keys:f,parentValue:s}),b.jsx(wg,{keyName:n,value:r}),b.jsx(Nc,{keyName:n,value:r,keys:f,parentValue:s,expandKey:h})]}))};Lg.displayName="JVR.KeyValuesItem";var uE=["value","keyName"],oE=["as","render"],zg=i=>{var{CountInfoExtra:n={}}=Bt();return sl(n,i,"CountInfoExtra"),null};zg.displayName="JVR.CountInfoExtra";var Dg=i=>{var{value:n={},keyName:r}=i,s=ge(i,uE),{CountInfoExtra:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,oE);if(!p&&!h.children)return null;var m=f||"span",d=p&&typeof p=="function",v=U({},h,s),S=d&&p(v,{value:n,keyName:r});return S||b.jsx(m,U({},v))};Dg.displayName="JVR.CountInfoExtraComps";var cE=["value","keyName"],fE=["as","render"],_g=i=>{var{CountInfo:n={}}=Bt();return sl(n,i,"CountInfo"),null};_g.displayName="JVR.CountInfo";var Mg=i=>{var{value:n={},keyName:r}=i,s=ge(i,cE),{displayObjectSize:o}=gn(),{CountInfo:f={}}=Bt();if(!o)return null;var{as:p,render:h}=f,m=ge(f,fE),d=p||"span";m.style=U({},m.style,i.style);var v=Object.keys(n).length;m.children||(m.children=v+" item"+(v===1?"":"s"));var S=U({},m,s),x=h&&typeof h=="function",C=x&&h(U({},S,{"data-length":v}),{value:n,keyName:r});return C||b.jsx(d,U({},S))};Mg.displayName="JVR.CountInfoComp";var dE=["as","render"],Ug=i=>{var{Ellipsis:n={}}=Bt();return sl(n,i,"Ellipsis"),null};Ug.displayName="JVR.Ellipsis";var Bg=i=>{var{isExpanded:n,value:r,keyName:s}=i,{Ellipsis:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,dE),m=f||"span",d=p&&typeof p=="function"&&p(U({},h,{"data-expanded":n}),{value:r,keyName:s});return d||(!n||typeof r=="object"&&Object.keys(r).length==0?null:b.jsx(m,U({},h)))};Bg.displayName="JVR.EllipsisComp";var Hg=i=>{var n,{keyName:r,expandKey:s,keys:o=[],initialValue:f,value:p,parentValue:h,level:m}=i,d=us(),v=bN(),{onExpand:S,collapsed:x,shouldExpandNodeInitially:C}=gn(),E=Array.isArray(p),L=p instanceof Set,V=typeof x=="boolean"?x:typeof x=="number"?m>x:!1,M=typeof p=="object",D=(n=d[s])!=null?n:V,G=C&&C(!D,{value:p,keys:o,level:m});d[s]===void 0&&C&&!G&&(D=!G);var X=()=>{var pe={expand:!D,value:p,keyid:s,keyName:r};S&&S(pe),v({[s]:pe.expand})},K={display:"inline-flex",alignItems:"center"},se={transform:"rotate("+(D?"-90":"0")+"deg)",transition:"all 0.3s"},re=Object.keys(p).length,ee=re!==0&&(E||L||M),F={style:K};ee&&(F.onClick=X);var ne={keyName:r,value:p,keys:o,parentValue:h};return b.jsxs("span",U({},F,{children:[ee&&b.jsx(og,U({style:se,expandKey:s},ne)),(r||typeof r=="number")&&b.jsx(Ec,U({},ne)),b.jsx(dg,{value:f,keyName:r}),b.jsx(hg,{value:f,keyName:r}),b.jsx(cg,U({isBrackets:E||L},ne)),b.jsx(Bg,{keyName:r,value:p,isExpanded:D}),b.jsx(Sc,U({isVisiable:D||!ee,isBrackets:E||L},ne)),b.jsx(Mg,{value:p,keyName:r}),b.jsx(Dg,{value:p,keyName:r}),b.jsx(Nc,{keyName:r,value:p,expandKey:s,parentValue:h,keys:o})]}))};Hg.displayName="JVR.NestedOpen";var hE=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],Rc=w.forwardRef((i,n)=>{var{className:r="",parentValue:s,level:o=1,value:f,initialValue:p,keys:h,keyName:m}=i,d=ge(i,hE),v=Ym(),S=Og(),x=[r,"w-rjv-inner"].filter(Boolean).join(" "),C={onMouseEnter:()=>v({[S]:!0}),onMouseLeave:()=>v({[S]:!1})};return b.jsxs("div",U({className:x,ref:n},d,C,{children:[b.jsx(Hg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m,initialValue:p}),b.jsx(kg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m}),b.jsx(fg,{expandKey:S,value:f,level:o,keys:h})]}))});Rc.displayName="JVR.Container";var Vg=i=>{var{BraceLeft:n={}}=mt();return Qa(n,i,"BraceLeft"),null};Vg.displayName="JVR.BraceLeft";var $g=i=>{var{BraceRight:n={}}=mt();return Qa(n,i,"BraceRight"),null};$g.displayName="JVR.BraceRight";var qg=i=>{var{BracketsLeft:n={}}=mt();return Qa(n,i,"BracketsLeft"),null};qg.displayName="JVR.BracketsLeft";var Gg=i=>{var{BracketsRight:n={}}=mt();return Qa(n,i,"BracketsRight"),null};Gg.displayName="JVR.BracketsRight";var Yg=i=>{var{Arrow:n={}}=mt();return Qa(n,i,"Arrow"),null};Yg.displayName="JVR.Arrow";var Qg=i=>{var{Colon:n={}}=mt();return Qa(n,i,"Colon"),null};Qg.displayName="JVR.Colon";var Zg=i=>{var{Quote:n={}}=mt();return Qa(n,i,"Quote"),null};Zg.displayName="JVR.Quote";var Kg=i=>{var{ValueQuote:n={}}=mt();return Qa(n,i,"ValueQuote"),null};Kg.displayName="JVR.ValueQuote";var Xg=i=>{var{Bigint:n={}}=Le();return Ct(n,i,"Bigint"),null};Xg.displayName="JVR.Bigint";var Jg=i=>{var{Date:n={}}=Le();return Ct(n,i,"Date"),null};Jg.displayName="JVR.Date";var Fg=i=>{var{False:n={}}=Le();return Ct(n,i,"False"),null};Fg.displayName="JVR.False";var Pg=i=>{var{Float:n={}}=Le();return Ct(n,i,"Float"),null};Pg.displayName="JVR.Float";var Wg=i=>{var{Int:n={}}=Le();return Ct(n,i,"Int"),null};Wg.displayName="JVR.Int";var Ig=i=>{var{Map:n={}}=Le();return Ct(n,i,"Map"),null};Ig.displayName="JVR.Map";var ev=i=>{var{Nan:n={}}=Le();return Ct(n,i,"Nan"),null};ev.displayName="JVR.Nan";var tv=i=>{var{Null:n={}}=Le();return Ct(n,i,"Null"),null};tv.displayName="JVR.Null";var av=i=>{var{Set:n={}}=Le();return Ct(n,i,"Set"),null};av.displayName="JVR.Set";var nv=i=>{var{Str:n={}}=Le();return Ct(n,i,"Str"),null};nv.displayName="JVR.StringText";var lv=i=>{var{True:n={}}=Le();return Ct(n,i,"True"),null};lv.displayName="JVR.True";var iv=i=>{var{Undefined:n={}}=Le();return Ct(n,i,"Undefined"),null};iv.displayName="JVR.Undefined";var rv=i=>{var{Url:n={}}=Le();return Ct(n,i,"Url"),null};rv.displayName="JVR.Url";var sv=i=>{var{Copied:n={}}=Bt();return sl(n,i,"Copied"),null};sv.displayName="JVR.Copied";var pE=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],we=w.forwardRef((i,n)=>{var{className:r="",style:s,value:o,children:f,collapsed:p,shouldExpandNodeInitially:h,indentWidth:m=15,displayObjectSize:d=!0,shortenTextAfterLength:v=30,stringEllipsis:S,highlightUpdates:x=!0,enableClipboard:C=!0,displayDataTypes:E=!0,objectSortKeys:L=!1,onExpand:V,onCopied:M}=i,D=ge(i,pE),G=U({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},s),X=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return b.jsxs(sg,{initialState:{value:o,objectSortKeys:L,indentWidth:m,shouldExpandNodeInitially:h,displayObjectSize:d,collapsed:p,enableClipboard:C,shortenTextAfterLength:v,stringEllipsis:S,highlightUpdates:x,onCopied:M,onExpand:V},initialTypes:{displayDataTypes:E},children:[b.jsx(Rc,U({value:o},D,{ref:n,className:X,style:G})),f]})});we.Bigint=Xg;we.Date=Jg;we.False=Fg;we.Float=Pg;we.Int=Wg;we.Map=Ig;we.Nan=ev;we.Null=tv;we.Set=av;we.String=nv;we.True=lv;we.Undefined=iv;we.Url=rv;we.ValueQuote=Kg;we.Arrow=Yg;we.Colon=Qg;we.Quote=Zg;we.Ellipsis=Ug;we.BraceLeft=Vg;we.BraceRight=$g;we.BracketsLeft=qg;we.BracketsRight=Gg;we.Copied=sv;we.CountInfo=_g;we.CountInfoExtra=zg;we.KeyName=Tg;we.Row=jg;we.displayName="JVR.JsonView";var lm={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function mE(i){const n=Object.keys(i),r=n.length>0?n[0]:void 0;return(s,o,f={})=>{if(!r)return f.default??s;const p=i[o]??i[r],h=s.split(".");let m=p;for(const d of h){if(typeof m=="string"||!m||!Object.hasOwn(m,d))return f.default??s;m=m[d]}return typeof m=="string"?m:f.default??s}}function gE({siteSchema:i,schemaTranslate:n}){const r=new Set;return b.jsx("ul",{children:b.jsx(Jo,{schema:i,schemaT:n,typeName:"home",displayedNodeTypeNames:r})})}function Jo({schema:i,schemaT:n,typeName:r,depth:s=0,displayedNodeTypeNames:o}){const{i18n:f}=ot(),p=vE(i,r);if(!p)return null;const h=p.routingChildren||[],m=p.regularChildren||[],d=p.lists||[],v=p.documentKind==="routing",S=n(`nodeTypes.${r}.label`,f.language,{default:r});return o.has(r)?b.jsx("li",{children:b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]})}):(o.add(r),b.jsxs("li",{children:[b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]}),d.map(x=>b.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${r}.lists.${x.listName}.label`,f.language,{default:x.listName})," ","(",b.jsx("code",{children:x.listName})," [",b.jsx("code",{children:x.parts.join("</code>, <code>")}),"])"]},x.listName)),h.length>0&&b.jsx("ul",{children:h.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))}),m.length>0&&b.jsx("ul",{children:m.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))})]}))}function vE(i,n){var r;return(r=i.nodeTypes)==null?void 0:r.find(s=>s.kind==="document"&&s.typeName===n)}const Gr=we;function yE({step:i}){const{t:n}=ot(),[r,s]=w.useState("tree"),{siteSchema:o,l10n:f}=i,p=mE(f),h=(m,d)=>d.keys.length===1&&d.keys[0]==="plugins";return b.jsxs("div",{className:"SchemaViewer",children:[b.jsxs("div",{className:"SchemaViewer-tabs",children:[b.jsx(rt,{className:`SchemaViewer-tab ${r==="tree"?"active":""}`,onClick:()=>s("tree"),children:n("treeView")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="schema"?"active":""}`,onClick:()=>s("schema"),children:n("siteSchema")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="locales"?"active":""}`,onClick:()=>s("locales"),children:n("labels")})]}),b.jsxs("div",{className:"SchemaViewer-main",children:[b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="tree"?"block":"none"},children:b.jsx(gE,{siteSchema:o,schemaTranslate:p})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="locales"?"block":"none"},children:b.jsx(Gr,{value:f,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="schema"?"block":"none"},children:b.jsxs(Gr,{value:o,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:h,children:[b.jsx(Gr.Colon,{render:(m,{parentValue:d})=>Array.isArray(d)&&m.children===":"?b.jsx("span",{}):b.jsx("span",{...m})}),b.jsx(Gr.KeyName,{render:({...m},{parentValue:d})=>Array.isArray(d)&&Number.isFinite(m.children)?b.jsx("span",{}):b.jsx("span",{...m})})]})})]})]})}function bE({step:i}){const{t:n}=ot(),{workSession:r,appendNewStep:s}=pn(),[o,f]=w.useState(!1),[p,h]=w.useState(!1),[m,d]=w.useState(!1),[v,S]=w.useState(void 0),x=rl(),C=()=>{f(!o)},E=async V=>{if(!r)return;d(!0),S(void 0);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"updateSiteSchema",sessionToken:M,prompt:V,fromStepNumber:i.stepNumber});D.success&&D.result?(f(!1),s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("promptSubmissionFailed"))}catch(D){console.error("Error updating schema:",D),S(n("errorOccurred"))}finally{d(!1)}},L=async({withSampleData:V})=>{if(!r)return;d(!0),S(void 0),h(!1);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"generateSite",sessionToken:M,fromStepNumber:i.stepNumber,withSampleData:V});D.success&&D.result?(s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("generationFailed"))}catch(D){console.error("Error generating site:",D),S(n("errorOccurred"))}finally{d(!1)}};return b.jsx(Tt,{children:b.jsxs("div",{className:"CompletedStep",children:[b.jsx(yE,{step:i}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation")}),b.jsxs("div",{className:"CompletedStep-actions",children:[b.jsx(rt,{onClick:C,className:"CompletedStep-button",children:n("modifySchema")}),b.jsx(rt,{onClick:()=>h(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),o&&b.jsxs("div",{className:"CompletedStep-updateForm",children:[b.jsx("h3",{children:n("updateSchema")}),b.jsx(Om,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:E,isLoading:m,error:v})]}),b.jsx(hN,{isOpen:p,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:L,onCancel:()=>h(!1)}),v&&!o&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:v})})]})})}function xE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"error"})]})})}function SE({step:i}){const{t:n}=ot(),r=()=>{const s=`
161
117
  ${n("siteGenerated")}
162
- ${n("loginEmail")}: ${t.loginEmail}
163
- ${n("loginPassword")}: ${t.loginPassword}
164
- ${n("siteUrl")}: ${t.siteUrl}
165
- ${n("adminUrl")}: ${t.adminUiUrl}
166
- `.trim();navigator.clipboard.writeText(a)};return S.jsx(It,{children:S.jsxs("div",{className:"GeneratedSite",children:[t.status==="pending"&&S.jsxs("div",{className:"GeneratedSite-pending",children:[S.jsx(Zo,{size:"small"}),S.jsx("p",{children:n("generatingContent")})]}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation"),variant:"info"}),S.jsx("div",{className:"GeneratedSite-header",children:S.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),S.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),S.jsxs("div",{className:"GeneratedSite-information",children:[S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),S.jsx("div",{className:"GeneratedSite-value",children:S.jsx("input",{type:"text",value:t.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),S.jsx("div",{className:"GeneratedSite-value",children:S.jsx("input",{type:"text",value:t.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),S.jsxs("div",{className:"GeneratedSite-value",children:[S.jsx("input",{type:"text",value:t.adminUiUrl,readOnly:!0,className:"GeneratedSite-input"}),S.jsx(Nt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(t.adminUiUrl,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),S.jsxs("div",{className:"GeneratedSite-value",children:[S.jsx("input",{type:"text",value:t.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),S.jsx(Nt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(t.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),S.jsx("div",{className:"GeneratedSite-actions",children:S.jsx(Nt,{onClick:i,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function jD({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"ErrorStep",children:[S.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),t.explanation&&S.jsx(qs,{content:t.explanation,variant:"warning"})]})})}function Mv({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"PendingStep",children:[S.jsx("div",{className:"PendingStep-header",children:S.jsx("h2",{children:n("stepTitle",{stepNumber:t.stepNumber,kind:n(t.kind)})})}),S.jsx("div",{className:"PendingStep-spinner",children:S.jsx(Zo,{size:"large"})}),t.currentActivity&&S.jsxs("div",{className:"PendingStep-activity",children:[S.jsx("h3",{children:n("currentActivity")}),S.jsx("p",{children:n(`activity.${t.currentActivity}`)})]}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation"),variant:"info"})]})})}function DD({step:t}){if(t.status==="failed")return S.jsx(TD,{step:t});if(t.status==="noEffect")return S.jsx(jD,{step:t});if(t.kind==="initialSchema"||t.kind==="updateSchema")return t.status==="pending"?S.jsx(Mv,{step:t}):S.jsx(CD,{step:t});if(t.kind==="generateSite")return t.status==="pending"&&!_j(t)?S.jsx(Mv,{step:t}):S.jsx(OD,{step:t});throw new Error(`Unknown step kind: ${t.kind}`)}function MD(){const{t}=Ct(),n=aa(),{stepNumber:i}=XE(),{workSession:a,setActiveStepNumber:l}=nr(),u=i===void 0?void 0:Number.parseInt(i,10);if(A.useEffect(()=>(l(u),()=>l(void 0)),[u,l]),tb(async()=>{if(!a||!a.steps)return;a.steps.some(m=>m.stepNumber===u)||await n("/")},[u,a,n]),!a||!a.steps)return S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(It,{className:"p-4",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:t("noSessionData")})})})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]});const f=a.steps.find(d=>d.stepNumber===u);return f?S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(DD,{step:f})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]}):S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(It,{className:"p-4",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:t("stepNotFound")})})})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]})}function LD({sessionToken:t,onSessionExpired:n}){const{workSession:i,isLoading:a,error:l,setWorkSession:u,setIsLoading:f,setError:d,resetSession:m}=nr();return A.useEffect(()=>()=>{Vd()},[]),tb(async()=>{f(!0),d(void 0);try{const p=await Ri({command:"loadWorkSession",sessionToken:t});p.success&&p.result?(u(p.result),bt.changeLanguage(p.result.language)):(d(p.userMessage||"Failed to load session"),p.success||(m(),Dj(),n()))}catch(p){d("Error connecting to server"),console.error(p)}finally{f(!1)}},[t,u,f,d,n]),a?S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Text text-center",children:S.jsx("p",{children:"Loading session..."})})})}):l?S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:l})})})}):i?S.jsx(UA,{children:S.jsxs(hA,{children:[S.jsx(fo,{path:"/",element:S.jsx(Bj,{})}),S.jsx(fo,{path:"/step/:stepNumber",element:S.jsx(MD,{})}),S.jsx(fo,{path:"*",element:S.jsx(fA,{to:"/",replace:!0})})]})}):S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Text text-center",children:S.jsx("p",{children:"Session not available."})})})})}function zD({sessionToken:t}){const{t:n,i18n:i}=Ct(),a=async l=>{const u=l.target.value;await i.changeLanguage(u),t&&await Ri({command:"setLanguage",sessionToken:t,language:u})};return S.jsxs("footer",{className:"App-footer",children:[S.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),S.jsx("span",{className:"LanguageSelector",children:S.jsxs("select",{className:"LanguageSelector-select",value:i.language,onChange:a,"aria-label":"Select language",children:[S.jsx("option",{value:"en",children:"English"}),S.jsx("option",{value:"fr",children:"Français"})]})})]})}function _S({onTokenReceived:t}){const[n,i]=A.useState(!!window.grecaptcha),a=Mf;return A.useEffect(()=>{if(a){if(window.onRecaptchaSubmitted=l=>{t(l)},window.onRecaptchaExpired=()=>{t("")},n===!1&&!window.grecaptcha){i("loading");const l=document.createElement("script");l.src="https://www.google.com/recaptcha/api.js",l.async=!0,l.defer=!0,l.onload=()=>i(!0),document.head.appendChild(l)}else i(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[a,t]),S.jsx(S.Fragment,{children:Mf&&n===!0?S.jsx("div",{className:"g-recaptcha","data-sitekey":Mf,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):S.jsx("div",{className:"RecaptchaBox",children:S.jsx(Zo,{})})})}function UD({onVerified:t}){const{t:n,i18n:i}=Ct(),[a,l]=A.useState(""),[u,f]=A.useState(),d=async()=>{var m;if(a){f(void 0);try{const p=await Ri({command:"newSession",recaptchaToken:a,language:i.language});p.success&&((m=p.result)!=null&&m.token)?t(p.result.token):f("Failed to create session")}catch(p){f("Error connecting to server"),console.error(p)}}};return S.jsx("div",{className:"Layout-center p-4",children:S.jsxs(It,{className:"max-w-2xl p-4",children:[S.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),S.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),u&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{className:"m-0",children:u})}),S.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[S.jsx(_S,{onTokenReceived:l}),S.jsx(Nt,{label:n("agree"),onClick:d,disabled:!a})]})]})})}function BD({expiredToken:t,onTokenRefreshed:n}){const{t:i}=Ct(),[a,l]=A.useState(),u=async f=>{var d;if(f){l(void 0);try{const m=await Ri({command:"renewSession",sessionToken:t,recaptchaToken:f});m.success&&((d=m.result)!=null&&d.token)?n(m.result.token):l(i("sessionRenewalFailed"))}catch(m){l(i("errorConnectingToServer")),console.error(m)}}};return S.jsx("div",{className:"Dialog-backdrop",children:S.jsx("div",{className:"Dialog-container",children:S.jsxs(It,{className:"p-4",children:[S.jsx("h2",{className:"mb-4 text-center",children:i("extendYourSession")}),a&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{className:"m-0",children:a})}),S.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:S.jsx(_S,{onTokenReceived:u})}),S.jsx("p",{className:"InfoText",children:i("newTabRestartMessage")})]})})})}function _D(t){if(!t)return!1;try{const n=t.split(".");if(n.length!==3)return!1;const i=JSON.parse(atob(n[1]));if(!i.exp)return!1;const a=i.exp*1e3;return Date.now()<a?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function qD(){const[t,n]=A.useState(),[i,a]=A.useState(),l=nr(d=>d.resetSession);A.useEffect(()=>{const d=Rs(),m=_D(d);if(!d||!m){l();return}m==="expired"?a(d):n(d)},[l]);const u=d=>{Av(d),n(d)},f=d=>{Av(d),n(d),a(void 0)};return S.jsxs("div",{className:"App",children:[S.jsx("div",{className:"App-content",children:t?S.jsx(LD,{sessionToken:t,onSessionExpired:()=>n(void 0)}):i?S.jsx(BD,{expiredToken:i,onTokenRefreshed:f}):S.jsx(UD,{onVerified:u})}),S.jsx(zD,{sessionToken:t})]})}async function KD(){const t=document.getElementById("site-generator-app");t&&xE.createRoot(t).render(S.jsx(Bf.StrictMode,{children:S.jsx(qD,{})}))}KD().catch(t=>console.error(t));
118
+ ${n("loginEmail")}: ${i.loginEmail}
119
+ ${n("loginPassword")}: ${i.loginPassword}
120
+ ${n("siteUrl")}: ${i.siteUrl}
121
+ ${n("adminUrl")}: ${i.adminUiUrl}
122
+ `.trim();navigator.clipboard.writeText(s)};return b.jsx(Tt,{children:b.jsxs("div",{className:"GeneratedSite",children:[i.status==="pending"&&b.jsxs("div",{className:"GeneratedSite-pending",children:[b.jsx(is,{size:"small"}),b.jsx("p",{children:n("generatingContent")})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"}),b.jsx("div",{className:"GeneratedSite-header",children:b.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),b.jsxs("div",{className:"GeneratedSite-information",children:[b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.adminUiUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.adminUiUrl,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),b.jsx("div",{className:"GeneratedSite-actions",children:b.jsx(rt,{onClick:r,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function NE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"warning"})]})})}function im({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"PendingStep",children:[b.jsx("div",{className:"PendingStep-header",children:b.jsx("h2",{children:n("stepTitle",{stepNumber:i.stepNumber,kind:n(i.kind)})})}),b.jsx("div",{className:"PendingStep-spinner",children:b.jsx(is,{size:"large"})}),i.currentActivity&&b.jsxs("div",{className:"PendingStep-activity",children:[b.jsx("h3",{children:n("currentActivity")}),b.jsx("p",{children:n(`activity.${i.currentActivity}`)})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"})]})})}function EE({step:i}){if(i.status==="failed")return b.jsx(xE,{step:i});if(i.status==="noEffect")return b.jsx(NE,{step:i});if(i.kind==="initialSchema"||i.kind==="updateSchema")return i.status==="pending"?b.jsx(im,{step:i}):b.jsx(bE,{step:i});if(i.kind==="generateSite")return i.status==="pending"&&!A2(i)?b.jsx(im,{step:i}):b.jsx(SE,{step:i});throw new Error(`Unknown step kind: ${i.kind}`)}function RE(){const{t:i}=ot(),n=rl(),{stepNumber:r}=x1(),{workSession:s,setActiveStepNumber:o}=pn(),f=r===void 0?void 0:Number.parseInt(r,10);if(w.useEffect(()=>(o(f),()=>o(void 0)),[f,o]),hm(async()=>{if(!s||!s.steps)return;s.steps.some(m=>m.stepNumber===f)||await n("/")},[f,s,n]),!s||!s.steps)return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("noSessionData")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]});const p=s.steps.find(h=>h.stepNumber===f);return p?b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(EE,{step:p})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]}):b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("stepNotFound")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]})}function wE({sessionToken:i,onSessionExpired:n}){const{workSession:r,isLoading:s,error:o,setWorkSession:f,setIsLoading:p,setError:h,resetSession:m}=pn();return w.useEffect(()=>()=>{ic()},[]),hm(async()=>{p(!0),h(void 0);try{const d=await Ga({command:"loadWorkSession",sessionToken:i});d.success&&d.result?(f(d.result),at.changeLanguage(d.result.language)):(h(d.userMessage||"Failed to load session"),d.success||(m(),E2(),n()))}catch(d){h("Error connecting to server"),console.error(d)}finally{p(!1)}},[i,f,p,h,n]),s?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Loading session..."})})})}):o?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:o})})})}):r?b.jsx(r2,{children:b.jsxs(M1,{children:[b.jsx(Yr,{path:"/",element:b.jsx(j2,{})}),b.jsx(Yr,{path:"/step/:stepNumber",element:b.jsx(RE,{})}),b.jsx(Yr,{path:"*",element:b.jsx(D1,{to:"/",replace:!0})})]})}):b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Session not available."})})})})}function TE({sessionToken:i}){const{t:n,i18n:r}=ot(),s=async o=>{const f=o.target.value;await r.changeLanguage(f),i&&await Ga({command:"setLanguage",sessionToken:i,language:f})};return b.jsxs("footer",{className:"App-footer",children:[b.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),b.jsx("span",{className:"LanguageSelector",children:b.jsxs("select",{className:"LanguageSelector-select",value:r.language,onChange:s,"aria-label":"Select language",children:[b.jsx("option",{value:"en",children:"English"}),b.jsx("option",{value:"fr",children:"Français"})]})})]})}function uv({onTokenReceived:i}){const[n,r]=w.useState(!!window.grecaptcha),s=Do;return w.useEffect(()=>{if(s){if(window.onRecaptchaSubmitted=o=>{i(o)},window.onRecaptchaExpired=()=>{i("")},n===!1&&!window.grecaptcha){r("loading");const o=document.createElement("script");o.src="https://www.google.com/recaptcha/api.js",o.async=!0,o.defer=!0,o.onload=()=>r(!0),document.head.appendChild(o)}else r(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[s,i]),b.jsx(b.Fragment,{children:Do&&n===!0?b.jsx("div",{className:"g-recaptcha","data-sitekey":Do,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):b.jsx("div",{className:"RecaptchaBox",children:b.jsx(is,{})})})}function CE({onVerified:i}){const{t:n,i18n:r}=ot(),[s,o]=w.useState(""),[f,p]=w.useState(),h=async()=>{var m;if(s){p(void 0);try{const d=await Ga({command:"newSession",recaptchaToken:s,language:r.language});d.success&&((m=d.result)!=null&&m.token)?i(d.result.token):p("Failed to create session")}catch(d){p("Error connecting to server"),console.error(d)}}};return b.jsx("div",{className:"Layout-center p-4",children:b.jsxs(Tt,{className:"max-w-2xl p-4",children:[b.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),f&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:f})}),b.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[b.jsx(uv,{onTokenReceived:o}),b.jsx(rt,{label:n("agree"),onClick:h,disabled:!s})]})]})})}function jE({expiredToken:i,onTokenRefreshed:n}){const{t:r}=ot(),[s,o]=w.useState(),f=async p=>{var h;if(p){o(void 0);try{const m=await Ga({command:"renewSession",sessionToken:i,recaptchaToken:p});m.success&&((h=m.result)!=null&&h.token)?n(m.result.token):o(r("sessionRenewalFailed"))}catch(m){o(r("errorConnectingToServer")),console.error(m)}}};return b.jsx("div",{className:"Dialog-backdrop",children:b.jsx("div",{className:"Dialog-container",children:b.jsxs(Tt,{className:"p-4",children:[b.jsx("h2",{className:"mb-4 text-center",children:r("extendYourSession")}),s&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:s})}),b.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:b.jsx(uv,{onTokenReceived:f})}),b.jsx("p",{className:"InfoText",children:r("newTabRestartMessage")})]})})})}function AE(i){if(!i)return!1;try{const n=i.split(".");if(n.length!==3)return!1;const r=JSON.parse(atob(n[1]));if(!r.exp)return!1;const s=r.exp*1e3;return Date.now()<s?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function OE(){const[i,n]=w.useState(),[r,s]=w.useState(),o=pn(h=>h.resetSession);w.useEffect(()=>{const h=vi(),m=AE(h);if(!h||!m){o();return}m==="expired"?s(h):n(h)},[o]);const f=h=>{Wp(h),n(h)},p=h=>{Wp(h),n(h),s(void 0)};return b.jsxs("div",{className:"App",children:[b.jsx("div",{className:"App-content",children:i?b.jsx(wE,{sessionToken:i,onSessionExpired:()=>n(void 0)}):r?b.jsx(jE,{expiredToken:r,onTokenRefreshed:p}):b.jsx(CE,{onVerified:f})}),b.jsx(TE,{sessionToken:i})]})}async function kE(){const i=document.getElementById("site-generator-app");i&&GS.createRoot(i).render(b.jsx(Bo.StrictMode,{children:b.jsx(OE,{})}))}kE().catch(i=>console.error(i));