@squadrules/mcp 5.23.11 → 5.23.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/embed-docs/mem/adapter-migration.md +1 -1
- package/dist/embed-docs/mem/author-adapter.md +1 -1
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
- package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop.md +1 -1
- package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
- package/dist/embed-docs/mem/refine-search.md +1 -1
- package/dist/resources/embedded-mcp-resources.js +8 -8
- package/dist/runtime-lock.json +201 -201
- package/dist/ui/assets/{AccountPage-DTqJKKJZ.js → AccountPage-D-1zhAKV.js} +1 -1
- package/dist/ui/assets/{ErrorAlert-DK5iZ4a9.js → ErrorAlert-BYp1Vc88.js} +1 -1
- package/dist/ui/assets/{HomePage-CdlPPr0G.js → HomePage-Czk9O-Yr.js} +1 -1
- package/dist/ui/assets/{NotFoundPage-D09wYSBK.js → NotFoundPage-CrSsg5zw.js} +1 -1
- package/dist/ui/assets/{ProtocolDetailPage-CR4rQ8sl.js → ProtocolDetailPage-ChU3NOGI.js} +1 -1
- package/dist/ui/assets/{ProtocolEditPage-CTFhKP0e.js → ProtocolEditPage-C7sNYoAj.js} +1 -1
- package/dist/ui/assets/{RichTextEditor-B6msD7tF.js → RichTextEditor-obUgVoDq.js} +1 -1
- package/dist/ui/assets/{RunGuidedPage-DWeOJ9qM.js → RunGuidedPage-DGX8xHsJ.js} +1 -1
- package/dist/ui/assets/{RunsPage-C4Ev7nDx.js → RunsPage-ClI2gWY1.js} +1 -1
- package/dist/ui/assets/{SkillBundlePage-DOB-FblJ.js → SkillBundlePage-Ckzg916R.js} +1 -1
- package/dist/ui/assets/{SpaceSelect-z6megrEL.js → SpaceSelect-gom44QmH.js} +1 -1
- package/dist/ui/assets/{SquadrulesPage-BXBmqPRT.js → SquadrulesPage-B2e2pSG0.js} +1 -1
- package/dist/ui/assets/{StepFlowGraph-BiHocaMm.js → StepFlowGraph-BXNx4M6k.js} +1 -1
- package/dist/ui/assets/{export-skill-zip-DcdfIu6o.js → export-skill-zip-DwblIxuh.js} +1 -1
- package/dist/ui/assets/{index-BXPJNOzR.js → index-pZjW8GP2.js} +3 -3
- package/dist/ui/assets/tiptap-Cx8tsl5Q.js +211 -0
- package/dist/ui/assets/vendor-CP2YRWug.js +31 -0
- package/dist/ui/index.html +2 -2
- package/package.json +9 -9
- package/dist/ui/assets/tiptap-DEsERJZl.js +0 -211
- package/dist/ui/assets/vendor-DuiEbTOR.js +0 -31
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{i as r,t as i}from"./react-C1iE8mnY.js";var a=e=>typeof e==`string`,o=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},s=e=>e==null?``:String(e),c=e=>a(e)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(e)&&!e.includes(`..`)&&![`__proto__`,`constructor`,`prototype`].includes(e),l=e=>e?.callbackApi??e?.constructor?.callbackApi,u=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},d=/###/g,f=e=>e&&e.includes(`###`)?e.replace(d,`.`):e,p=e=>!e||typeof e!=`object`&&typeof e!=`function`,m=(e,t,n)=>{let r=a(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(p(e))return{};let t=f(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return p(e)?{}:{obj:e,k:f(r[i])}},h=(e,t,n)=>{let{obj:r,k:i}=m(e,t,Object);if(r!==void 0&&!(Array.isArray(r)&&i===`length`)||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=m(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=m(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},g=(e,t,n,r)=>{let{obj:i,k:a}=m(e,t,Object);Object.prototype.hasOwnProperty.call(i,a)&&i[a]||(i[a]=[]),i[a].push(n)},_=(e,t)=>{let{obj:n,k:r}=m(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},v=(e,t,n)=>{let r=_(e,n);return r===void 0?_(t,n):r},y=e=>typeof e!=`object`||!e||e instanceof String,b=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?y(e[r])||y(t[r])?n&&(e[r]=t[r]):b(e[r],t[r],n):e[r]=t[r]);return e},x=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),S={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},C=e=>a(e)?e.replace(/[&<>"']/g,e=>S[e]):e,w=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},T=[` `,`,`,`?`,`!`,`;`],E=new w(20),D=(e,t,n)=>{t||=``,n||=``;let r=T.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=E.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},O=(e,t,n=`.`)=>{if(!e)return;if(e[t]||!n)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],typeof t!=`function`&&a!==`__proto__`||Object.prototype.hasOwnProperty.call(i,a)||(t=void 0),t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},k=e=>e?.replace(/_/g,`-`),A={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},ee=class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||A,this.options=t,this.debug=t.debug,this.seen=new Set}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}once(e,t,...n){return!this.debug||this.seen.has(e)||this.seen.size>=1e3?null:(this.seen.add(e),this[t](...n))}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>a(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),a(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},j=new ee,M=new WeakSet,te=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){(typeof e==`string`?e.split(` `):[e]).forEach(e=>{this.observers[e]&&(t?(this.observers[e].delete(t),M.has(t)&&this.observers[e].forEach((n,r)=>{r.listener===t&&this.observers[e].delete(r)})):delete this.observers[e])})}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return n.listener=t,M.add(t),this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},ne=new WeakSet,re=(e,...t)=>{if(t.some(e=>!a(e)))throw TypeError(`${e}: pass language, namespace${e===`addResource`?` and key`:``} as separate strings; the dotted form ('en.translation.key') was removed in i18next v27`)},ie=class extends te{constructor(e,t={ns:[`translation`],defaultNS:`translation`},n=j){super(),this.data=e||{},this.options=t,this.logger=n.create(`resourceStore`),this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,o=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,s=[e,t];n&&(Array.isArray(n)?s.push(...n):a(n)&&i?s.push(...n.split(i)):s.push(n));let c=_(this.data,s);return c!=null||!o||!a(n)?c:O(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){re(`addResource`,e,t,n);let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),this.addNamespaces(t),h(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){re(`addResources`,e,t),Object.keys(n||{}).forEach(r=>{r!==`__proto__`&&r!==`constructor`&&this.addResource(e,t,r,n[r],{silent:!0})}),r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){re(`addResourceBundle`,e,t);let o=[e,t];this.addNamespaces(t);let s=_(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?b(s,n,i):s={...s,...n},h(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>{let n=t[e];return ne.has(n)?!0:!n||Object.keys(n).length===0?!1:(typeof n==`object`&&ne.add(n),!0)})}toJSON(){return this.data}},ae=Symbol(`i18next/PATH_KEY`);function oe(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===ae?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function se(e,t){let{[ae]:n}=e(oe()),r=t?.keySeparator||`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ce=e=>!a(e)&&typeof e!=`boolean`&&typeof e!=`number`,le=class e extends te{constructor(e,t={}){super(),u([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`,`postProcessors`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=(e.logger||j).create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ce(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.includes(n),s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!D(e,n,r);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:a(i)?[i]:i};let o=e.split(n);(n!==r||n===r&&this.options.ns.includes(o[0]))&&(i=o.shift()),e=o.join(r===!1?n:r)}return{key:e,namespaces:a(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=se(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?se(e,{...this.options,...i}):String(e));let o=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,s=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:c,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1],d=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;d===void 0&&(d=`:`);let f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?o?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${c}`:o?{res:c,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:c;let m=this.resolve(t,i),h=m?.res,g=m?.usedKey||c,_=m?.exactUsedKey||c,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!a(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(f,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=this.options.pluralSeparator,D=i.defaultValue??(x?i[`defaultValue${i.ordinal?`${E}ordinal${E}`:E}other`]:void 0),O=i[`defaultValue${C}`]??i[`defaultValue${w}`]??D,k=(T?i[`defaultValue${E}zero`]:void 0)??O,A=h;b&&!h&&S&&(A=k);let ee=ce(A),j=Object.prototype.toString.apply(A),M=b&&A&&ee&&!v.includes(j)&&!(a(y)&&Array.isArray(A)),te=M&&!i.returnObjects&&!this.options.returnObjects;if(te&&this.options.returnedObjectHandler){let e=this.options.returnedObjectHandler(g,A,{...i,ns:l});return o?(m.res=e,m.usedParams=this.getUsedParamsDetails(i),m):e}if(te&&this.logger.warn(`accessing an object - but returnObjects options is not enabled!`),M&&!te){if(s){let e=Array.isArray(A),t=e?[]:{},n=e?_:g;for(let e in A)if(Object.prototype.hasOwnProperty.call(A,e)){let r=`${n}${s}${e}`;t[e]=S&&!h?this.translate(r,{...i,defaultValue:ce(k)?k[e]:void 0,joinArrays:!1,ns:l}):this.translate(r,{...i,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=A[e])}h=t}}else if(b&&a(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,i,m,r);else{let e=!1,n=!1;te&&(h=void 0),!this.isValidLookup(h)&&S&&!(te&&ce(k))&&(e=!0,h=k),!this.isValidLookup(h)&&!(e&&h===``)&&(n=!0,h=c);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,o=S&&k!==h&&this.options.updateMissing;if(!te&&(n||e||o)){if(this.logger.log(o?`updateKey`:`missingKey`,f,u,x&&!o?`${c}${this.pluralResolver.getSuffix(f,i.count,i)}`:c,o?k:h),s){let e=this.resolve(c,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=S&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,r,o,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,r,o,i,void 0,this.utils?.hasLoadedNamespace),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i),r=i[`defaultValue${E}zero`];T&&r!=null&&!t.includes(`${E}zero`)&&t.push(`${E}zero`),t.forEach(t=>{n([e],c+t,i[`defaultValue${t}`]??(t===C?O:D)??k)})}):n(e,c,k))}h=this.extendTranslation(h,t,i,m,r),n&&h===c&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${c}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,e?h:void 0,i))}return o?(m.res=h,m.usedParams=this.getUsedParamsDetails(i),m):h}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let o=a(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),s;if(o){let t=e.includes(this.interpolator.nestingPrefixText)?e.match(this.interpolator.nestingRegexp):null;s=t&&t.length}let c=n.replace&&!a(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||r.usedLng,n),o){let t=e.includes(this.interpolator.nestingPrefixText)?e.match(this.interpolator.nestingRegexp):null,r=t&&t.length;s<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,s=a(o)?[o]:o;if(e!=null&&s?.length&&n.applyPostProcessor!==!1){let i=this.options?.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n;s.forEach(n=>{let r=this.postProcessors?.[n];r?e=r.process(e,t,i,this)??e:this.logger.once(`postProcess:${n}`,`warn`,`postProcess: '${n}' is not registered on this i18next instance; call use() with it on this instance`)})}return e}resolve(e,t={}){let n,r,i,o,s;return a(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?se(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let c=this.extractFromKey(e,t),l=c.key;r=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=t.count!==void 0&&!a(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(a(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(s=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(r=>{if(this.isValidLookup(n))return;o=r;let a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),f&&a.push(l+n)),p){let r=`${l}${this.options.contextSeparator||`_`}${t.context}`;a.push(r),d&&(t.ordinal&&e.startsWith(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),f&&a.push(r+n))}if(d){let n=`${t.ordinal?i:this.options.pluralSeparator}other`;e!==n&&(p&&a.unshift(`${l}${this.options.contextSeparator||`_`}${t.context}${n}`),a.unshift(l+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!a(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},ue=class{constructor(e,t=j){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=t.create(`languageUtils`),this.resolveHierarchyCache={},this.formattedCodes=new Map}clearCache(){this.resolveHierarchyCache={},this.formattedCodes.clear()}getScriptPartFromCode(e){if(e=k(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=k(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(!a(e))return e;let t=this.formattedCodes.get(e);return t===void 0&&(t=this.formatUncached(e),this.formattedCodes.size>=1e3&&this.formattedCodes.clear(),this.formattedCodes.set(e,t)),t}formatUncached(e){let t=e.includes(`-`);if(t||this.options.cleanCode!==!1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}if(n&&(t||n.toLowerCase()===e.toLowerCase()))return this.options.lowerCaseLng?n.toLowerCase():n;if(n)return e.toLowerCase()}return this.options.lowerCaseLng||this.options.cleanCode&&!t?e.toLowerCase():e}isSupportedCode(e){if((this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length)return!0;if(!Array.isArray(this.supportedLngs))return this.supportedLngs.includes(e);let t=this.formatLanguageCode(e);return this.supportedLngs.some(e=>this.formatLanguageCode(e)===t)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.map(e=>this.formatLanguageCode(e)).find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!(!e.includes(`-`)||r.includes(`-`)||e.slice(0,e.indexOf(`-`))!==r))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),a(e)&&(e=[e]),Array.isArray(e))return e;let n=t=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;if(!t)return n(`default`)||[];let r=n(t);return r||=n(this.getScriptPartFromCode(t)),r||=n(this.formatLanguageCode(t)),r||=n(this.getLanguagePartFromCode(t)),r||=n(`default`),r||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||a(t),o=t===void 0&&typeof this.options.fallbackLng==`function`,s=a(e)&&i&&!o,c=null;if(s){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,c=`${e.length}:${e}|${n}`}if(c!==null){let e=this.resolveHierarchyCache[c];if(e!==void 0)return e.slice()}let l=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return a(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&d(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&d(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&d(this.getLanguagePartFromCode(e))):a(e)&&d(this.formatLanguageCode(e)),l.forEach(e=>{let t=this.formatLanguageCode(e);u.includes(t)||d(t)}),c===null?u:(Object.keys(this.resolveHierarchyCache).length>=1e3&&(this.resolveHierarchyCache={}),this.resolveHierarchyCache[c]=u,u.slice())}},de={zero:0,one:1,two:2,few:3,many:4,other:5},fe={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},pe=class{constructor(e,t={},n=j){this.languageUtils=e,this.options=t,this.logger=n.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=k(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),fe;if(!e.match(/-|_/))return fe;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return Object.keys(this.pluralRulesCache).length>=1e3&&(this.pluralRulesCache={}),this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>de[e]-de[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},me=(e,t,n,r=`.`,i=!0)=>{let o=v(e,t,n);return o==null&&i&&a(n)&&(o=O(e,n,r),o===void 0&&(o=O(t,n,r))),o},he=e=>s(e).replace(/["'\\&<>\u0000-\u001f]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`),ge=class{constructor(e={},t=j){this.logger=t.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,suffix:a,formatSeparator:o,unescapeSuffix:s,unescapePrefix:c,nestingPrefix:l,nestingSuffix:u,nestingOptionsSeparator:d,maxReplaces:f,alwaysFormat:p}=e.interpolation;this.escape=t===void 0?C:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?x(i):`{{`,this.suffix=a?x(a):`}}`,this.formatSeparator=o||`,`,this.unescapePrefix=s?``:c?x(c):`-`,this.unescapeSuffix=this.unescapePrefix?``:s?x(s):``,this.prefixText=i||`{{`,this.nestingPrefixText=l||`$t(`,this.nestingPrefix=x(l||`$t(`),this.nestingSuffix=x(u||`)`),this.nestingOptionsSeparator=d||`,`,this.maxReplaces=f||1e3,this.alwaysFormat=p!==void 0&&p,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r,i){let o,c,l,u=e,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=e=>{if(!e.includes(this.formatSeparator)){let i=me(t,d,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(me(t,d,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{-/.test(e)&&this.logger.warn(`nesting options string contains a variable inserted unescaped with {{- }}: if its value is attacker-controlled it can inject additional nesting options (e.g. redirect lng/ns). Use {{var}} there, which is escaped for the options, or sanitise untrusted input before passing it to t().`);let p=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,m=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;if(a(e)&&!e.includes(this.prefixText))return e;if(!i&&(i=e=>this.escapeValue?this.escape(e):e,a(e)&&e.includes(this.nestingPrefixText))){let a=new RegExp(this.nestingRegexp),o=RegExp(`${x(this.nestingOptionsSeparator)}[ ]*{`),s=``,c=0,l;for(;l=a.exec(e);){let a=l.index+this.nestingPrefixText.length,u=o.exec(l[1]),d=u?a+u.index+u[0].length-1:-1,f=a+l[1].lastIndexOf(`}`)+1;d!==-1&&f>d&&!e.startsWith(this.prefixText,d)&&(s+=this.interpolate(e.slice(c,d),t,n,r,i)+e.slice(d,f),c=f)}if(c)return s+this.interpolate(e.slice(c),t,n,r,i)}let h=[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:i}],g=[],_=0;return h.forEach(t=>{for(l=0;o=t.regex.exec(e);){let n=o.index-_,i=g.find(([e,t])=>n>=e&&n<t);if(i){t.regex.lastIndex=i[1]+_;continue}let d=o[1].trim();if(c=f(d),c===void 0){if(typeof p==`function`){let t=p(e,o,r);c=a(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,d.split(this.formatSeparator)[0].trim()))c=``;else if(m){this.logger.debug&&this.logger.once(`${u}\u0000${o[0]}`,`warn`,`missed to pass in variable ${d} for interpolating ${u}`),c=o[0];continue}else this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`),c=``}else!a(c)&&!this.useRawValueToEscape&&(c=s(c));let h=s(t.safeValue(c));if(e=e.slice(0,o.index)+h+e.slice(o.index+o[0].length),m?(t.regex===this.regexpUnescape?g.push([o.index,o.index+h.length]):_+=h.length-o[0].length,t.regex.lastIndex+=h.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o,c=(e,t)=>{let r=this.nestingOptionsSeparator;if(!e.includes(r))return e;let i=e.split(RegExp(`${x(r)}[ ]*{`)),a=`{${i[1]}`;e=i[0];let s,c=e=>{s=this.interpolate(a,t,n.lng,n,e);let r=s.match(/'/g),i=s.match(/"/g);return((r?.length??0)%2==0&&!i||(i?.length??0)%2!=0)&&(s=s.replace(/'/g,`"`)),JSON.parse(s)};try{let e=c(he),n=this.escapeValue?Object.keys(e).filter(e=>e.startsWith(`defaultValue`)||e===`joinArrays`):[];if(n.length){let t=c(e=>he(this.escape(e)));n.forEach(n=>{e[n]=t[n]})}o=t?{...t,...e}:e}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${s}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,e};if(a(e)&&!e.includes(this.nestingPrefixText))return e;let l=new RegExp(this.nestingRegexp),u=``,d=0;for(;r=l.exec(e);){let f=[];o={...n},o=o.replace&&!a(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let p=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(p!==-1&&(f=r[1].slice(p).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,p)),i=t(c.call(this,r[1].trim(),o),o),i&&r[0]===e&&!a(i))return i;a(i)||(i=s(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),f.length&&(i=f.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),u+=e.slice(d,r.index)+s(i),d=l.lastIndex,this.regexp.lastIndex=0}return d?u+e.slice(d):e}},_e=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},ve=1e3,ye=e=>{let t=new Map;return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o;try{o=r+JSON.stringify(a)}catch{return e(k(r),i)(n)}let s=t.get(o);return s||(s=e(k(r),i),t.size>=ve&&t.delete(t.keys().next().value),t.set(o,s)),s(n)}},be=e=>(t,n,r)=>e(k(n),r)(t),xe=class{constructor(e={}){this.logger=j.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){e?.logger?.create&&(this.logger=e.logger.create(`formatter`)),this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ye:be;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ye(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=_e(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Se=1e3,Ce=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},we=class extends te{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=(n.logger||j).create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.failed=new Set,this.queue=[],this.backend?.init?.(n,r.backend,r),this.callbackApi=l(this.backend),this.backend&&this.callbackApi===void 0&&(this.backend.read||this.backend.create)&&this.logger.deprecate(`backend: set callbackApi to declare the calling convention (true: read(language, namespace, callback) and create(languages, namespace, key, fallbackValue, callback, options); false: both return a promise or a value); guessing it from the number of parameters is deprecated`)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:!n.reload&&this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];if(t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0),this.failed.delete(e),t&&(this.failed.add(e),this.failed.size>Se)){let e=this.failed.values().next().value;this.failed.delete(e),this.state[e]<1&&delete this.state[e]}let o={},s=[];if(this.queue.forEach(n=>{if(g(n.loaded,[i],a),Ce(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done){Object.keys(n.loaded).forEach(e=>{Object.prototype.hasOwnProperty.call(o,e)||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0;try{n.errors.length?n.callback(n.errors):n.callback()}catch(e){s.push(e)}}}),this.queue=this.queue.filter(e=>!e.done),this.emit(`loaded`,o),s.length)throw s[0]}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&s&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i):a(o,s)},s=this.backend[n].bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&s.length===2){let n;try{n=s(e,t)}catch(e){o(e);return}n&&typeof n.then==`function`?n.then(e=>o(null,e),o):o(null,n)}else return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();a(e)&&(e=this.languageUtils.toResolveHierarchy(e)),a(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{},s=this.newestCloneHasLoadedNamespace||this.services?.utils?.hasLoadedNamespace){if(s&&!s(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!`);else if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&c.length<6)try{let i;i=this.callbackApi===!1||c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},Te=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:!1,fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!1,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),a(e[1])&&(t.defaultValue=e[1]),a(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ee=e=>(a(e.ns)&&(e.ns=[e.ns]),a(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),a(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),De=()=>{},Oe=e=>{let t=Te(),n={...t,...e};return n.interpolation={...t.interpolation,...e.interpolation},typeof n.overloadTranslationOptionHandler!=`function`&&(n.overloadTranslationOptionHandler=t.overloadTranslationOptionHandler),n},ke=e=>{let t=[].concat(e.supportedLngs||[],e.preload||[]);t.push(...Object.keys(e.resources||{}));let n=e.fallbackLng;return a(n)||Array.isArray(n)?t.push(...[].concat(n)):n&&typeof n==`object`&&Object.keys(n).forEach(e=>{e!=="default"&&t.push(e),t.push(...[].concat(n[e]))}),t},Ae=(e,t)=>!a(t)||c(t)||e.configuredLngs?.has(t)?!1:(e.logger.once(`lng:${t}`,`warn`,`refused the language code '${t.slice(0,64)}' from lng, changeLanguage(), the language detector or loadLanguages(): it is not configured and has other characters than letters, digits, '-', '_', '@' and '.' (or '..', or more than 128). List it in supportedLngs to use it`),!0),je=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Me=class e extends te{constructor(e={},t){if(super(),this.userOptions=Ee(e),this.options=Oe(this.userOptions),this.services={postProcessors:Object.create(null)},this.logger=new ee(null,this.options),this.modules={external:[]},je(this),t&&!this.isInitialized&&!e.isClone){if(!this.userOptions.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(a(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0])),Ee(e);let n={...this.userOptions,...e};this.options=Oe({...this.options,...e}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),this.options.isClone||(this.configuredLngs=new Set([...this.configuredLngs||[],...ke(n)]));let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.logger.init(r(this.modules.logger),this.options);let{logger:e}=this;this.pendingWarnings?.forEach(e=>this.logger.warn(e)),this.pendingWarnings=void 0;let t;t=this.modules.formatter?this.modules.formatter:xe;let n=new ue(this.options,e);this.store=new ie(this.options.resources,this.options,e);let i=this.services;i.logger=e,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new pe(n,{prepend:this.options.pluralSeparator},e),t&&(i.formatter=r(t),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new ge(this.options,e),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},i.backendConnector=new we(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options),i.languageDetector.async&&l(i.languageDetector)===void 0&&this.logger.deprecate(`languageDetector: set callbackApi to declare how the async detect() answers (true: detect(callback); false: detect() returns a promise); guessing it from the number of parameters is deprecated`)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new le(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=De,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[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(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=o(),s=()=>{let e=(e,n)=>{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),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),i}loadResources(e,t=De){let n=t,r=a(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=o();if(typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),!e){let t=Object.keys(this.services.backendConnector.state).map(e=>e.split(`|`)[0]);e=[...new Set([...this.languages||[],...t])].filter(e=>e!==`cimode`)}return t||=this.options.ns,n||=De,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);let t=t=>{if(this.modules[t]&&this.modules[t]!==e){let e=`use: this ${t} replaces the ${t} passed to an earlier use() call; only one ${t} is used per instance`;this.isInitializing||this.isInitialized?this.logger.warn(e):(this.pendingWarnings=this.pendingWarnings||[]).push(e)}this.modules[t]=e};return e.type===`backend`&&t(`backend`),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&t(`languageDetector`),e.type===`i18nFormat`&&t(`i18nFormat`),e.type===`postProcessor`&&(this.services.postProcessors[e.name]=e),e.type===`formatter`&&t(`formatter`),e.type===`3rdParty`&&this.modules.external.push(e),this}hydrate(e,t){return this.options.isClone?this:this.services.resourceStore?(e&&!this.initializedStoreOnce&&(this.services.resourceStore.data=e,Object.values(e).forEach(e=>{Object.keys(e).forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)})}),this.initializedStoreOnce=!0,this.isInitialized=!0),t&&!this.initializedLanguageOnce&&(this.changeLanguage(t),this.initializedLanguageOnce=!0),this):(this.logger.warn(`hydrate: call init() first, the instance has no resource store yet`),this)}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=o();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},s=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let{supportedLngs:n}=this.options;if(t&&!n){let e=[].concat(t).filter(e=>!Ae(this,e));e.length<[].concat(t).length&&(t=e)}let o=a(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(o)?o:this.services.languageUtils.getBestMatchFromCodes(a(t)?[t]:t);n&&Ae(this,s)&&(s=this.services.languageUtils.getBestMatchFromCodes([])),s&&(this.language||r(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector?.cacheUserLanguage?.(s)),this.loadResources(s,e=>{i(e,s)})};if(!e&&this.services.languageDetector&&!this.services.languageDetector.async)s(this.services.languageDetector.detect());else if(!e&&this.services.languageDetector&&this.services.languageDetector.async){let e=l(this.services.languageDetector);e===!1||e===void 0&&this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s)}else s(e);return n}getFixedT(e,t,n,r){let i=r?.scopeNs,o=(e,t,...r)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),a.lng=a.lng||o.lng,a.lngs=a.lngs||o.lngs;let s=a.ns!==void 0&&a.ns!==null;a.ns=a.ns||o.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||o.keyPrefix);let c={...this.options,...a};Array.isArray(i)&&!s&&(c.ns=i),typeof a.keyPrefix==`function`&&(a.keyPrefix=se(a.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return a.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=se(e,c)),`${a.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=se(e,c)),u=a.keyPrefix?`${a.keyPrefix}${l}${e}`:e),this.t(u,a)};return a(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(...e){return this.translator?this.translator.translate(...e):(this.logger.warn(`t: called before init(); returning an empty string`),``)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e,this.translator?.options&&(this.translator.options.defaultNS=e)}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}if(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;let{languageUtils:o}=this.services,s=t.lng?o.isSupportedCode(n)&&o.toResolveHierarchy(n,!1)[0]:n;return!(s&&!a(s,e)||r&&!a(i,e))}loadNamespaces(e,t){let n=o();return!this.options.ns||!this.services.backendConnector?(t&&t(),Promise.resolve()):(a(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n)}loadLanguages(e,t){let n=o();a(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&!Ae(this,e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`ltr`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`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`.split(`.`),n=this.services?.languageUtils||new ue(Te());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=De){let r=t.forkResourceStore;r&&(t={...t},delete t.forkResourceStore);let i={...this.options,preload:!1,...t,isClone:!0},a=new e(i);if(a.logger=t.debug!==void 0||t.prefix!==void 0?this.logger.clone(t):this.logger,[`store`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.postProcessors=Object.create(this.services.postProcessors),a.services.utils={...a.services.utils,hasLoadedNamespace:a.hasLoadedNamespace.bind(a),reloadResources:a.reloadResources.bind(a)},r){let e=t=>{let n=Array.isArray(t)?[...t]:{...t};return Object.keys(n).forEach(t=>{n[t]&&typeof n[t]==`object`&&(n[t]=e(n[t]))}),n};a.store=new ie(e(this.store.data),i,this.logger),a.services.resourceStore=a.store}if(t.interpolation){let e={...Te().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ge(n,this.logger)}return a.configuredLngs=new Set([...this.configuredLngs||[],...ke(t)]),a.translator=new le(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.newestCloneHasLoadedNamespace=a.hasLoadedNamespace.bind(a),a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Me.createInstance,Me.dir,Me.init,Me.loadResources,Me.reloadResources,Me.use,Me.changeLanguage,Me.getFixedT,Me.t,Me.exists,Me.setDefaultNamespace,Me.hasLoadedNamespace,Me.loadNamespaces,Me.loadLanguages;var N=t(r()),Ne=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);He(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Pe=new WeakMap,Fe=new Set,Ie=(e,t,n,r)=>{if(He(n)){let t=Fe,r=e?.services?.logger||e;if(Ue(r)&&(t=Pe.get(r),t||Pe.set(r,t=new Set)),t.has(n))return;t.add(n)}Ne(e,t,n,r)},Le=()=>{try{return!1}catch{return!1}},Re=(e,t)=>()=>{e.isInitialized?t():e.once(`initialized`,()=>t())},ze=(e,t,n)=>{e.loadNamespaces(t,Re(e,n))},Be=(e,t,n,r)=>{if(He(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ze(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,Re(e,r))},Ve=(e,t,n={})=>!t.languages||!t.languages.length?(Ie(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),He=e=>typeof e==`string`,Ue=e=>typeof e==`object`&&!!e,We=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ge={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":`\xA0`," ":`\xA0`,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Ke=e=>Ge[e],qe={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(We,Ke),transDefaultProps:void 0},Je=()=>qe,Ye,Xe=e=>{Ye=e},Ze=()=>Ye,Qe={type:`3rdParty`,init(e){Xe(e)}},$e=(0,N.createContext)(),et=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},tt=(e,t)=>{if(He(t))return t;if(Ue(t)&&He(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},nt=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,rt=e=>new Proxy(e,{get:(e,t)=>t===`__original`?e:Reflect.get(e,t)}),it={t:tt,ready:!1},at=()=>()=>{},ot=(e,{bindI18n:t,bindI18nStore:n},r)=>(t&&e.on(t,r),n&&e.store.on(n,r),()=>{t&&e.off(t,r),n&&e.store.off(n,r)}),st=new WeakMap,ct=(e,t)=>{if(!t)return 0;let n=st.get(e);n||st.set(e,n=new Map);let r=0;return t.split(` `).forEach(t=>{n.has(t)||(n.set(t,0),e.on(t,()=>n.set(t,n.get(t)+1))),r+=n.get(t)}),r},lt=(e,{bindI18n:t,bindI18nStore:n})=>ct(e,t)+ct(e.store,n),ut=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,N.useContext)($e)||{},a=n||r||Ze();a&&!a.reportNamespaces&&(a.reportNamespaces=new et),a||Ie(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,N.useMemo)(()=>({...Je(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c,bindI18n:l,bindI18nStore:u}=o,d=e||i||a?.options?.defaultNS,f=He(d)?[d]:d||[`translation`],p=JSON.stringify(f),m=(0,N.useMemo)(()=>f,[p]);a?.reportNamespaces?.addUsedNamespaces?.(m);let h=(0,N.useCallback)(e=>a?ot(a,{bindI18n:l,bindI18nStore:u},e):at,[a,l,u]),g=(0,N.useRef)(),_=(0,N.useCallback)(()=>{if(!a)return it;let e=!!(a.isInitialized||a.initializedStoreOnce)&&m.every(e=>Ve(e,a,o)),n=t.lng||a.language,r=lt(a,o),i=typeof c==`function`?se(c,{...a.options,ns:m}):c,s=g.current;if(s&&s.i18n===a&&s.ready===e&&s.lng===n&&s.namespaces===m&&s.keyPrefix===i&&s.revision===r)return s;let l={t:a.getFixedT(n,o.nsMode===`fallback`?m:m[0],c,{scopeNs:m}),i18n:a,ready:e,lng:n,namespaces:m,keyPrefix:i,revision:r};return g.current=l,l},[a,m,c,o,t.lng]),[v,y]=(0,N.useState)(0),{t:b,ready:x}=(0,N.useSyncExternalStore)(h,_,_),S;a&&s&&!x&&(S=new Promise(e=>{let n=()=>e();t.lng?Be(a,t.lng,m,n):ze(a,m,n)}),{t:b,ready:x}=_()),(0,N.useEffect)(()=>{if(a&&!x&&!s){let e=()=>y(e=>e+1);t.lng?Be(a,t.lng,m,e):ze(a,m,e)}},[a,t.lng,m,x,s,v]);let C=a||{},w=(0,N.useRef)(null),T=(0,N.useMemo)(()=>{let e=C,t=nt(e);(w.current?.original!==e||w.current.lang!==t)&&(w.current={original:e,lang:t,wrapper:rt(e)});let n=w.current.wrapper,r=!x&&!s?(...e)=>(Ie(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),b(...e)):b,i=[r,n,x];return i.t=r,i.i18n=n,i.ready=x,i},[b,C,x,C.resolvedLanguage,C.language,C.languages]);if(a&&s&&!x)throw Le()&&Ie(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),S;return T},dt=N.createContext(!1),ft=()=>N.useContext(dt);dt.Provider;var pt=i(),mt=N.createContext(void 0),ht=e=>{let t=N.useContext(mt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gt=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,pt.jsx)(mt.Provider,{value:e,children:t}));function _t(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vt=N.createContext(_t()),yt=()=>N.useContext(vt),bt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xt=new class extends bt{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},St={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ct=new class{#e=St;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function wt(e){setTimeout(e,0)}var Tt=typeof window>`u`||`Deno`in globalThis;function P(){}function Et(e,t){return typeof e==`function`?e(t):e}function Dt(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ot(e,t){return Math.max(e+(t||0)-Date.now(),0)}function F(e,t){return typeof e==`function`?e(t):e}function kt(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==jt(o,t.options))return!1}else if(!Nt(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function At(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Mt(t.options.mutationKey)!==Mt(a))return!1}else if(!Nt(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function jt(e,t){return(t?.queryKeyHashFn||Mt)(e)}function Mt(e){return JSON.stringify(e,(e,t)=>Rt(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Nt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Nt(e[r],t[r]))return!1;return!0}return!1}var Pt=Object.prototype.hasOwnProperty;function Ft(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Lt(e)&&Lt(t);if(!r&&!(Rt(e)&&Rt(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Pt.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Ft(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function It(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!Pt.call(t,n)||e[n]!==t[n])return!1;return!0}function Lt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rt(e){if(!zt(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!zt(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function zt(e){return Object.prototype.toString.call(e)===`[object Object]`}function Bt(e){return new Promise(t=>{Ct.setTimeout(t,e)})}function Vt(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Ft(e,t)}function Ht(e,t,n,r){let i=r?[t,...e]:[...e,t];return n&&i.length>n?r?i.slice(0,n):i.slice(-n):i}var Ut=Symbol();function Wt(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ut?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gt(e,t){return typeof e==`function`?e(...t):!!e}var Kt=Symbol();function qt(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[Kt]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var Jt=()=>Tt,Yt=()=>Jt();function Xt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{qt(e,()=>t.signal,()=>n=!0,l[Kt])},d=Wt(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options;return{pages:Ht(e.pages,o,s,i),pageParams:Ht(e.pageParams,r,s,i)}};if(i&&a.length){let e=i===`backward`,t=e?Qt:Zt,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:Zt(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Zt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $t=wt;function en(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=$t,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var I=en(),tn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dt(this.gcTime)&&(this.#e=Ct.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yt()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Ct.clearTimeout(this.#e),this.#e=void 0)}},nn=new class extends bt{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function rn(e){return Math.min(1e3*2**e,3e4)}function an(e){return(e??`online`)!==`online`||nn.isOnline()}var on=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function sn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(P);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new on(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>xt.isFocused()&&(e.networkMode===`always`||nn.isOnline())&&e.canRun(),p=()=>an(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Yt()?0:3),a=e.retryDelay??rn,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Bt(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var cn=class extends tn{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=dn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=dn(this.options);e.data!==void 0&&(this.setState(un(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Vt(this.state.data,e,this.options);return this.#u({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#u({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(P).catch(P):Promise.resolve()}destroy(){this.cancel({silent:!0}),super.destroy()}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>F(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ut||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>F(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ot(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.#l()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#u({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[Kt]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Wt(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#u({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=sn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof on&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#u({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#u({type:`pause`})},onContinue:()=>{this.#u({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof on){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#u({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.#l()}})();return this.#o=s,o.start(),s}#l(){this.#r.get(this.queryHash)===this&&this.scheduleGc()}#u(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ln(t.data,this.options),fetchMeta:e.meta??null};case`success`:{let n={...t,...un(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n}case`error`:{let n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`,isInvalidated:!0}}case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),I.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ln(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:an(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function un(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function dn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var fn=class extends bt{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),mn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof F(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!It(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&gn(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(t.enabled,this.#t)||F(this.options.staleTime,this.#t)!==F(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return It(this.getCurrentResult(),n)||(this.#r=n,this.#i=e),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(P)),t}#h(e){return!Yt()&&F(this.options.enabled,this.#t)!==!1&&Dt(e)}#g(){this.#b();let e=F(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Ot(this.#r.dataUpdatedAt,e)+1;this.#u=Ct.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return F(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Ct.setInterval(()=>{(this.options.refetchIntervalInBackground||xt.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Ct.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Ct.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=e===n?this.#n:e.state,{state:s}=e,c={...s},l=!1,u;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&mn(e,t),o=i&&gn(e,n,t,r);(a||o)&&(c={...c,...ln(s.data,e.options)}),t._optimisticResults===`isRestoring`&&(c.fetchStatus=`idle`)}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(t.placeholderData!==void 0&&u===void 0&&p===`pending`){let e,n=i?.isPlaceholderData&&t.placeholderData===a?.placeholderData;n?(e=i.data,m=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,(n||e!==void 0)&&(p=`success`,u=Vt(t.select&&!m?this.#s:i?.data,e,t),l=!0)}if(t.select&&u!==void 0&&!m){if(u===this.#s&&t.select===this.#o)u=this.#c;else try{this.#o=t.select,this.#s=u,u=t.select(u),u=Vt(i?.data,u,t),this.#c=u,this.#a=null}catch(e){this.#a=e}}else u===void 0&&(this.#s=void 0,this.#a=null);this.#a&&(d=this.#a,u=this.#c,f=i?.error===d?i.errorUpdatedAt:Date.now(),p=`error`,l=!1);let h=c.fetchStatus===`fetching`,g=p===`pending`,_=p===`error`,v=g&&h,y=u!==void 0;return{status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:p===`success`,isError:_,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>o.dataUpdateCount||c.errorUpdateCount>o.errorUpdateCount,isFetching:h,isRefetching:h&&!g,isLoadingError:_&&!y,isPaused:c.fetchStatus===`paused`,isPlaceholderData:l,isRefetchError:_&&y,isStale:_n(e,t),refetch:this.refetch,isEnabled:F(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.options,this.#t.state.data!==void 0&&(this.#l=this.#t),It(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();I.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function pn(e,t){return F(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||F(t.retryOnMount,e)!==!1)}function mn(e,t){return pn(e,t)||e.state.data!==void 0&&hn(e,t,t.refetchOnMount)}function hn(e,t,n){if(F(t.enabled,e)!==!1&&F(t.staleTime,e)!==`static`){let r=F(n,e);return r===`always`||r!==!1&&_n(e,t)}return!1}function gn(e,t,n,r){return(e!==t||F(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&_n(e,n)}function _n(e,t){return F(t.enabled,e)!==!1&&e.isStaleByTime(F(t.staleTime,e))}var vn=class extends tn{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||yn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.#n.has(this)&&this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=sn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),I.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function yn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var bn=class extends bt{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new vn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=xn(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){e.destroy();let t=xn(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}has(e){return this.#e.has(e)}canRun(e){let t=xn(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=xn(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){I.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>e.destroy()),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>At(t,e))}findAll(e={}){return this.getAll().filter(t=>At(e,t))}notify(e){I.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return I.batch(()=>Promise.all(e.map(e=>e.continue().catch(P))))}};function xn(e){return e.options.scope?.id}var Sn=class extends bt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),It(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Mt(t.mutationKey)!==Mt(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??yn();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){I.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Cn=class extends bt{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??jt(r,t),a=this.get(i);return a||(a=new cn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){I.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>kt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>kt(e,t)):t}notify(e){I.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){I.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},wn=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Cn,this.#t=e.mutationCache||new bn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=xt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=nn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(F(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Et(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return I.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;I.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return I.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=I.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(P).catch(P)}invalidateQueries(e,t={}){return I.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=I.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(P)),r?Promise.resolve():t}));return Promise.all(r).then(P)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(F(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(F(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(P).catch(P)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(P).catch(P)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return nn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Mt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Nt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Mt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Nt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=jt(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ut&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Tn=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Gt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},En=e=>{N.useEffect(()=>{e.clearReset()},[e])},Dn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Gt(n,[e.error,r])),On=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},kn=(e,t)=>e?.suspense&&t.isPending,An=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function jn(e,t,n){let r=ft(),i=yt(),a=ht(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,On(o),Tn(o,i,s),En(i);let[l]=N.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);N.useEffect(()=>{l.setOptions(o)},[o,l]);let d=!r&&c;if(N.useSyncExternalStore(N.useCallback(e=>{let t=d?l.subscribe(I.batchCalls(e)):P;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),kn(o,u))throw An(o,l,i);if(Dn({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Mn(e,t){return jn(e,fn,t)}function Nn(e,t){let n=ht(t),[r]=N.useState(()=>new Sn(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);let i=N.useSyncExternalStore(N.useCallback(e=>r.subscribe(I.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=N.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(P)},[r]);if(i.error&&Gt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Pn=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fn=/^[\\/]{2}/;function In(e,t){return t+e.replace(/\\/g,`/`)}var Ln=`popstate`;function Rn(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function zn(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Un(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Wn(t)}return Kn(t,n,null,e)}function L(e,t){if(e===!1||e==null)throw Error(t)}function Bn(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Vn(){return Math.random().toString(36).substring(2,10)}function Hn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Un(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Gn(t):t,state:n,key:t&&t.key||r||Vn(),mask:i}}function Wn({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Gn(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Kn(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Rn(e)?e:Un(h.location,e,t);n&&n(r,e),l=u()+1;let d=Hn(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Rn(e)?e:Un(h.location,e,t);n&&n(r,e),l=u();let i=Hn(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return qn(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Ln,d),c=e,()=>{i.removeEventListener(Ln,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function qn(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),L(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Wn(t);return i=i.replace(/ $/,`%20`),!n&&Fn.test(i)&&(i=r+i),new URL(i,r)}function Jn(e,t,n=`/`){return Yn(e,t,n,!1)}function Yn(e,t,n,r,i){let a=gr((typeof t==`string`?Gn(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Xn(e),s=null,c=hr(a);for(let e=0;s==null&&e<o.length;++e)s=dr(o[e],c,r);return s}function Xn(e){let t=Zn(e);return $n(t),t}function Zn(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;L(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=wr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(L(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Zn(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:lr(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=mr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Qn(e.path))a(e,t,!0,n)}),t}function Qn(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Qn(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function $n(e){e.sort((e,t)=>e.score===t.score?ur(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var er=/^:[\w-]+$/,tr=/^:[\w-]+/,nr=3.5,rr=3,ir=2,ar=1,or=10,sr=-2,cr=e=>e===`*`;function lr(e,t){let n=e.split(`/`),r=n.length;return n.some(cr)&&(r+=sr),t&&(r+=ir),n.filter(e=>!cr(e)).reduce((e,t)=>e+(er.test(t)?rr:tr.test(t)?nr:t===``?ar:or),r)}function ur(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function dr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?pr(u,l,s.matcher,s.compiledParams):fr(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=fr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:wr([a,d.pathname]),pathnameBase:Er(wr([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=wr([a,d.pathnameBase]))}return o}function fr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=mr(e.path,e.caseSensitive,e.end);return pr(e,t,n,r)}function pr(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Tr(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Tr(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function mr(e,t=!1,n=!0){Bn(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function hr(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Bn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function gr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function _r(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Gn(e):e,a;return n?(n=Cr(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?vr(n.substring(1),`/`):vr(n,t)):a=t,{pathname:a,search:Dr(r),hash:Or(i)}}function vr(e,t){let n=Tr(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function yr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function br(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function xr(e){let t=br(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Sr(e,t,n,r=!1){let i;typeof e==`string`?i=Gn(e):(i={...e},L(!i.pathname||!i.pathname.includes(`?`),yr(`?`,`pathname`,`search`,i)),L(!i.pathname||!i.pathname.includes(`#`),yr(`#`,`pathname`,`hash`,i)),L(!i.search||!i.search.includes(`#`),yr(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=_r(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Cr=e=>e.replace(/[\\/]{2,}/g,`/`),wr=e=>Cr(e.join(`/`));function Tr(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Er=e=>Tr(e).replace(/^\/*/,`/`),Dr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Or=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,kr=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ar(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function jr(e){return wr(e.map(e=>e.route.path).filter(Boolean))||`/`}var Mr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Nr(e,t){let n=e;if(typeof n!=`string`||!Pn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Mr)try{let e=new URL(window.location.href),r=Fn.test(n)?new URL(In(n,e.protocol)):new URL(n),a=gr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Bn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Pr=new URL(`http://localhost`);function Fr(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Pr)}catch{return Pr}}function Ir(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Lr(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Rr(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ir(i,n),s=!Ir(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Lr(e,i)||!Ir(i,a)))throw Error(`External navigation is not allowed`)}var zr=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(zr);var Br=[`GET`,...zr];new Set(Br);var Vr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Hr(e){try{return Vr.includes(new URL(e).protocol)}catch{return!1}}var Ur=N.createContext(null);Ur.displayName=`DataRouter`;var Wr=N.createContext(null);Wr.displayName=`DataRouterState`;var Gr=N.createContext(null);Gr.displayName=`DataRouterData`;var Kr=N.createContext(null);Kr.displayName=`DataRouterNavigation`;var qr=N.createContext(!1);function Jr(){return N.useContext(qr)}var Yr=N.createContext({isTransitioning:!1});Yr.displayName=`ViewTransition`;var Xr=N.createContext(null);Xr.displayName=`Fetchers`;var Zr=N.createContext(null);Zr.displayName=`Await`;var Qr=N.createContext(null);Qr.displayName=`Navigation`;var $r=N.createContext(null);$r.displayName=`Location`;var ei=N.createContext({outlet:null,matches:[],isDataRoute:!1});ei.displayName=`Route`;var ti=N.createContext(!1);ti.displayName=`IsDataRoute`;var ni=N.createContext(void 0);ni.displayName=`RouteId`;var ri=N.createContext(null);ri.displayName=`RouteError`;var ii=`REACT_ROUTER_ERROR`,ai=`REDIRECT`,oi=`ROUTE_ERROR_RESPONSE`;function si(e){if(e.startsWith(`${ii}:${ai}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ci(e){if(e.startsWith(`${ii}:${oi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new kr(t.status,t.statusText,t.data)}catch{}}function li(e,{relative:t}={}){L(ui(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(Qr),{hash:i,pathname:a,search:o}=vi(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:wr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ui(){return N.useContext($r)!=null}function di(){return L(ui(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext($r).location}var fi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function pi(){return N.useContext(ti)?Pi():mi()}function mi(){L(ui(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(Ur),{basename:t,navigator:n}=N.useContext(Qr),{matches:r}=N.useContext(ei),{pathname:i}=di(),a=JSON.stringify(xr(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(Bn(o.current,fi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Sr(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:wr([t,c.pathname])),Rr(typeof r==`string`?r:Wn(r),n.createHref(c),Fr(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var hi=N.createContext(null);function gi(e){let t=N.useContext(ei).outlet;return N.useMemo(()=>t&&N.createElement(hi.Provider,{value:e},t),[t,e])}function _i(){let{matches:e}=N.useContext(ei);return e[e.length-1]?.params??{}}function vi(e,{relative:t}={}){let{matches:n}=N.useContext(ei),{pathname:r}=di(),i=JSON.stringify(xr(n));return N.useMemo(()=>Sr(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function yi(e,t){return bi(e,t)}function bi(e,t,n){L(ui(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(Qr),{matches:i}=N.useContext(ei),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=di(),l;if(t){let e=typeof t==`string`?Gn(t):t;L(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):Jn(e,{pathname:d});let p=Di(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:wr([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:wr([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement($r.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function xi(){let e=Ni(),t=Ar(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Si=N.createElement(xi,null),Ci=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=qr;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=ci(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(ei.Provider,{value:this.props.routeContext},N.createElement(ti.Provider,{value:this.props.routeContext.isDataRoute},N.createElement(ni.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},N.createElement(ri.Provider,{value:e,children:this.props.component}))));return this.context?N.createElement(Ti,{error:e},t):t}},wi=new WeakMap;function Ti({children:e,error:t}){let{basename:n,navigator:r}=N.useContext(Qr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=si(t.digest);if(e){let i=wi.get(t);if(i)throw i;let a=Nr(e.location,n),o=a.absoluteURL||a.to;if(Rr(e.location,o,Fr(r),`allow-explicit`),Hr(o))throw Error(`Invalid redirect location`);if(Mr&&!wi.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw wi.set(t,n),n}}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ei({routeContext:e,match:t,children:n}){let r=N.useContext(Ur);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(ei.Provider,{value:e},N.createElement(ti.Provider,{value:e.isDataRoute},N.createElement(ni.Provider,{value:t.route.id},n)))}function Di(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);L(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:jr(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Si,o&&(s<0&&c===0?(Ii(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(Ei,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(Ci,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Oi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ki(e){let t=N.useContext(Ur);return L(t,Oi(e)),t}function Ai(e){let t=N.useContext(Wr);return L(t,Oi(e)),t}function ji(e){let t=N.useContext(Gr);return L(t,Oi(e)),t}function Mi(e){let t=N.useContext(ni);return L(t,`${e} can only be used on routes that contain a unique "id"`),t}function Ni(){let e=N.useContext(ri),t=ji(`useRouteError`),n=Mi(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Pi(){let{router:e}=ki(`useNavigate`),t=Mi(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{Bn(n.current,fi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Fi={};function Ii(e,t,n){!t&&!Fi[e]&&(Fi[e]=!0,Bn(!1,n))}N.memo(Li);function Li({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=N.useContext(Ur);return L(a,`You must render this element inside a <DataRouterContext.Provider> element`),bi(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Ri(e){return gi(e.context)}function zi(e){L(!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 Bi({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){L(!ui(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Gn(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=gr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Bn(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:N.createElement(Qr.Provider,{value:c},N.createElement($r.Provider,{children:t,value:h}))}function Vi({children:e,location:t}){return yi(Hi(e),t)}N.Component;function Hi(e,t=[]){let n=[];return N.Children.forEach(e,(e,r)=>{if(!N.isValidElement(e))return;let i=[...t,r];if(e.type===N.Fragment){n.push.apply(n,Hi(e.props.children,i));return}L(e.type===zi,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;L(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=Hi(a.children,i)),n.push(o)}),n}var Ui=`application/x-www-form-urlencoded`;function Wi(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Gi(e){return Wi(e)&&e.tagName.toLowerCase()===`button`}function Ki(e){return Wi(e)&&e.tagName.toLowerCase()===`form`}function qi(e){return Wi(e)&&e.tagName.toLowerCase()===`input`}function Ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yi(e,t){return e.button===0&&(!t||t===`_self`)&&!Ji(e)}function Xi(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Zi(e,t){let n=Xi(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Qi=null;function $i(){if(Qi===null)try{new FormData(document.createElement(`form`),0),Qi=!1}catch{Qi=!0}return Qi}var ea=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ta(e){return e!=null&&!ea.has(e)?(Bn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ui}"`),null):e}function na(e,t){let n,r,i,a,o;if(Ki(e)){let o=e.getAttribute(`action`);r=o?gr(o,t):null,n=e.getAttribute(`method`)||`get`,i=ta(e.getAttribute(`enctype`))||Ui,a=new FormData(e)}else if(Gi(e)||qi(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?gr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=ta(e.getAttribute(`formenctype`))||ta(o.getAttribute(`enctype`))||Ui,a=new FormData(o,e),!$i()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Wi(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Ui,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function ra(e,t){if(e===!1||e==null)throw Error(t)}function ia(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function aa(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function oa(e){return e!=null&&typeof e.page==`string`}function sa(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ca(e,t,n){return pa((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await aa(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(sa).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function la(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ua(e,t,{includeHydrateFallback:n}={}){return da(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function da(e){return[...new Set(e)]}function fa(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function pa(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!oa(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(fa(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var ma=N.createContext(void 0);ma.displayName=`FrameworkContext`;function ha(){let e=N.useContext(ma);return ra(e,`You must render this element inside a <HydratedRouter> element`),e}function ga(e,t){let n=N.useContext(ma),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),N.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:_a(s,p),onBlur:_a(c,m),onMouseEnter:_a(l,p),onMouseLeave:_a(u,m),onTouchStart:_a(d,p)}]:[a,f,{}]:[!1,f,{}]}function _a(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function va({page:e,...t}){let n=Jr(),{nonce:r}=ha(),{router:i}=ki(`PrefetchPageLinks`),a=N.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(ba,{page:e,matches:a,...t}):N.createElement(xa,{page:e,matches:a,...t})):null}function ya(e){let{manifest:t,routeModules:n}=ha(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return ca(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ba({page:e,matches:t,...n}){let r=di(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ia(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function xa({page:e,matches:t,...n}){let r=di(),{manifest:i,routeModules:a}=ha(),{matches:o}=Ai(`PrefetchPageLinks`),{loaderData:s}=ji(`PrefetchPageLinks`),c=N.useMemo(()=>la(e,t,o,i,r,`data`),[e,t,o,i,r]),l=N.useMemo(()=>la(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=ia(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=N.useMemo(()=>ua(l,i),[l,i]),f=ya(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Sa(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Ca=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ca&&(window.__reactRouterVersion=`8`)}catch{}function wa({basename:e,children:t,useTransitions:n,window:r}){let i=N.useRef(null);i.current??=zn({window:r,v5Compat:!0});let a=i.current,[o,s]=N.useState({action:a.action,location:a.location}),c=N.useCallback(e=>{n===!1?s(e):N.startTransition(()=>s(e))},[n]);return N.useLayoutEffect(()=>a.listen(c),[a,c]),N.createElement(Bi,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Ta=N.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=N.useContext(Qr),v=typeof l==`string`&&Pn.test(l),y=Nr(l,h);l=y.to;let b=li(l,{relative:r}),x=di(),S=null;if(o){let e=Sr(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:wr([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=ga(n,p),E=Oa(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=N.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Sa(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?N.createElement(N.Fragment,null,k,N.createElement(va,{page:b})):k});Ta.displayName=`Link`;var Ea=N.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=vi(a,{relative:c.relative}),d=di(),f=N.useContext(Kr),{navigator:p,basename:m}=N.useContext(Qr),h=f!=null&&Pa(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=gr(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(Ta,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Ea.displayName=`NavLink`;var Da=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(Qr),g=Ma(),_=Na(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Pn.test(s);return N.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?N.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Da.displayName=`Form`;function Oa(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=pi(),d=di(),f=vi(e,{relative:o});return N.useCallback(p=>{if(Yi(p,t)){p.preventDefault();let t=n===void 0?Wn(d)===Wn(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function ka(e){Bn(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(Xi(e)),n=N.useRef(!1),r=di(),i=N.useMemo(()=>Zi(r.search,n.current?null:t.current),[r.search]),a=pi();return[i,N.useCallback((e,t)=>{let r=Xi(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Aa=0,ja=()=>`__${String(++Aa)}__`;function Ma(){let{router:e}=ki(`useSubmit`),{basename:t}=N.useContext(Qr),n=Mi(`useSubmit`),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=na(e,t);a.navigate===!1?await r(a.fetcherKey||ja(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Na(e,{relative:t}={}){let{basename:n}=N.useContext(Qr),r=N.useContext(ei);L(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...vi(e||`.`,{relative:t})},o=di();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:wr([n,a.pathname])),Wn(a)}function Pa(e,{relative:t}={}){let n=N.useContext(Yr);L(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ki(`useViewTransitionState`),i=vi(e,{relative:t});if(!n.isTransitioning)return!1;let a=gr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=gr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fr(i.pathname,o)!=null||fr(i.pathname,a)!=null}function Fa(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ia=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,La=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ra={};function za(e,t){return((t||Ra).jsx?La:Ia).test(e)}var Ba=/[ \t\n\f\r]/g;function Va(e){return typeof e==`object`?e.type===`text`&&Ha(e.value):Ha(e)}function Ha(e){return e.replace(Ba,``)===``}var Ua=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ua.prototype.normal={},Ua.prototype.property={},Ua.prototype.space=void 0;function Wa(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ua(n,r,t)}function Ga(e){return e.toLowerCase()}var Ka=class{constructor(e,t){this.attribute=t,this.property=e}};Ka.prototype.attribute=``,Ka.prototype.booleanish=!1,Ka.prototype.boolean=!1,Ka.prototype.commaOrSpaceSeparated=!1,Ka.prototype.commaSeparated=!1,Ka.prototype.defined=!1,Ka.prototype.mustUseProperty=!1,Ka.prototype.number=!1,Ka.prototype.overloadedBoolean=!1,Ka.prototype.property=``,Ka.prototype.spaceSeparated=!1,Ka.prototype.space=void 0;var qa=e({boolean:()=>R,booleanish:()=>z,commaOrSpaceSeparated:()=>Za,commaSeparated:()=>Xa,number:()=>B,overloadedBoolean:()=>Ya,spaceSeparated:()=>V}),Ja=0,R=Qa(),z=Qa(),Ya=Qa(),B=Qa(),V=Qa(),Xa=Qa(),Za=Qa();function Qa(){return 2**++Ja}var $a=Object.keys(qa),eo=class extends Ka{constructor(e,t,n,r){let i=-1;if(super(e,t),to(this,`space`,r),typeof n==`number`)for(;++i<$a.length;){let e=$a[i];to(this,$a[i],(n&qa[e])===qa[e])}}};eo.prototype.defined=!0;function to(e,t,n){n&&(e[t]=n)}function no(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ga(r)]=r,n[Ga(a.attribute)]=r}return new Ua(t,n,e.space)}var ro=no({properties:{ariaActiveDescendant:null,ariaAtomic:z,ariaAutoComplete:null,ariaBusy:z,ariaChecked:z,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:z,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:z,ariaFlowTo:V,ariaGrabbed:z,ariaHasPopup:null,ariaHidden:z,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:z,ariaMultiLine:z,ariaMultiSelectable:z,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:z,ariaReadOnly:z,ariaRelevant:null,ariaRequired:z,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:z,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function io(e,t){return t in e?e[t]:t}function ao(e,t){return io(e,t.toLowerCase())}var oo=no({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Xa,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:V,autoFocus:R,autoPlay:R,blocking:V,capture:null,charSet:null,checked:R,cite:null,className:V,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:z,controls:R,controlsList:V,coords:B|Xa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Ya,draggable:z,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:V,height:B,hidden:Ya,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:V,itemRef:V,itemScope:R,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:R,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:V,required:R,reversed:R,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:z,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:z,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:z,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:Xa,part:V,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:ao}),so=no({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Za,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xa,g2:Xa,glyphName:Xa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Za,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Za,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Za,rev:Za,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Za,requiredFeatures:Za,requiredFonts:Za,requiredFormats:Za,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Za,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Za,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Za,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:io}),co=no({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),lo=no({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ao}),uo=no({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),fo={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},po=/[A-Z]/g,mo=/-[a-z]/g,ho=/^data[-\w.:]+$/i;function go(e,t){let n=Ga(t),r=t,i=Ka;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ho.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(mo,vo);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!mo.test(e)){let n=e.replace(po,_o);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=eo}return new i(r,t)}function _o(e){return`-`+e.toLowerCase()}function vo(e){return e.charAt(1).toUpperCase()}var yo=Wa([ro,oo,co,lo,uo],`html`),bo=Wa([ro,so,co,lo,uo],`svg`);function xo(e){return e.join(` `).trim()}var So=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
2
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Co=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(So());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),wo=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),To=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Co()),i=wo();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Eo=Oo(`end`),Do=Oo(`start`);function Oo(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ko(e){let t=Do(e),n=Eo(e);if(t&&n)return{start:t,end:n}}function Ao(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Mo(e.position):`start`in e||`end`in e?Mo(e):`line`in e||`column`in e?jo(e):``}function jo(e){return No(e&&e.line)+`:`+No(e&&e.column)}function Mo(e){return jo(e&&e.start)+`-`+jo(e&&e.end)}function No(e){return e&&typeof e==`number`?e:1}var H=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Ao(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};H.prototype.file=``,H.prototype.name=``,H.prototype.reason=``,H.prototype.message=``,H.prototype.stack=``,H.prototype.column=void 0,H.prototype.line=void 0,H.prototype.ancestors=void 0,H.prototype.cause=void 0,H.prototype.fatal=void 0,H.prototype.place=void 0,H.prototype.ruleId=void 0,H.prototype.source=void 0;var Po=t(To(),1),Fo={}.hasOwnProperty,Io=new Map,Lo=/[A-Z]/g,Ro=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zo=new Set([`td`,`th`]),Bo=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Vo(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Qo(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Zo(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?bo:yo,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ho(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ho(e,t,n){if(t.type===`element`)return Uo(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Wo(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ko(e,t,n);if(t.type===`mdxjsEsm`)return Go(e,t);if(t.type===`root`)return qo(e,t,n);if(t.type===`text`)return Jo(e,t)}function Uo(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=bo,e.schema=i),e.ancestors.push(t);let a=is(e,t.tagName,!1),o=$o(e,t),s=ts(e,t);return Ro.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Va(e)})),Yo(e,o,a,t),Xo(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wo(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}as(e,t.position)}function Go(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);as(e,t.position)}function Ko(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=bo,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:is(e,t.name,!0),o=es(e,t),s=ts(e,t);return Yo(e,o,a,t),Xo(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qo(e,t,n){let r={};return Xo(r,ts(e,t)),e.create(t,e.Fragment,r,n)}function Jo(e,t){return t.value}function Yo(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xo(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Zo(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Qo(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Do(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function $o(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Fo.call(t.properties,i)){let a=ns(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zo.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function es(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else as(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else as(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function ts(e,t){let n=[],r=-1,i=e.passKeys?new Map:Io;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Ho(e,a,o);s!==void 0&&n.push(s)}return n}function ns(e,t,n){let r=go(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Fa(n):xo(n)),r.property===`style`){let t=typeof n==`object`?n:rs(e,String(n));return e.stylePropertyNameCase===`css`&&(t=os(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?fo[r.property]||r.property:r.attribute,n]}}function rs(e,t){try{return(0,Po.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new H("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Bo+`#cannot-parse-style-attribute`,r}}function is(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=za(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=za(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Fo.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);as(e)}function as(e,t){let n=new H("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Bo+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function os(e){let t={},n;for(n in e)Fo.call(e,n)&&(t[ss(n)]=e[n]);return t}function ss(e){let t=e.replace(Lo,cs);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function cs(e){return`-`+e.toLowerCase()}var ls={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},us={};function ds(e,t){let n=t||us;return fs(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function fs(e,t,n){if(ms(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ps(e.children,t,n)}return Array.isArray(e)?ps(e,t,n):``}function ps(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=fs(e[i],t,n);return r.join(``)}function ms(e){return!!(e&&typeof e==`object`)}var hs=document.createElement(`i`);function gs(e){let t=`&`+e+`;`;hs.innerHTML=t;let n=hs.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function _s(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function vs(e,t){return e.length>0?(_s(e,e.length,0,t),e):t}var ys={}.hasOwnProperty;function bs(e){let t={},n=-1;for(;++n<e.length;)xs(t,e[n]);return t}function xs(e,t){let n;for(n in t){let r=(ys.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ys.call(r,a)||(r[a]=[]);let e=i[a];Ss(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ss(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);_s(e,0,0,r)}function Cs(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ws(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var U=Ms(/[A-Za-z]/),W=Ms(/[\dA-Za-z]/),Ts=Ms(/[#-'*+\--9=?A-Z^-~]/);function Es(e){return e!==null&&(e<32||e===127)}var Ds=Ms(/\d/),Os=Ms(/[\dA-Fa-f]/),ks=Ms(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}var As=Ms(/\p{P}|\p{S}/u),js=Ms(/\s/);function Ms(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ns(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&W(e.charCodeAt(n+1))&&W(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function J(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return q(r)?(e.enter(n),s(r)):t(r)}function s(r){return q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Ps(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&q(t)?(e.enter(r),c(t)):l(t)}function c(t){return q(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Fs={tokenize:Is};function Is(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return G(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ls=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Rs(this,e,t,n,!1)}addBefore(e,t,n){Rs(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Rs(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var zs={tokenize:Vs},Bs={tokenize:Hs};function Vs(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Ls;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bs,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Bs,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return G(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Ls;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hs(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Us(e){if(e===null||K(e)||js(e))return 1;if(As(e))return 2}function Ws(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Gs={name:`attention`,resolveAll:Ks,tokenize:qs};function Ks(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Js(o,-a),Js(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=vs(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=vs(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=vs(r,Ws(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=vs(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=vs(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),_s(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function qs(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Us(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Us(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Js(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ys={name:`autolink`,tokenize:Xs};function Xs(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return U(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||W(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||W(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Es(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ts(t)?(e.consume(t),l):n(t)}function u(e){return W(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||W(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Zs={partial:!0,tokenize:Qs};function Qs(e,t,n){return r;function r(t){return q(t)?J(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||G(e)?t(e):n(e)}}var $s={continuation:{tokenize:tc},exit:nc,name:`blockQuote`,tokenize:ec};function ec(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function tc(e,t,n){let r=this;return i;function i(t){return q(t)?J(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt($s,t,n)(r)}}function nc(e){e.exit(`blockQuote`)}var rc={name:`characterEscape`,tokenize:ic};function ic(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ks(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ac={name:`characterReference`,tokenize:oc};function oc(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=W,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Os,u):(e.enter(`characterReferenceValue`),a=7,o=Ds,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===W&&!gs(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var sc={partial:!0,tokenize:cc};function cc(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var lc={concrete:!0,name:`codeFenced`,tokenize:uc};function uc(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||G(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(sc,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),J(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||G(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&q(t)?J(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||G(t)?e.check(sc,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||G(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),q(t)?J(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||G(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var dc={name:`codeIndented`,tokenize:pc},fc={partial:!0,tokenize:mc};function pc(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Ps(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):G(t)?e.attempt(fc,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||G(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function mc(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):G(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Ps(e,t,a,`linePrefix`,4,4)(o)}function a(e){return G(e)?i(e):n(e)}}var hc={name:`codeText`,previous:_c,resolve:gc,tokenize:vc};function gc(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _c(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function vc(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||G(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var yc=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&bc(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),bc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),bc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);bc(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);bc(this.left,t.reverse())}}}};function bc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function xc(e){let t={},n=-1,r,i,a,o,s,c,l,u=new yc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Sc(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return _s(e,0,1/0,u.slice(0)),!l}function Sc(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Cc={resolve:Tc,tokenize:Ec},wc={partial:!0,tokenize:Dc};function Tc(e){return xc(e),e}function Ec(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):G(t)?e.check(wc,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Dc(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,a,`linePrefix`)}function a(i){if(i===null||G(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Oc(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Es(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||G(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||K(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Es(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function kc(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):G(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||G(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ac(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||G(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function jc(e,t){let n;return r;function r(i){return G(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):q(i)?J(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Mc={name:`definition`,tokenize:Pc},Nc={partial:!0,tokenize:Fc};function Pc(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return kc.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ws(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return K(t)?jc(e,l)(t):l(t)}function l(t){return Oc(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Nc,d,d)(t)}function d(t){return q(t)?J(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||G(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Fc(e,t,n){return r;function r(t){return K(t)?jc(e,i)(t):n(t)}function i(t){return Ac(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return q(t)?J(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||G(e)?t(e):n(e)}}var Ic={name:`hardBreakEscape`,tokenize:Lc};function Lc(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return G(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Rc={name:`headingAtx`,resolve:zc,tokenize:Bc};function zc(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};_s(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Bc(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||K(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||G(n)?(e.exit(`atxHeading`),t(n)):q(n)?J(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||K(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Vc=`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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Hc=[`pre`,`script`,`style`,`textarea`],Uc={concrete:!0,name:`htmlFlow`,resolveTo:Gc,tokenize:Kc},Wc={partial:!0,tokenize:qc};function Gc(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Kc(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:re):U(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):U(a)?(e.consume(a),i=4,r.interrupt?t:re):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:re):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return U(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||K(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Hc.includes(l)?(i=1,r.interrupt?t(s):O(s)):Vc.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||W(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||U(t)?(e.consume(t),b):q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||W(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||G(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||K(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||G(t)?O(t):q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),re):t===93&&i===5?(e.consume(t),ne):G(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Wc,ae,k)(t)):t===null||G(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(sc,A,ae)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||G(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),re):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return Hc.includes(n)?(e.consume(t),ie):O(t)}return U(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function ne(t){return t===93?(e.consume(t),re):O(t)}function re(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),re):O(t)}function ie(t){return t===null||G(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function qc(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Zs,t,n)}}var Jc={name:`htmlText`,tokenize:Yc};function Yc(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):U(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):U(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):G(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):G(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):G(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):G(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return U(t)?(e.consume(t),S):n(t)}function S(t){return t===45||W(t)?(e.consume(t),S):C(t)}function C(t){return G(t)?(o=C,M(t)):q(t)?(e.consume(t),C):j(t)}function w(t){return t===45||W(t)?(e.consume(t),w):t===47||t===62||K(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||U(t)?(e.consume(t),E):G(t)?(o=T,M(t)):q(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||W(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):G(t)?(o=D,M(t)):q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):G(t)?(o=O,M(t)):q(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):G(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||K(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||K(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return q(t)?J(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var Xc={name:`labelEnd`,resolveAll:el,resolveTo:tl,tokenize:nl},Zc={tokenize:rl},Qc={tokenize:il},$c={tokenize:al};function el(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&_s(e,0,e.length,n),e}function tl(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=vs(o,e.slice(i+1,i+r+3)),o=vs(o,[[`enter`,l,t]]),o=vs(o,Ws(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=vs(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=vs(o,e.slice(a+1)),o=vs(o,[[`exit`,s,t]]),_s(e,i,e.length,o),e}function nl(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ws(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Zc,u,o?u:d)(t):t===91?e.attempt(Qc,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt($c,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function rl(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return K(t)?jc(e,a)(t):a(t)}function a(t){return t===41?u(t):Oc(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return K(t)?jc(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ac(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return K(t)?jc(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function il(e,t,n){let r=this;return i;function i(t){return kc.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ws(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function al(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ol={name:`labelStartImage`,resolveAll:Xc.resolveAll,tokenize:sl};function sl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var cl={name:`labelStartLink`,resolveAll:Xc.resolveAll,tokenize:ll};function ll(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ul={name:`lineEnding`,tokenize:dl};function dl(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}}var fl={name:`thematicBreak`,tokenize:pl};function pl(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||G(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),q(t)?J(e,s,`whitespace`)(t):s(t))}}var ml={continuation:{tokenize:vl},exit:bl,name:`list`,tokenize:_l},hl={partial:!0,tokenize:xl},gl={partial:!0,tokenize:yl};function _l(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ds(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(fl,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ds(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Zs,r.interrupt?n:u,e.attempt(hl,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function vl(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Zs,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gl,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(ml,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function yl(e,t,n){let r=this;return J(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function bl(e){e.exit(this.containerState.type)}function xl(e,t,n){let r=this;return J(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Sl={name:`setextUnderline`,resolveTo:Cl,tokenize:wl};function Cl(e,t){let n=new Ls,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function wl(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),q(t)?J(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||G(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Tl={tokenize:El};function El(e){let t=this,n=e.attempt(Zs,r,e.attempt(this.parser.constructs.flowInitial,i,J(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Cc,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Dl={resolveAll:jl()},Ol=Al(`string`),kl=Al(`text`);function Al(e){return{resolveAll:jl(e===`text`?Ml:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function jl(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ml(e,t){let n=new Ls,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Nl=e({attentionMarkers:()=>Vl,contentInitial:()=>Fl,disable:()=>Hl,document:()=>Pl,flow:()=>Ll,flowInitial:()=>Il,insideSpan:()=>Bl,string:()=>Rl,text:()=>zl}),Pl={42:ml,43:ml,45:ml,48:ml,49:ml,50:ml,51:ml,52:ml,53:ml,54:ml,55:ml,56:ml,57:ml,62:$s},Fl={91:Mc},Il={[-2]:dc,[-1]:dc,32:dc},Ll={35:Rc,42:fl,45:[Sl,fl],60:Uc,61:Sl,95:fl,96:lc,126:lc},Rl={38:ac,92:rc},zl={[-5]:ul,[-4]:ul,[-3]:ul,33:ol,38:ac,42:Gs,60:[Ys,Jc],91:cl,92:[Ic,rc],93:Xc,95:Gs,96:hc},Bl={null:[Gs,Dl]},Vl={null:[42,95]},Hl={null:[]};function Ul(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=vs(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Ws(a,l.events,l),l.events):[]}function f(e,t){return Gl(p(e),t)}function p(e){return Wl(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){G(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&_s(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Wl(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Gl(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
|
-
`;break;case-3:o=`\r
|
|
4
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Kl(e){let t={constructs:bs([Nl,...(e||{}).extensions||[]]),content:n(Fs),defined:[],document:n(zs),flow:n(Tl),lazy:{},string:n(Ol),text:n(kl)};return t;function n(e){return n;function n(n){return Ul(t,e,n)}}}function ql(e){for(;!xc(e););return e}var Jl=/[\0\t\n\r]/g;function Yl(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Jl.lastIndex=c;let n=Jl.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Xl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zl(e){return e.replace(Xl,Ql)}function Ql(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Cs(n.slice(t?2:1),t?16:10)}return gs(n)||e}var $l={}.hasOwnProperty;function eu(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),tu(n)(ql(Kl(n).document().write(Yl()(e,t,!0))))}function tu(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Ce),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ye),blockQuote:o(me),characterEscape:E,characterReference:E,codeFenced:o(he),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(he,s),codeText:o(ge,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(_e),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ve),hardBreakEscape:o(be),hardBreakTrailing:o(be),htmlFlow:o(xe,s),htmlFlowData:E,htmlText:o(xe,s),htmlTextData:E,image:o(Se),label:s,link:o(Ce),listItem:o(Te),listItemValue:p,listOrdered:o(we,f),listUnordered:o(we),paragraph:o(Ee),reference:se,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ye),strong:o(De),thematicBreak:o(ke)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(j),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(ee),htmlTextData:D,image:l(te),label:re,labelText:ne,lineEnding:O,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};ru(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),$l.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||au).call(o,void 0,e[0])}for(r.position={start:nu(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nu(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:nu(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Ao({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||au).call(this,e,r[0])),n.position.end=nu(e.end)}function d(){return ds(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ws(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Oe(),n.position={start:nu(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=nu(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=nu(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Zl(t),n.identifier=ws(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ws(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Cs(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=gs(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=nu(e.end)}function fe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[],position:void 0}}function he(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ge(){return{type:`inlineCode`,value:``,position:void 0}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function ve(){return{type:`emphasis`,children:[],position:void 0}}function ye(){return{type:`heading`,depth:0,children:[],position:void 0}}function be(){return{type:`break`,position:void 0}}function xe(){return{type:`html`,value:``,position:void 0}}function Se(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Ce(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Ee(){return{type:`paragraph`,children:[],position:void 0}}function De(){return{type:`strong`,children:[],position:void 0}}function Oe(){return{type:`text`,value:``,position:void 0}}function ke(){return{type:`thematicBreak`,position:void 0}}}function nu(e){return{line:e.line,column:e.column,offset:e.offset}}function ru(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ru(e,r):iu(e,r)}}function iu(e,t){let n;for(n in t)if($l.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function au(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Ao({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ao({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ao({start:t.start,end:t.end})+`) is still open`)}function ou(e){let t=this;t.parser=n;function n(n){return eu(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function su(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function cu(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
5
|
-
`}]}function lu(e,t){let n=t.value?t.value+`
|
|
6
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function uu(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function du(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fu(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Ns(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function pu(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mu(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hu(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function gu(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hu(e,t);let i={src:Ns(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function _u(e,t){let n={src:Ns(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vu(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yu(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hu(e,t);let i={href:Ns(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bu(e,t){let n={href:Ns(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xu(e,t,n){let r=e.all(t),i=n?Su(n):Cu(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
7
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Su(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Cu(n[r])}return t}function Cu(e){return e.spread??e.children.length>1}function wu(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Tu(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eu(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Du(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ou(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Do(t.children[1]),o=Eo(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ku(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Au(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ju=9,Mu=32;function Nu(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Pu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Pu(t.slice(i),i>0,!1)),a.join(``)}function Pu(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===ju||t===Mu;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===ju||t===Mu;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Fu(e,t){let n={type:`text`,value:Nu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Iu(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Lu={blockquote:su,break:cu,code:lu,delete:uu,emphasis:du,footnoteReference:fu,heading:pu,html:mu,imageReference:gu,image:_u,inlineCode:vu,linkReference:yu,link:bu,listItem:xu,list:wu,paragraph:Tu,root:Eu,strong:Du,table:Ou,tableCell:Au,tableRow:ku,text:Fu,thematicBreak:Iu,toml:Ru,yaml:Ru,definition:Ru,footnoteDefinition:Ru};function Ru(){}var{defineProperty:zu}=Object,Bu=typeof self==`object`?self:globalThis,Vu=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Bu[e](t)},Hu=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?zu(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Bu[e]==`function`?Vu(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Vu(a,o),i)};return r},Uu=e=>Hu(new Map,e)(0),Wu=``,{toString:Gu}={},{keys:Ku,is:qu}=Object,Ju=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Gu.call(e).slice(8,-1);switch(n){case`Array`:return[1,Wu];case`Object`:return[2,Wu];case`Date`:return[3,Wu];case`RegExp`:return[4,Wu];case`Map`:return[5,Wu];case`Set`:return[6,Wu];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Yu=([e,t])=>e===0&&(t===`function`||t===`symbol`),Xu=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Ju(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&qu(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Ku(o))(e||!Yu(Ju(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Wu:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Yu(Ju(n))||Yu(Ju(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Yu(Ju(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Zu=(e,{json:t,lossy:n}={})=>{let r=[];return Xu(!(t||n),!!t,new Map,r)(e),r},Qu=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Uu(Zu(e,t)):structuredClone(e):(e,t)=>Uu(Zu(e,t));function $u(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function ed(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function td(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||$u,r=e.options.footnoteBackLabel||ed,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Ns(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Qu(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
9
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
10
|
-
`}]}}var nd=(function(e){if(e==null)return sd;if(typeof e==`function`)return od(e);if(typeof e==`object`)return Array.isArray(e)?rd(e):id(e);if(typeof e==`string`)return ad(e);throw Error(`Expected function, string, or object as test`)});function rd(e){let t=[],n=-1;for(;++n<e.length;)t[n]=nd(e[n]);return od(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function id(e){let t=e;return od(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ad(e){return od(t);function t(t){return t&&t.type===e}}function od(e){return t;function t(t,n,r){return!!(cd(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function sd(){return!0}function cd(e){return typeof e==`object`&&!!e&&`type`in e}function ld(e){return e}var ud=[];function dd(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=nd(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+ld(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ud,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=fd(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function fd(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ud:[e]}function pd(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),dd(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var md={}.hasOwnProperty,hd={};function gd(e,t){let n=t||hd,r=new Map,i=new Map,a={all:s,applyData:vd,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Lu,...n.handlers},one:o,options:n,patch:_d,wrap:bd};return pd(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(md.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Qu(n);return r.children=a.all(e),r}return Qu(e)}return(a.options.unknownHandler||yd)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=xd(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=xd(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function _d(e,t){e.position&&(t.position=ko(e))}function vd(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Qu(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function yd(e,t){let n=t.data||{},r=`value`in t&&!(md.call(n,`hProperties`)||md.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bd(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
11
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
12
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
13
|
-
`}),n}function xd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sd(e,t){let n=gd(e,t),r=n.one(e,void 0),i=td(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
14
|
-
`},i)),a}function Cd(e,t){return e&&`run`in e?async function(n,r){let i=Sd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Sd(n,{file:r,...e||t})}}function wd(e){if(e)throw e}var Td=t(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function Ed(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dd(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Od(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Od(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var kd={basename:Ad,dirname:jd,extname:Md,join:Nd,sep:`/`};function Ad(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Id(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function jd(e){if(Id(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Md(e){Id(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Nd(...e){let t=-1,n;for(;++t<e.length;)Id(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Pd(n)}function Pd(e){Id(e);let t=e.codePointAt(0)===47,n=Fd(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Fd(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Id(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Ld={cwd:Rd};function Rd(){return`/`}function zd(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Bd(e){if(typeof e==`string`)e=new URL(e);else if(!zd(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Vd(e)}function Vd(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Hd=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ud=class{constructor(e){let t;t=e?zd(e)?{path:e}:typeof e==`string`||qd(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Ld.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Hd.length;){let e=Hd[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Hd.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?kd.basename(this.path):void 0}set basename(e){Gd(e,`basename`),Wd(e,`basename`),this.path=kd.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?kd.dirname(this.path):void 0}set dirname(e){Kd(this.basename,`dirname`),this.path=kd.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?kd.extname(this.path):void 0}set extname(e){if(Wd(e,`extname`),Kd(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=kd.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){zd(e)&&(e=Bd(e)),Gd(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?kd.basename(this.path,this.extname):void 0}set stem(e){Gd(e,`stem`),Wd(e,`stem`),this.path=kd.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new H(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Wd(e,t){if(e&&e.includes(kd.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+kd.sep+"`")}function Gd(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Kd(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function qd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Jd=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Yd={}.hasOwnProperty,Xd=new class e extends Jd{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Dd()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Td.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?($d(`data`,this.frozen),this.namespace[e]=t,this):Yd.call(this.namespace,e)&&this.namespace[e]||void 0:e?($d(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nf(e),n=this.parser||this.Parser;return Zd(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Zd(`process`,this.parser||this.Parser),Qd(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=nf(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);af(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Zd(`processSync`,this.parser||this.Parser),Qd(`processSync`,this.compiler||this.Compiler),this.process(e,r),tf(`processSync`,`process`,t),n;function r(e,r){t=!0,wd(e),n=r}}run(e,t,n){ef(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=nf(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),tf(`runSync`,`run`,n),r;function i(e,t){wd(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=nf(t),r=this.compiler||this.Compiler;return Qd(`stringify`,r),ef(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if($d(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Td.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ed(o)&&Ed(r)&&(r=(0,Td.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Zd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Qd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function $d(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ef(e){if(!Ed(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function tf(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nf(e){return rf(e)?e:new Ud(e)}function rf(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function af(e){return typeof e==`string`||of(e)}function of(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var sf=[],cf={allowDangerousHtml:!0},lf=/^(https?|ircs?|mailto|xmpp)$/i,uf=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function df(e){let t=ff(e),n=pf(e);return mf(t.runSync(t.parse(n),n),e)}function ff(e){let t=e.rehypePlugins||sf,n=e.remarkPlugins||sf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cf}:cf;return Xd().use(ou).use(n).use(Cd,r).use(t)}function pf(e){let t=e.children||``,n=new Ud;return typeof t==`string`?n.value=t:``+t,n}function mf(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||hf;for(let e of uf)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return pd(e,l),Vo(e,{Fragment:pt.Fragment,components:i,ignoreInvalidStyle:!0,jsx:pt.jsx,jsxs:pt.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ls)if(Object.hasOwn(ls,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ls[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function hf(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lf.test(e.slice(0,t))?e:``}function gf(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _f(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function vf(e,t,n){let r=nd((n||{}).ignore||[]),i=yf(t),a=-1;for(;++a<i.length;)dd(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function yf(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([bf(e[0]),xf(e[1])])}return t}function bf(e){return typeof e==`string`?new RegExp(_f(e),`g`):e}function xf(e){return typeof e==`function`?e:function(){return e}}var Sf=`phrasing`,Cf=[`autolink`,`link`,`image`,`label`];function wf(){return{transforms:[Mf],enter:{literalAutolink:Ef,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:jf,literalAutolinkEmail:Af,literalAutolinkHttp:Of,literalAutolinkWww:kf}}}function Tf(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Sf,notInConstruct:Cf},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Sf,notInConstruct:Cf},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Sf,notInConstruct:Cf}]}}function Ef(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Df(e){this.config.enter.autolinkProtocol.call(this,e)}function Of(e){this.config.exit.autolinkProtocol.call(this,e)}function kf(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Af(e){this.config.exit.autolinkEmail.call(this,e)}function jf(e){this.exit(e)}function Mf(e){vf(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Nf],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Pf]],{ignore:[`link`,`linkReference`]})}function Nf(e,t,n,r,i){let a=``;if(!Lf(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Ff(n)))return!1;let o=If(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Pf(e,t,n,r){return!Lf(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Ff(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function If(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=gf(e,`(`),a=gf(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Lf(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||js(n)||As(n))&&(!t||n!==47)}qf.peek=Kf;function Rf(){this.buffer()}function zf(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Bf(){this.buffer()}function Vf(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Hf(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ws(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Uf(e){this.exit(e)}function Wf(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ws(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Gf(e){this.exit(e)}function Kf(){return`[`}function qf(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Jf(){return{enter:{gfmFootnoteCallString:Rf,gfmFootnoteCall:zf,gfmFootnoteDefinitionLabelString:Bf,gfmFootnoteDefinition:Vf},exit:{gfmFootnoteCallString:Hf,gfmFootnoteCall:Uf,gfmFootnoteDefinitionLabelString:Wf,gfmFootnoteDefinition:Gf}}}function Yf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:qf},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
15
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Zf:Xf))),s(),o}}function Xf(e,t,n){return t===0?e:Zf(e,t,n)}function Zf(e,t,n){return(n?``:` `)+e}var Qf=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];rp.attention=ip,rp.peek=ap;function $f(){return{canContainEols:[`delete`],enter:{strikethrough:tp},exit:{strikethrough:np}}}function ep(){return{handlers:{delete:rp},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Qf}]}}function tp(e){this.enter({type:`delete`,children:[],position:void 0},e)}function np(e){this.exit(e)}function rp(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function ip(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function ap(){return`~`}function op(e){return e.length}function sp(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||op,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=cp(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=lp(r[d]);else{let e=lp(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
16
|
-
`)}function cp(e){return e==null?``:String(e)}function lp(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var up=nd([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function dp(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),fp);return i(),o}function fp(e,t,n){return`>`+(n?``:` `)+e}function pp(e,t){return mp(e,t.inConstruct,!0)&&!mp(e,t.notInConstruct,!1)}function mp(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hp(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
17
|
-
`&&!e.before&&!e.after&&pp(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
18
|
-
`}function gp(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function _p(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function vp(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function yp(e,t,n,r){let i=vp(n),a=e.value||``;if(_p(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,bp);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(gp(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
19
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
20
|
-
`),a&&(u+=o.move(a+`
|
|
21
|
-
`)),u+=o.move(s),c(),u}function bp(e,t,n){return(n?``:` `)+e}function xp(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Sp(e,t,n,r){let i=xp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
22
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Cp(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}wp.attention=Tp,wp.peek=Ep;function wp(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Tp(e,t){return{construct:`emphasis`,markers:Cp(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function Ep(e,t,n){return n.options.emphasis||`*`}function Dp(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Op(e,t){let n=!1;return pd(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ds(e)&&(t.options.setext||n))}function kp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Op(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
23
|
-
`,after:`
|
|
24
|
-
`});return r(),t(),o+`
|
|
25
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
26
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
27
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Dp(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Ap.peek=jp;function Ap(e){return e.value||``}function jp(){return`<`}Mp.peek=Np;function Mp(e,t,n,r){let i=xp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Np(){return`!`}Pp.peek=Fp;function Pp(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Fp(){return`!`}Ip.peek=Lp;function Ip(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Lp(){return"`"}function Rp(e,t){let n=ds(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}zp.peek=Bp;function zp(e,t,n,r){let i=xp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Rp(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Bp(e,t,n){return Rp(e,n)?`<`:`[`}Vp.peek=Hp;function Vp(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Hp(){return`[`}function Up(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wp(e){let t=Up(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Gp(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Kp(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qp(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Gp(n):Up(n),s=e.ordered?o===`.`?`)`:`.`:Wp(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Kp(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Jp(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Yp(e,t,n,r){let i=Jp(n),a=n.bulletCurrent||Up(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Xp(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Zp(e,t,n,r){if(!e.children.some(function(e){return up(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Qp(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$p.attention=em,$p.peek=tm;function $p(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function em(e,t){return{construct:`strong`,markers:Qp(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function tm(e,t,n){return n.options.strong||`*`}function nm(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function rm(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function im(e,t,n){let r=(Kp(n)+(n.options.ruleSpaces?` `:``)).repeat(rm(n));return n.options.ruleSpaces?r.slice(0,-1):r}var am={blockquote:dp,break:hp,code:yp,definition:Sp,emphasis:wp,hardBreak:hp,heading:kp,html:Ap,image:Mp,imageReference:Pp,inlineCode:Ip,link:zp,linkReference:Vp,list:qp,listItem:Yp,paragraph:Xp,root:Zp,strong:$p,text:nm,thematicBreak:im};function om(){return{enter:{table:sm,tableData:dm,tableHeader:dm,tableRow:lm},exit:{codeText:fm,table:cm,tableData:um,tableHeader:um,tableRow:um}}}function sm(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function cm(e){this.exit(e),this.data.inTable=void 0}function lm(e){this.enter({type:`tableRow`,children:[]},e)}function um(e){this.exit(e)}function dm(e){this.enter({type:`tableCell`,children:[]},e)}function fm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pm));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pm(e,t){return t===`|`?t:e}function mm(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
28
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
29
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return sp(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=am.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function hm(){return{exit:{taskListCheckValueChecked:_m,taskListCheckValueUnchecked:_m,paragraph:vm}}}function gm(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ym}}}function _m(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function vm(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ym(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=am.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function bm(){return[wf(),Jf(),$f(),om(),hm()]}function xm(e){return{extensions:[Tf(),Yf(e),ep(),mm(e),gm()]}}var Sm={tokenize:Im,partial:!0},Cm={tokenize:Lm,partial:!0},wm={tokenize:Rm,partial:!0},Tm={tokenize:zm,partial:!0},Em={tokenize:Bm,partial:!0},Dm={name:`wwwAutolink`,tokenize:Pm,previous:Vm},Om={name:`protocolAutolink`,tokenize:Fm,previous:Hm},km={name:`emailAutolink`,tokenize:Nm,previous:Um},Am={};function jm(){return{text:Am}}for(var Mm=48;Mm<123;)Am[Mm]=km,Mm++,Mm===58?Mm=65:Mm===91&&(Mm=97);Am[43]=km,Am[45]=km,Am[46]=km,Am[95]=km,Am[72]=[km,Om],Am[104]=[km,Om],Am[87]=[km,Dm],Am[119]=[km,Dm];function Nm(e,t,n){let r=this,i,a;return o;function o(t){return!Wm(t)||!Um.call(r,r.previous)||Gm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Wm(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Em,u,l)(t):t===45||t===95||W(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&U(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Pm(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Vm.call(r,r.previous)||Gm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Sm,e.attempt(Cm,e.attempt(wm,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Fm(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Hm.call(r,r.previous)&&!Gm(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(U(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Es(t)||K(t)||js(t)||As(t)?n(t):e.attempt(Cm,e.attempt(wm,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Im(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Lm(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Tm,c,s)(t):t===null||K(t)||js(t)||t!==45&&As(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Rm(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Tm,t,a)(o):o===null||K(o)||js(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function zm(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||K(o)||js(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||K(e)||js(e)?t(e):r(e)}function a(e){return U(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):U(t)?(e.consume(t),o):n(t)}}function Bm(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return W(e)?n(e):t(e)}}function Vm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||K(e)}function Hm(e){return!U(e)}function Um(e){return!(e===47||Wm(e))}function Wm(e){return e===43||e===45||e===46||e===95||W(e)}function Gm(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Km={tokenize:eh,partial:!0};function qm(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Zm,continuation:{tokenize:Qm},exit:$m}},text:{91:{name:`gfmFootnoteCall`,tokenize:Xm},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Jm,resolveTo:Ym}}}}function Jm(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ws(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ym(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Xm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||K(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ws(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return K(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Zm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||K(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ws(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return K(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),J(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Qm(e,t,n){return e.check(Zs,t,e.attempt(Km,t,n))}function $m(e){e.exit(`gfmFootnoteDefinition`)}function eh(e,t,n){let r=this;return J(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function th(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&_s(o,o.length,0,Ws(s,e.slice(r+1,n),t)),_s(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),_s(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Us(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Us(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var nh=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){rh(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function rh(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function ih(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ah(){return{flow:{null:{name:`table`,tokenize:oh,resolveAll:sh}}}}function oh(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):G(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):q(t)?J(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||K(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,q(t)?J(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return q(t)?J(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||G(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return q(t)?J(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||G(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||G(n)?(e.exit(`tableRow`),t(n)):q(n)?J(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||K(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function sh(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new nh;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(lh(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=ch(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=ch(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=ch(f,t,o,i,n,d)):(o[0]=o[1],d=ch(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&lh(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ih(t.events,n))}return e}function ch(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},uh(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=uh(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=uh(t.events,n[2]),a=uh(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},uh(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function lh(e,t,n,r,i){let a=[],o=uh(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function uh(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var dh={name:`tasklistCheck`,tokenize:ph};function fh(){return{text:{91:dh}}}function ph(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return K(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return G(r)?t(r):q(r)?e.check({tokenize:mh},t,n)(r):n(r)}}function mh(e,t,n){return J(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function hh(e){return bs([jm(),qm(),th(e),ah(),fh()])}var gh={};function _h(e){let t=this,n=e||gh,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(hh(n)),a.push(bm()),o.push(xm(n))}function vh(e,t=`|`){return e.map(e=>Mh(e)).join(t)}function yh(e,t){return typeof t==`bigint`?t.toString():t}function bh(e){return e==null}function xh(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Sh(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ch(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function wh(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Th(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Eh=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Dh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Oh(e){if(Dh(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Dh(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function kh(e){return Oh(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Ah(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function jh(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Y(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Mh(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}var Nh={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ph={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Fh(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ih(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Lh(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Rh(e){return typeof e==`string`?e:e?.message}function zh(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Bh(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Vh(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Rh(e.inst?._zod.def?.error?.(e))??Rh(a?.(e))??Rh(t?.error?.(e))??Rh(n.customError?.(e))??Rh(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Hh=/[\uD800-\uDBFF]/;function Uh(e){let t=e.length;if(!Hh.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Wh(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Gh(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Kh(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function qh(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Zh(e,n,r.value)}}function Jh(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Yh(e,t,n){return Jh(e,t,n,!1)}function Xh(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Jh(this,n,r(this))},set(e){Jh(this,n,e)}})}return t}function Zh(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Jh(this,t,n.bind(this))},set(e){Jh(this,t,e)}})}var Qh,$h=!1,eg={configurable:!0,get(){$h=!0}};function X(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Qh!==e._zod?Qh=void 0:(Qh=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,eg);let e=$h;$h=!1;try{let r=n(this);return $h?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),$h||=e,r}catch(n){throw delete this[t],$h||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}var tg=`~constantCatch`;function ng(e){let t=()=>e;return t[tg]=!0,t}var rg,ig={value:void 0,enumerable:!1},ag=`captureStackTrace`in Error?Error:null;function og(e){let t=ag;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return ag=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Z(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){ig.value=new a(r);try{Object.defineProperty(n,"_zod",ig)}finally{ig.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),qh(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?og(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var sg=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},cg=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(rg=globalThis).__zod_globalConfig??(rg.__zod_globalConfig={});var lg=globalThis.__zod_globalConfig;function ug(e){return e&&Object.assign(lg,e),lg}function dg(){let e=this._zod;return e.message??=JSON.stringify(e.def,yh,2),e.message}function fg(e){this._zod.message=e}var pg={get:dg,set:fg,enumerable:!0,configurable:!0},mg={value:void 0,enumerable:!1},hg=new WeakSet([Object.prototype,Error.prototype]),gg=Z(`$ZodError`,(e,t)=>{e.name=`$ZodError`,mg.value=t,Object.defineProperty(e,"issues",mg),mg.value=void 0,Object.defineProperty(e,"message",pg);let n=Object.getPrototypeOf(e);hg.has(n)||(hg.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function _g(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function vg(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?_g(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function yg(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function bg(e,t){return{callee:t?.callee??e,Err:t?.Err}}var xg=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new sg;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Vh(e,o,ug())));throw Eh(n,a?.callee??t),n}return s.value};return t},Sg=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Vh(e,o,ug())));throw Eh(n,a?.callee??t),n}return s.value};return t},Cg=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new sg;return a.issues.length?wg(e,a.issues,i):{success:!0,data:a.value}};function wg(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Vh(e,n,ug()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Tg=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?wg(e,a.issues,i):{success:!0,data:a.value}},Eg=Symbol.for(`zod.compile.invalid`),Dg=Symbol.for(`zod.compile.fallback`),Og=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Eg)return!0;if(r.definite===!0&&n===void 0)return!1}return kg(e,t,n)});function kg(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Dg]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new sg;return a.issues.length===0}var Ag=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},jg=e=>{let t=xg(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,bg(n,a))};return n},Mg=e=>{let t=xg(e),n=(e,r,i,a)=>t(e,r,i,bg(n,a));return n},Ng=e=>{let t=Sg(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,bg(n,a))};return n},Pg=e=>{let t=Sg(e),n=async(e,r,i,a)=>await t(e,r,i,bg(n,a));return n},Fg=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Cg(e)(t,n,i)},Ig=e=>(t,n,r)=>Cg(e)(t,n,r),Lg=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tg(e)(t,n,i)},Rg=e=>async(t,n,r)=>Tg(e)(t,n,r),zg=/^[cC][0-9a-z]{6,}$/,Bg=/^[0-9a-z]+$/,Vg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Hg=/^[0-9a-vA-V]{20}$/,Ug=/^[A-Za-z0-9]{27}$/,Wg=/^[a-zA-Z0-9_-]{21}$/;function Gg(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Kg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jg=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Yg=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xg=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Zg(){return new RegExp(Xg,`u`)}var Qg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$g=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,t_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,r_=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,i_=/^https?$/,a_=/^\+[1-9]\d{6,14}$/,o_=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function s_(e){return RegExp(`^${e}$`)}var c_=s_(o_);function l_(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function u_(e){return RegExp(`^${l_(e)}$`)}function d_(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${l_({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${l_({precision:e.precision})}`:n;return RegExp(`^${o_}T(?:${r})$`)}var f_=/^[\s\S]{0,}$/,p_=/^[^A-Z]*$/,m_=/^[^a-z]*$/,h_=Z(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),g_=e=>{let t=e.value;return!bh(t)&&t.length!==void 0},__=Z(`$ZodCheckMaxLength`,(e,t)=>{var n;h_.init(e,t),(n=e._zod.def).when??(n.when=g_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Uh(r):i)<=t.maximum)return;let a=Wh(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),v_=Z(`$ZodCheckMinLength`,(e,t)=>{var n;h_.init(e,t),(n=e._zod.def).when??(n.when=g_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Uh(r):i)>=t.minimum)return;let a=Wh(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),y_=Z(`$ZodCheckLengthEquals`,(e,t)=>{var n;h_.init(e,t),(n=e._zod.def).when??(n.when=g_),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Uh(r):i;if(a===t.length)return;let o=Wh(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),b_=Z(`$ZodCheckStringFormat`,(e,t)=>{var n,r;h_.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),x_=Z(`$ZodCheckRegex`,(e,t)=>{b_.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),S_=Z(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=p_,b_.init(e,t)}),C_=Z(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=m_,b_.init(e,t)}),w_=Z(`$ZodCheckIncludes`,(e,t)=>{h_.init(e,t);let n=Ah(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),T_=Z(`$ZodCheckStartsWith`,(e,t)=>{h_.init(e,t);let n=RegExp(`^${Ah(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),E_=Z(`$ZodCheckEndsWith`,(e,t)=>{h_.init(e,t);let n=RegExp(`.*${Ah(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),D_=Z(`$ZodCheckOverwrite`,(e,t)=>{h_.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),O_={major:4,minor:6,patch:7},k_=Z(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=O_;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Fh(t),a;for(let o of n){if(o._zod.def.when){if(Ih(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new sg;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Bh(t.issues,n,e),i||=Fh(t,n))});else{if(t.issues.length===n)continue;Bh(t.issues,n,e),i||=Fh(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Fh(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new sg;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new sg;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Yh(this,`~standard`,M_(this))},set"~standard"(e){Jh(this,`~standard`,e)}}),A_=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Vh(e,t,ug()))}:{value:e.value};async function j_(e,t){let n={async:!0};return A_(await e._zod.run({value:t,issues:[]},n),n)}function M_(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return A_(r,n)}catch{}return j_(e,t)},vendor:`zod`,version:1}}var N_=Z(`$ZodString`,(e,t)=>{k_.init(e,t),e._zod.pattern=t.pattern??f_,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Q=Z(`$ZodStringFormat`,(e,t)=>{b_.init(e,t),N_.init(e,t)}),P_=Z(`$ZodGUID`,(e,t)=>{t.pattern??=qg,Q.init(e,t)}),F_=Z(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Jg(e)}else t.pattern??=Jg();Q.init(e,t)}),I_=Z(`$ZodEmail`,(e,t)=>{t.pattern??=Yg,Q.init(e,t)});function L_(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function R_(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?L_(e)||2:z_(e,t)}function z_(e,t){if(!t.normalize&&t.protocol?.source===i_.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var B_=/[\t\n\r]/g;function V_(e){return e.replace(B_,``)}function H_(e,t){return t.lastIndex=0,t.test(e.hostname)}function U_(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var W_=Z(`$ZodURL`,(e,t)=>{Q.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=R_(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=V_(r);return}t.hostname&&!H_(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!U_(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:V_(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),G_=Z(`$ZodEmoji`,(e,t)=>{t.pattern??=Zg(),Q.init(e,t)}),K_=Z(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Wg:Gg(t.length),Q.init(e,t)}),q_=Z(`$ZodCUID`,(e,t)=>{t.pattern??=zg,Q.init(e,t)}),J_=Z(`$ZodCUID2`,(e,t)=>{t.pattern??=Bg,Q.init(e,t)}),Y_=Z(`$ZodULID`,(e,t)=>{t.pattern??=Vg,Q.init(e,t)}),X_=Z(`$ZodXID`,(e,t)=>{t.pattern??=Hg,Q.init(e,t)}),Z_=Z(`$ZodKSUID`,(e,t)=>{t.pattern??=Ug,Q.init(e,t)}),Q_=Z(`$ZodISODateTime`,(e,t)=>{t.pattern??=d_(t),Q.init(e,t)}),$_=Z(`$ZodISODate`,(e,t)=>{t.pattern??=c_,Q.init(e,t)}),ev=Z(`$ZodISOTime`,(e,t)=>{t.pattern??=u_(t),Q.init(e,t)}),tv=Z(`$ZodISODuration`,(e,t)=>{t.pattern??=Kg,Q.init(e,t)}),nv=Z(`$ZodIPv4`,(e,t)=>{t.pattern??=Qg,Q.init(e,t)}),rv=/^[0-9a-fA-F:.]+$/;function iv(e){return rv.test(e)?L_(`http://[${e}]`):!1}var av=Z(`$ZodIPv6`,(e,t)=>{t.pattern??=$g,Q.init(e,t),e._zod.check=n=>{iv(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ov=Z(`$ZodCIDRv4`,(e,t)=>{t.pattern??=e_,Q.init(e,t)});function sv(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:iv(n)}var cv=Z(`$ZodCIDRv6`,(e,t)=>{t.pattern??=t_,Q.init(e,t),e._zod.check=n=>{sv(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function lv(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uv=/^[0-9a-zA-Z+/]*={0,2}$/,dv=Z(`$ZodBase64`,(e,t)=>{t.pattern??=uv,Q.init(e,t),e._zod.check=n=>{lv(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),fv=/^[A-Za-z0-9_-]*$/;function pv(e){if(!fv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return lv(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var mv=Z(`$ZodBase64URL`,(e,t)=>{t.pattern??=fv,Q.init(e,t),e._zod.check=n=>{pv(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),hv=Z(`$ZodE164`,(e,t)=>{t.pattern??=a_,Q.init(e,t)});function gv(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var _v=Z(`$ZodJWT`,(e,t)=>{Q.init(e,t),e._zod.check=n=>{gv(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}});function vv(e,t){let n=zh(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of zh(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Bh(n.issues,t,e),n}}return i(n,a)}}var yv=e=>Array.isArray(e)?e.length:-1;function bv(e,t,n){e.issues.length&&t.issues.push(...Lh(n,e.issues)),t.value[n]=e.value}var xv=Z(`$ZodArray`,(e,t)=>{k_.init(e,t);let n=lg.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>bv(t,r,e)));else if(bv(c,r,e),s&&c.issues.length!==0&&Fh(c))break}return o.length?Promise.all(o).then(()=>r):r},vv(e,yv)});function Sv(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Fh(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Vh(e,r,ug())))}),t)}var Cv=Z(`$ZodUnion`,(e,t)=>{k_.init(e,t),X(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),X(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),X(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),X(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>xh(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Sv(t,r,e,i)):Sv(o,r,e,i)}}),wv=Z(`$ZodIntersection`,(e,t)=>{k_.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ev(e,t,n)):Ev(e,i,a)}});function Tv(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Oh(e)&&Oh(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Tv(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Tv(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ev(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Tv(t.value,n.value);if(!c.valid){if(Fh(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Dv=Z(`$ZodTransform`,(e,t)=>{k_.init(e,t),e._zod.optin=`optional`,lg.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cg(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new sg;return n.value=i,n}});function Ov(e,t){return e.value=t.issues.length?void 0:t.value,e}var kv=Z(`$ZodOptional`,(e,t)=>{k_.init(e,t),X(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,X(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),X(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xh(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ov(e,t)):Ov(e,r)}return t.innerType._zod.run(e,n)}}),Av=Z(`$ZodExactOptional`,(e,t)=>{kv.init(e,t),X(e,`values`,e=>e.def.innerType._zod.values),X(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),jv=Z(`$ZodNullable`,(e,t)=>{k_.init(e,t),X(e,`optin`,e=>e.def.innerType._zod.optin),X(e,`optout`,e=>e.def.innerType._zod.optout),X(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xh(t.source)}|null)$`):void 0}),X(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Mv=Z(`$ZodDefault`,(e,t)=>{k_.init(e,t),e._zod.optin=`defaulted`,X(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Nv(e,t)):Nv(r,t)}});function Nv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Pv=Z(`$ZodPrefault`,(e,t)=>{k_.init(e,t),e._zod.optin=`defaulted`,X(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Fv=Z(`$ZodNonOptional`,(e,t)=>{k_.init(e,t),X(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Iv(t,e)):Iv(i,e)}});function Iv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Lv(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Vh(e,r,ug()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Rv=Z(`$ZodCatch`,(e,t)=>{k_.init(e,t),X(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),X(e,`optout`,e=>e.def.innerType._zod.optout),X(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Lv(e,r,t,n)):Lv(e,r,t,n)}}),zv=Z(`$ZodPipe`,(e,t)=>{k_.init(e,t),X(e,`values`,e=>e.def.in._zod.values),X(e,`optin`,e=>e.def.in._zod.optin),X(e,`optout`,e=>e.def.out._zod.optout),X(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Bv(e,t.in,n)):Bv(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bv(e,t.out,n)):Bv(r,t.out,n)}});function Bv(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Vv=Z(`$ZodReadonly`,(e,t)=>{k_.init(e,t),X(e,`propValues`,e=>e.def.innerType._zod.propValues),X(e,`values`,e=>e.def.innerType._zod.values),X(e,`optin`,e=>e.def.innerType?._zod?.optin),X(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Hv):Hv(r)}});function Hv(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Uv=Z(`$ZodCustom`,(e,t)=>{h_.init(e,t),k_.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Wv(t,n,r,e));Wv(i,n,r,e)}});function Wv(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Kh(e))}}var Gv=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Kv=`~memo`,qv=[];function Jv(e){return typeof e==`object`&&!!e}function Yv(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Xv=new WeakMap,Zv=0,Qv=1,$v=2;function ey(e,t,n){let r=Xv.get(e);if(r!==void 0)return r?$v:Zv;if(t.has(e))return $v;t.add(e);let i=Zv,a=e=>{if(i!==$v&&e?._zod){let r=ey(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Zv;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Qv:o.value?._zod?ey(o.value,t,n):Zv;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Ch(c);s(e?o(e,!0):Qv),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ey(r,t,!1):Qv);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),ty(e,i)}function ty(e,t){return t!==Qv&&Xv.set(e,t===$v),t}function ny(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ry,iy=[],ay={alloc(e,t,n){let r=ry;if(!r)return n;ry=void 0;let i={value:n,issues:null};return r.set(t.value,i),iy.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&sy(n,e.value))throw new Gv;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ey(e,new Set,!1);if(i===Zv)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===$v||r?n=!0:r=!0}let l=s.value;if(!Jv(l))return t(s,c);let u=c[Kv];u||(u={buckets:new WeakMap,backEdges:void 0},c[Kv]=u);let d;i===c?d=a:(d=ny(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Yv(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;ry=d;let p=iy.length,m=t(s,c);ry=void 0;let h=iy.length>p?iy.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Yv(e.issues):qv),e)):(h&&(h.issues=m.issues.length?Yv(m.issues):qv),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function oy(){return ay}function sy(e,t){let n=e[Kv]?.backEdges;return n!==void 0&&Jv(t)&&n.has(t)}var cy=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Gh(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Mh(e.values[0])}`:`Invalid option: expected one of ${vh(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${vh(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ly(){return{localeError:cy()}}var uy,dy=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fy(){return new dy}(uy=globalThis).__zod_globalRegistry??(uy.__zod_globalRegistry=fy());var py=globalThis.__zod_globalRegistry;function my(e){return e.checks&&=[...e.checks],e}function hy(e,t){return new e(my({type:`string`,...Y(t)}))}function gy(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Y(t)})}function _y(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Y(t)})}function vy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Y(t)})}function yy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Y(t)})}function by(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Y(t)})}function xy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Y(t)})}function Sy(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Y(t)})}function Cy(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Y(t)})}function wy(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Y(t)})}function Ty(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Y(t)})}function Ey(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Y(t)})}function Dy(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Y(t)})}function Oy(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Y(t)})}function ky(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Y(t)})}function Ay(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Y(t)})}function jy(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Y(t)})}function My(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Y(t)})}function Ny(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Y(t)})}function Py(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Y(t)})}function Fy(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Y(t)})}function Iy(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Y(t)})}function Ly(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Y(t)})}function Ry(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Y(t)})}function zy(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Y(t)})}function By(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Y(t)})}function Vy(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Y(t)})}function Hy(e,t){return new __({check:`max_length`,...Y(t),maximum:e})}function Uy(e,t){return new v_({check:`min_length`,...Y(t),minimum:e})}function Wy(e,t){return new y_({check:`length_equals`,...Y(t),length:e})}function Gy(e,t){return new x_({check:`string_format`,format:`regex`,...Y(t),pattern:e})}function Ky(e){return new S_({check:`string_format`,format:`lowercase`,...Y(e)})}function qy(e){return new C_({check:`string_format`,format:`uppercase`,...Y(e)})}function Jy(e,t){return new w_({check:`string_format`,format:`includes`,...Y(t),includes:e})}function Yy(e,t){return new T_({check:`string_format`,format:`starts_with`,...Y(t),prefix:e})}function Xy(e,t){return new E_({check:`string_format`,format:`ends_with`,...Y(t),suffix:e})}function Zy(e){return new D_({check:`overwrite`,tx:e})}function Qy(e){return Zy(t=>t.normalize(e))}function $y(){return Zy(e=>e.trim())}function eb(){return Zy(e=>e.toLowerCase())}function tb(){return Zy(e=>e.toUpperCase())}function nb(){return Zy(e=>Th(e))}function rb(e,t,n){return new e({type:`array`,element:t,...Y(n)})}function ib(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Y(n)})}function ab(e,t){let n=ob(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Kh(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Kh(r))}},e(t.value,t)),t);return n}function ob(e,t){let n=new h_({check:`custom`,...Y(t)});return n._zod.check=e,n}function sb(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Sh(e,t,n[t]);return e}function cb(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??py,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function lb(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ub(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ub(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&sb(o.schema,c),t.io===`input`&&bb(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function db(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function fb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${db(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+db(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
30
|
-
|
|
31
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function pb(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;pb(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var mb=new Set([`type`,`properties`,`required`,`additionalProperties`]),hb=[`oneOf`,`anyOf`];function gb(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function _b(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!mb.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??gb(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Sh(n,r,e.length===1?e[0]:_b(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=gb(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function vb(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of mb)if(t in e)return;let n=t.filter(e=>hb.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=_b(t);else{let e=n[0],i=hb.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>_b([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,sb(e,r))}function yb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):sb(i,s),sb(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())pb(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])vb(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}sb(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Sh(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Sb(t,`input`,e.processors),output:Sb(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function bb(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return bb(r.element,n);if(r.type===`set`)return bb(r.valueType,n);if(r.type===`lazy`)return bb(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return bb(r.innerType,n);if(r.type===`intersection`)return bb(r.left,n)||bb(r.right,n);if(r.type===`record`||r.type===`map`)return bb(r.keyType,n)||bb(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:bb(r.in,n)||bb(r.out,n);if(r.type===`object`){for(let e in r.shape)if(bb(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(bb(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(bb(e,n))return!0;return!!(r.rest&&bb(r.rest,n))}return!1}var xb=(e,t={})=>n=>{let r=cb({...n,processors:t});return ub(e,r),fb(r,e),yb(r,e)},Sb=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=cb({...i??{},target:a,io:t,processors:n});return ub(e,o),fb(o,e),yb(o,e)},Cb=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},wb=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Tb=(e,t)=>{Cb(e,`minimum`,t),wb(e,`maximum`,t)},Eb=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Db=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Ob=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},kb=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ab=(e,t)=>Cb(e,`minimum`,t.minimum),jb=(e,t)=>wb(e,`maximum`,t.maximum),Mb=e=>(t,n)=>{kb(t,n.format);let[r,i]=e[n.format];Cb(t,`minimum`,r),wb(t,`maximum`,i)},Nb={greater_than:(e,t)=>Cb(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>wb(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Eb(e,t.value),number_format:Mb(Nh),bigint_format:Mb(Ph),min_length:Ab,max_length:jb,length_equals:(e,t)=>Tb(e,t.length),min_size:Ab,max_size:jb,size_equals:(e,t)=>Tb(e,t.size),string_format:(e,t)=>{kb(e,t.format),t.pattern&&Db(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Ob(e,t.mime)};function Pb(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Nb[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Cb(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Cb(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&wb(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&wb(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Eb(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Ob(t,i.mime);for(let e of i.patterns??[])Db(t,e);return t}var Fb={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ib=new Map([[uv,n_],[fv,r_]]),Lb=e=>Ib.get(e)??e,Rb=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Pb(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Fb[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Lb);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},zb=(e,t,n,r)=>{lb(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Bb=(e,t,n,r)=>{lb(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Vb=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Pb(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ub(a.element,t,{...r,path:[...r.path,`items`]})},Hb=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ub(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ub=(e,t,n,r)=>{let i=e._zod.def,a=ub(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ub(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Wb=(e,t,n,r)=>{let i=e._zod.def,a=ub(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Gb=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Kb=Symbol();function qb(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(lb(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Kb):JSON.parse(o)}var Jb=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=qb(i.defaultValue,e,t,n,r);o!==Kb&&(n.default=o)},Yb=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=qb(i.defaultValue,e,t,n,r);o!==Kb&&(n._prefault=o)},Xb=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{lb(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Zb=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ub(o,t,r);let s=t.seen.get(e);s.ref=o},Qb=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},$b=(e,t,n,r)=>{let i=e._zod.def;ub(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ex=new WeakSet([Object.prototype,Error.prototype]);function tx(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var nx=Z(`ZodError`,(e,t)=>{gg.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);ex.has(n)||(ex.add(n),tx(n,`format`,e=>t=>yg(e,t)),tx(n,`flatten`,e=>t=>vg(e,t)),tx(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,yh,2)}),tx(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,yh,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),rx=xg(nx),ix=Sg(nx),ax=Cg(nx),ox=Tg(nx),sx=jg(nx),cx=Mg(nx),lx=Ng(nx),ux=Pg(nx),dx=Fg(nx),fx=Ig(nx),px=Lg(nx),mx=Rg(nx);function hx(){lg.localeError||ug(ly())}function gx(){lg.memoizer||ug({memoizer:oy()})}var _x=Z(`ZodType`,(e,t)=>(hx(),k_.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(wh(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return jh(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_S(e,t))},superRefine(e,t){return this.check(vS(e,t))},overwrite(e){return this.check(Zy(e))},optional(){return $x(this)},exactOptional(){return tS(this)},nullable(){return rS(this)},nullish(){return $x(rS(this))},nonoptional(e){return lS(this,e)},array(){return Gx(this)},or(e){return qx([this,e])},and(e){return Yx(this,e)},transform(e){return pS(this,Zx(e))},default(e){return aS(this,e)},prefault(e){return sS(this,e)},catch(e){return dS(this,e)},pipe(e){return pS(this,e)},readonly(){return hS(this)},describe(e){let t=this.clone();return py.add(t,{description:e}),t},meta(...e){if(e.length===0)return py.get(this);let t=this.clone();return py.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Yh(this,`~standard`,{...M_(this),jsonSchema:{input:Sb(this,`input`),output:Sb(this,`output`)}})},set"~standard"(e){Jh(this,`~standard`,e)},parse:function e(t,n){return rx(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ix(this,t,n,{callee:e})},safeParse(e,t){return ax(this,e,t)},async safeParseAsync(e,t){return ox(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Jh(this,`spa`,e)},validate(e,t){return Og(this,e,t)},validateAsync(e,t){return Ag(this,e,t)},encode:function e(t,n){return sx(this,t,n,{callee:e})},decode:function e(t,n){return cx(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await lx(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ux(this,t,n,{callee:e})},safeEncode(e,t){return dx(this,e,t)},safeDecode(e,t){return fx(this,e,t)},async safeEncodeAsync(e,t){return px(this,e,t)},async safeDecodeAsync(e,t){return mx(this,e,t)},toJSONSchema(e){return xb(this,{})(e)},get description(){return py.get(this)?.description},get _def(){return this._zod.def}}),vx=Z(`_ZodString`,(e,t)=>{N_.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rb(e,t,n,r)},Xh({format:e=>Pb(e).format??null,minLength:e=>Pb(e).minimum??null,maxLength:e=>Pb(e).maximum??null},{regex(...e){return this.check(Gy(...e))},includes(...e){return this.check(Jy(...e))},startsWith(...e){return this.check(Yy(...e))},endsWith(...e){return this.check(Xy(...e))},min(...e){return this.check(Uy(...e))},max(...e){return this.check(Hy(...e))},length(...e){return this.check(Wy(...e))},nonempty(...e){return this.check(Uy(1,...e))},lowercase(e){return this.check(Ky(e))},uppercase(e){return this.check(qy(e))},trim(){return this.check($y())},normalize(...e){return this.check(Qy(...e))},toLowerCase(){return this.check(eb())},toUpperCase(){return this.check(tb())},slugify(){return this.check(nb())}})),yx=Z(`ZodString`,(e,t)=>{N_.init(e,t),vx.init(e,t)},{email(e){return this.check(gy(Tx,e))},url(e){return this.check(Sy(Ox,e))},jwt(e){return this.check(Ly(Ux,e))},emoji(e){return this.check(Cy(kx,e))},guid(e){return this.check(_y(Ex,e))},uuid(e){return this.check(vy(Dx,e))},uuidv4(e){return this.check(yy(Dx,e))},uuidv6(e){return this.check(by(Dx,e))},uuidv7(e){return this.check(xy(Dx,e))},nanoid(e){return this.check(wy(Ax,e))},cuid(e){return this.check(Ty(jx,e))},cuid2(e){return this.check(Ey(Mx,e))},ulid(e){return this.check(Dy(Nx,e))},base64(e){return this.check(Py(Bx,e))},base64url(e){return this.check(Fy(Vx,e))},xid(e){return this.check(Oy(Px,e))},ksuid(e){return this.check(ky(Fx,e))},ipv4(e){return this.check(Ay(Ix,e))},ipv6(e){return this.check(jy(Lx,e))},cidrv4(e){return this.check(My(Rx,e))},cidrv6(e){return this.check(Ny(zx,e))},e164(e){return this.check(Iy(Hx,e))},datetime(e){return this.check(Ry(xx,e))},date(e){return this.check(zy(Sx,e))},time(e){return this.check(By(Cx,e))},duration(e){return this.check(Vy(wx,e))}});function bx(e){return hy(yx,e)}var $=Z(`ZodStringFormat`,(e,t)=>{Q.init(e,t),vx.init(e,t)}),xx=Z(`ZodISODateTime`,(e,t)=>{Q_.init(e,t),$.init(e,t)}),Sx=Z(`ZodISODate`,(e,t)=>{$_.init(e,t),$.init(e,t)}),Cx=Z(`ZodISOTime`,(e,t)=>{ev.init(e,t),$.init(e,t)}),wx=Z(`ZodISODuration`,(e,t)=>{tv.init(e,t),$.init(e,t)}),Tx=Z(`ZodEmail`,(e,t)=>{I_.init(e,t),$.init(e,t)}),Ex=Z(`ZodGUID`,(e,t)=>{P_.init(e,t),$.init(e,t)}),Dx=Z(`ZodUUID`,(e,t)=>{F_.init(e,t),$.init(e,t)}),Ox=Z(`ZodURL`,(e,t)=>{W_.init(e,t),$.init(e,t)}),kx=Z(`ZodEmoji`,(e,t)=>{G_.init(e,t),$.init(e,t)}),Ax=Z(`ZodNanoID`,(e,t)=>{K_.init(e,t),$.init(e,t)}),jx=Z(`ZodCUID`,(e,t)=>{q_.init(e,t),$.init(e,t)}),Mx=Z(`ZodCUID2`,(e,t)=>{J_.init(e,t),$.init(e,t)}),Nx=Z(`ZodULID`,(e,t)=>{Y_.init(e,t),$.init(e,t)}),Px=Z(`ZodXID`,(e,t)=>{X_.init(e,t),$.init(e,t)}),Fx=Z(`ZodKSUID`,(e,t)=>{Z_.init(e,t),$.init(e,t)}),Ix=Z(`ZodIPv4`,(e,t)=>{nv.init(e,t),$.init(e,t)}),Lx=Z(`ZodIPv6`,(e,t)=>{av.init(e,t),$.init(e,t)}),Rx=Z(`ZodCIDRv4`,(e,t)=>{ov.init(e,t),$.init(e,t)}),zx=Z(`ZodCIDRv6`,(e,t)=>{cv.init(e,t),$.init(e,t)}),Bx=Z(`ZodBase64`,(e,t)=>{dv.init(e,t),$.init(e,t)}),Vx=Z(`ZodBase64URL`,(e,t)=>{mv.init(e,t),$.init(e,t)}),Hx=Z(`ZodE164`,(e,t)=>{hv.init(e,t),$.init(e,t)}),Ux=Z(`ZodJWT`,(e,t)=>{_v.init(e,t),$.init(e,t)}),Wx=Z(`ZodArray`,(e,t)=>{gx(),xv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vb(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Uy(e,t))},nonempty(e){return this.check(Uy(1,e))},max(e,t){return this.check(Hy(e,t))},length(e,t){return this.check(Wy(e,t))},unwrap(){return this.element}});function Gx(e,t){return rb(Wx,e,t)}var Kx=Z(`ZodUnion`,(e,t)=>{Cv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hb(e,t,n,r),e.options=t.options});function qx(e,t){return new Kx({type:`union`,options:e,...Y(t)})}var Jx=Z(`ZodIntersection`,(e,t)=>{wv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ub(e,t,n,r)});function Yx(e,t){return new Jx({type:`intersection`,left:e,right:t})}var Xx=Z(`ZodTransform`,(e,t)=>{gx(),Dv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bb(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cg(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Kh(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Kh(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zx(e){return new Xx({type:`transform`,transform:e})}var Qx=Z(`ZodOptional`,(e,t)=>{kv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$b(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $x(e){return new Qx({type:`optional`,innerType:e})}var eS=Z(`ZodExactOptional`,(e,t)=>{Av.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$b(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tS(e){return new eS({type:`optional`,innerType:e})}var nS=Z(`ZodNullable`,(e,t)=>{jv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rS(e){return new nS({type:`nullable`,innerType:e})}var iS=Z(`ZodDefault`,(e,t)=>{Mv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function aS(e,t){return new iS({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():kh(t)}})}var oS=Z(`ZodPrefault`,(e,t)=>{Pv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sS(e,t){return new oS({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():kh(t)}})}var cS=Z(`ZodNonOptional`,(e,t)=>{Fv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lS(e,t){return new cS({type:`nonoptional`,innerType:e,...Y(t)})}var uS=Z(`ZodCatch`,(e,t)=>{Rv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dS(e,t){return new uS({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ng(t)})}var fS=Z(`ZodPipe`,(e,t)=>{zv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zb(e,t,n,r),e.in=t.in,e.out=t.out});function pS(e,t){return new fS({type:`pipe`,in:e,out:t})}var mS=Z(`ZodReadonly`,(e,t)=>{Vv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hS(e){return new mS({type:`readonly`,innerType:e})}var gS=Z(`ZodCustom`,(e,t)=>{Uv.init(e,t),_x.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zb(e,t,n,r)});function _S(e,t={}){return ib(gS,e,t)}function vS(e,t){return ab(e,t)}export{gt as _,Ta as a,Me as b,Ri as c,di as d,pi as f,wn as g,Mn as h,wa as i,zi as l,Nn as m,_h as n,Ea as o,_i as p,df as r,ka as s,bx as t,Vi as u,ut as v,Qe as y};
|