@fabiocv/component-code-mcp 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/stdio.js +2 -2
- package/package.json +8 -8
package/dist/stdio.js
CHANGED
|
@@ -78,9 +78,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
78
78
|
`)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}this._deferredResponse!==void 0&&!this._deferredResponse.settled&&(this._deferredResponse.settled=!0,this._deferredResponse.reject(new ve(ke.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){this._deferredResponse===void 0||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:r=>{e=r},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=hv(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>{this.close()})}writeMessageFrame(e){this.writeFrame(`event: message
|
|
79
79
|
data: ${JSON.stringify(e)}
|
|
80
80
|
|
|
81
|
-
`)}writeFrame(e){if(!(this._sse===void 0||this._sse.closed))try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(t){this.onerror?.(new Error(`Failed to write to the response stream: ${t}`))}}};function oE(e){return e instanceof Wk?Kk(e):void 0}function iE(e){return typeof e=="object"&&e!==null&&"setScopeChallengeResolver"in e&&typeof e.setScopeChallengeResolver=="function"}var aE=8,sE=6e5;function cE(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??aE,roundTimeoutMs:e?.roundTimeoutMs??sE,legacyShim:e?.legacyShim??!0}}function Qk(e,t,r){if(r===null||typeof r!="object"||typeof r.method!="string")throw new de(ee.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=r,n=LS(i);if(n===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:n}}function lE(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=[...t].map(i=>i.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function pv(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(ee.InternalError,t)}var uE=class{constructor(e){this._host=e}async fulfill(e,t,r,i,n){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=n,l=0;for(;;){if(l+=1,l>o)return pv(e,uk(e,o));let u=c.inputRequests,d=u!=null&&Object.keys(u).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!d&&f===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let h;if(d){let S=this._host.resolvedClientCapabilities(i),y=[];for(let[k,z]of Object.entries(u)){let{embedded:O,required:x}=Qk(e,k,z);if(O.method!=="roots/list"&&O.params===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${k}' of kind '${O.method}' without params`);if(md(x,S)!==void 0)return pv(e,`Cannot request input '${k}' (${O.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);y.push([k,O])}let T=pk(s);try{let k={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:T.signal},z=await Promise.all(y.map(async([O,x])=>{try{return[O,await this._dispatchLeg(x,k)]}catch(_){throw T.abort(_),_}}));h=Object.fromEntries(z)}catch(k){if(s.aborted)throw k;return pv(e,`Fulfilling input required by '${e}' failed: ${k instanceof Error?k.message:String(k)}`)}finally{T.dispose()}}else await dk(lk,s);let g={...i,mcpReq:{...i.mcpReq,inputResponses:h,droppedInputResponseKeys:void 0,requestState:Ha(f)}};if(f!==void 0){let S=await this._host.verifyRequestState(f,g,e);S!==void 0&&(g=X1(g,S))}let b=await t(r,g);if(!cn(b))return b;c=b}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return r.mode==="url"&&r.elicitationId===void 0&&(r={...r,elicitationId:lE()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},dE=new Set(["tools/call","prompts/get","resources/read"]),pE,Xk,Yk;function gv(e,t){Xk(e,t)}function vv(e){return Yk(e)}var e0=class extends ev{_clientCapabilities;_clientVersion;static{pE=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},Xk=(e,t)=>{let r=t.filter(i=>!e._supportedProtocolVersions.includes(i));r.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...r]),e.setRequestHandler("server/discover",()=>e._ondiscover())},Yk=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uE({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new Rd,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=cE(t?.inputRequired),t?.cacheHints!==void 0){for(let[r,i]of Object.entries(t.cacheHints))i!==void 0&&V1(i,`cacheHints['${r}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",r=>this._oninitialize(r)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),fd(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(this.transport!==void 0)throw new ve(ke.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=oE(e)?.revision;t!==void 0&&!this._servedModernEra()&&Zt.includes(t)&&fd(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,n=Sd(An,i);return n.success&&this._loggingLevels.set(r,n.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(i,n,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[En],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:n,logger:o}})},elicitInput:(i,n)=>this.elicitInput(i,n),requestSampling:(i,n)=>this.createMessage(i,n)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(An.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return r?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(r):!1};registerCapabilities(e){if(this.transport)throw new ve(ke.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=tv(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let r=this._cacheHints?.[e],i=dE.has(e);return r===void 0&&!i?async(n,o)=>{let a=await t(n,o);if(cn(a))throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(n,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,n,o):await t(n,o);if(cn(a)){if(!i)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return r===void 0?a:hd(a,r)}}return async(r,i)=>{let n=sn(this._negotiatedProtocolVersion),o=n.validateRequest("tools/call",r);if(!o.ok)throw new de(o.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,r,i);if(cn(a))return a;let s=q1(a),c=n.validateResult("tools/call",s);if(!c.ok)throw new de(c.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Ao(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,r,i){let n=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let d=await this._verifyRequestState(o,i,e);d!==void 0&&(a=X1(i,d))}let s;try{s=await t(r,a)}catch(d){throw d instanceof de&&d.code===ee.UrlElicitationRequired&&n?new de(ee.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):d}if(!cn(s))return s;if(!n){if(!this._inputRequiredServing.legacyShim)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??fr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,u=typeof s.requestState=="string";if(!l&&!u)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let d=this._inputRequestCapabilityView(i);for(let[f,h]of Object.entries(c)){let{embedded:g,required:b}=Qk(e,f,h),S=md(b,d);if(S!==void 0)throw new vd({requiredCapabilities:S},`Cannot request input '${f}' (${g.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,r){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${r}: ${i instanceof Error?i.message:String(i)}`)),new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[on]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ke.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ke.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ke.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ke.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ke.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=VS(this._supportedProtocolVersions),i=r.includes(t)?t:r[0]??fr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:fd(this._supportedProtocolVersions),capabilities:mE(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ke.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],u=l.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new de(ee.InvalidParams,"The last message must contain only tool_result content if any is present");if(!u)throw new de(ee.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(a.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new de(ee.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),n=this._wireCodec().samplingResultVariant(r,i);if(!n.ok)throw new ve(ke.InvalidResult,`Invalid sampling/createMessage result: ${n.reason==="invalid"?n.message:n.reason}`);return n.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ke.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",n=r?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(n&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(ee.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function mE(e){return{...e}}function fE(e,t){let r=0,i=[e];for(;i.length>0;){let n=i.pop();if(!(n===null||typeof n!="object"))if(Array.isArray(n))for(let o of n){if(++r>t)return r;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;if(++r>t)return r;let a=n[o];a!==null&&typeof a=="object"&&i.push(a)}}return r}function hE(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var Ba=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return Fk;try{let r=kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new e0(e,t),this._maxToolInputElements=hE(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return iE(e)&&e.setScopeChallengeResolver(t=>this.resolveScopeChallenge(t)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredTools[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}case"resources/read":{let t=e.request.params?.uri;if(typeof t!="string")return;let r;try{r=new URL(t)}catch{return}let i=this._registeredResources[r.toString()];if(i!==void 0)return i.enabled?i.scopeChallenge?.(e):void 0;for(let n of Object.values(this._registeredResourceTemplates))if(n.resourceTemplate.uriTemplate.match(r.toString()))return n.enabled?n.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredPrompts[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?gE(e,t.inputSchema):Fk,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=kr(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new de(ee.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),n=await this.executeToolHandler(r,i,t);return await this.validateToolOutput(r,n,e.params.name),cn(n)?n:this.server.projectCallToolResult(n,r.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===ee.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(this._maxToolInputElements!==void 0&&fE(t,this._maxToolInputElements)>this._maxToolInputElements)throw new de(ee.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await yr(e.inputSchema,t??{});if(!i.success)throw new de(ee.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||cn(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(ee.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await yr(e.outputSchema,t.structuredContent);if(!i.success)throw new de(ee.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return Z1(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return J1(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(ee.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return Ja;let i=Jk(Zk(r.argsSchema)?.[e.params.argument.name]);if(!mv(i))return Ja;let n=nE(i);return n?Hk(await n(e.params.argument.value,e.params.context)):Ja}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(n=>n.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return Ja;throw new de(ee.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?Hk(await i(e.params.argument.value,e.params.context)):Ja}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([n,o])=>o.enabled).map(([n,o])=>({uri:n,name:o.name,...o.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let o=await n.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...n.metadata,...a})}return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new de(ee.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new de(ee.InvalidParams,`Resource ${r} disabled`);return hd(await i.readCallback(r,t),i.cacheHint)}for(let n of Object.values(this._registeredResourceTemplates)){let o=n.resourceTemplate.uriTemplate.match(r.toString());if(o){if(!n.enabled)throw new de(ee.InvalidParams,`Resource template ${n.resourceTemplate.uriTemplate} disabled`);return hd(await n.readCallback(r,o,t),n.cacheHint)}}throw new gd(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?ck(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:n,scopeChallenge:o,...a}=r,s=a;if(n!==void 0&&V1(n,`resource ${e}`),typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let c=this._createRegisteredResource(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let c=this._createRegisteredResourceTemplate(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}}_createRegisteredResource(e,t,r,i,n,o){let a={name:e,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==r&&(delete this._registeredResources[r],s.uri&&(this._registeredResources[s.uri]=a)),s.name!==void 0&&(a.name=s.name),s.metadata!==void 0&&(a.metadata=s.metadata),s.title!==void 0&&(a.title=s.title,a.metadata={...a.metadata,title:s.title}),s.callback!==void 0&&(a.readCallback=s.callback),s.scopeChallenge!==void 0&&(a.scopeChallenge=s.scopeChallenge===null?void 0:s.scopeChallenge),s.enabled!==void 0&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,n,o){let a={resourceTemplate:r,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:c=>{c.name!==void 0&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=a)),c.template!==void 0&&(a.resourceTemplate=c.template),c.metadata!==void 0&&(a.metadata=c.metadata),c.title!==void 0&&(a.title=c.title,a.metadata={...a.metadata,title:c.title}),c.callback!==void 0&&(a.readCallback=c.callback),c.scopeChallenge!==void 0&&(a.scopeChallenge=c.scopeChallenge===null?void 0:c.scopeChallenge),c.enabled!==void 0&&(a.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,n,o,a,s){let c=i,l=n,u={title:t,description:r,argsSchema:i,icons:o,scopeChallenge:a,_meta:s,handler:Gk(e,i,n),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d.scopeChallenge!==void 0&&(u.scopeChallenge=d.scopeChallenge===null?void 0:d.scopeChallenge),d._meta!==void 0&&(u._meta=d._meta);let f=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,c=d.argsSchema,f=!0),d.callback!==void 0&&(l=d.callback,f=!0),f&&(u.handler=Gk(e,c,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=Zk(i);d&&Object.values(d).some(f=>mv(Jk(f)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,r,i,n,o,a,s,c,l,u){ov(e);let d=u,f,h={title:t,description:r,inputSchema:i,outputSchema:n,get outputSchemaJson(){return f??=Vk(h.outputSchema)},set outputSchemaJson(g){f=g},annotations:o,icons:a,execution:s,scopeChallenge:c,_meta:l,handler:u,executor:Lk(i,u),enabled:!0,disable:()=>h.update({enabled:!1}),enable:()=>h.update({enabled:!0}),remove:()=>h.update({name:null}),update:g=>{g.name!==void 0&&g.name!==e&&(typeof g.name=="string"&&ov(g.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],g.name&&(delete this._toolInputSchemaJson[g.name],this._registeredTools[g.name]=h,e=g.name)),g.title!==void 0&&(h.title=g.title),g.description!==void 0&&(h.description=g.description);let b=!1;g.paramsSchema!==void 0&&(h.inputSchema=g.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),g.callback!==void 0&&(h.handler=g.callback,d=g.callback,b=!0),b&&(h.executor=Lk(h.inputSchema,d)),g.outputSchema!==void 0&&(h.outputSchema=g.outputSchema,h.outputSchemaJson=Vk(g.outputSchema)),g.annotations!==void 0&&(h.annotations=g.annotations),g.icons!==void 0&&(h.icons=g.icons),g.scopeChallenge!==void 0&&(h.scopeChallenge=g.scopeChallenge===null?void 0:g.scopeChallenge),g._meta!==void 0&&(h._meta=g._meta),g.enabled!==void 0&&(h.enabled=g.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=h,this.setToolRequestHandlers(),this.sendToolListChanged(),h}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:n,inputSchema:o,outputSchema:a,annotations:s,icons:c,scopeChallenge:l,_meta:u}=t;return this._createRegisteredTool(e,i,n,kd(o),kd(a),s,c,void 0,l,u,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:n,argsSchema:o,icons:a,scopeChallenge:s,_meta:c}=t,l=this._createRegisteredPrompt(e,i,n,kd(o),r,a,s,c);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function Lk(e,t){if(e){let i=t;return async(n,o)=>i(n,o)}let r=t;return async(i,n)=>r(n)}var Fk={type:"object",properties:{}};function gE(e,t){let r=kr(t,"input"),i=B1(r);return i.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${i.reason}`),r}function Vk(e){if(e!==void 0)try{return kr(e,"output")}catch{return}}function Gk(e,t,r){if(t){let i=r;return async(n,o)=>{let a=await yr(t,n??{});if(!a.success)throw new de(ee.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=r;return async(n,o)=>i(o)}}function Hk(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Ja={completion:{values:[],hasMore:!1}};function Zk(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function vE(e){return e?.type==="optional"}function Jk(e){return vE(e)?e.def?.innerType??e:e}function yE(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function bE(e,t){let r={},i=n=>t===void 0||n===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(r.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(r.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(r.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(r.resourceSubscriptions=[...e.resourceSubscriptions]),r}var Ed=1024;function t0(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[hr]:t}}}}function _E(e){let t=sn(Ga).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var SE=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),n0=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Ed,t,r){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=r}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t)}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=_E(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let r=bE(t,this._serverCapabilities);return this._subs.set(e.id,r),t0({method:"notifications/subscriptions/acknowledged",params:{notifications:r}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!SE.has(e.method))return"passthrough";let t=e.params?.uri,r=typeof t=="string"?t:void 0,i=kE(e.method,r),n=[];for(let[o,a]of this._subs)yE(a,i)&&n.push(t0({method:e.method,params:e.params??{}},o));return n}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[hr]:t,...this._serverInfo!==void 0&&{[Ht]:this._serverInfo}}}});return this._subs.clear(),e}};function kE(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var EA=4*1024*1024;var r0="https://cdn.jsdelivr.net";function o0(e,...t){let r=new Ba(e);for(let i of t)i(r);return r}function i0(e,t){Sv(e,t.name,t.uri,{description:t.description},()=>({contents:[{uri:t.uri,mimeType:Pd,text:t.html,_meta:{ui:{csp:{resourceDomains:[r0]}}}}]}))}var a0=Symbol("swallowsErrorsAfterClose"),$E=class{_readBuffer;_started=!1;_closed=!1;constructor(e=dv.stdin,t=dv.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new nv({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0;for(let e of this._stdout.listeners("error"))e[a0]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[a0]=!0,this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=rv(e),n=!1,o=s=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),r(s))},a=()=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(n)return;n=!0,this._stdout.off("error",o),t()}else n||this._stdout.once("drain",a)})}},s0=3e3,wE=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,r){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=r}async start(){}async send(e,t){if(br(e)||Sr(e)){let{id:r}=e;r!==void 0&&this._settle(r)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(_t(e))this._pendingRequests.add(e.id);else if(Mn(e)&&e.method==="notifications/cancelled"){let r=e.params?.requestId;r!==void 0&&this._settle(r)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let r=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(n=>n!==r),t(!1)},e);this._drainWaiters.push(r)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function TE(e){let t=e.params;if(e.method==="initialize"&&!K1(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!yd(t))return{kind:"legacy",reason:"no-claim"};let r=_r(t),i=(r===void 0?[]:_d(r))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let n=bd(t);return n===void 0||!Zt.includes(n)?{kind:"unsupported-revision",requested:n??"unknown"}:{kind:"modern",revision:n,classification:{era:"modern",revision:n}}}function c0(e,t={}){let r=t.legacy??"serve",i=t.transport??new $E,n={phase:"opening"},o,a=!1,s=()=>a||n.phase==="closed",c=I=>{try{t.onerror?.(I)}catch{}},l=(I,A,F,q)=>i.send({jsonrpc:"2.0",id:I,error:{code:A,message:F,...q!==void 0&&{data:q}}}).catch(V=>c(Mt(V))),u=new n0(t.maxSubscriptions??Ed),d=I=>{if(!Mn(I))return;let A=u.routeOutbound(I);if(A!=="passthrough"){for(let F of A)i.send({jsonrpc:"2.0",...F}).catch(q=>c(Mt(q)));return"handled"}},f=async I=>{if(_t(I)&&I.method==="subscriptions/listen"){let A=_r(I.params),F=yd(I.params)?(A===void 0?[]:_d(A))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},q=bd(I.params),V;if(F!==void 0)V={jsonrpc:"2.0",id:I.id,error:{code:-32602,message:`Invalid _meta envelope: ${F.key}: ${F.problem}`}};else if(q===void 0||!Zt.includes(q)){let te=new jo({supported:[...Zt],requested:q??"unknown"});V={jsonrpc:"2.0",id:I.id,error:{code:te.code,message:te.message,data:te.data}}}else V=u.serve(I);return await i.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(te=>c(Mt(te))),!0}if(Mn(I)&&I.method==="notifications/cancelled"){let A=I.params?.requestId;if(A!==void 0&&u.cancel(A))return!0}return!1},h=(I,A,F)=>{let q=W1({kind:"legacy",reason:A,...F!==void 0&&{requestedVersion:F}},Zt);return q===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${q.cell}): ${q.message}`)),l(I.id,q.code,q.message,q.data))},g=I=>{a||I===o||x()},b=async(I,A)=>{let F=await e({era:I}),q=F instanceof Ba?F.server:F;I==="modern"&&(Y1(q,A),gv(q,Zt),u.setServerCapabilities(q.getCapabilities(),vv(q)));let V=new wE(i,()=>g(V),I==="modern"?d:void 0);return await F.connect(V),{product:F,channel:V}},S=I=>I.product.close().catch(A=>c(Mt(A))),y=async I=>{o=I.channel;try{await I.channel.whenRequestsAnswered(s0)||c(new Error(`Discarded the probe instance with requests still unanswered after ${s0}ms; continuing with the fallback`)),await I.product.close()}catch(A){c(Mt(A))}finally{o=void 0}},T=async I=>{if(n.phase==="closed")return;if(n.phase==="pinned"){if(n.era==="modern"&&_t(I)&&I.method==="initialize"&&!K1(I.params)){await h(I,"initialize",I.params!==null&&typeof I.params=="object"&&typeof I.params.protocolVersion=="string"?I.params.protocolVersion:void 0);return}if(n.era==="modern"&&await f(I)||s())return;n.instance.channel.deliver(I);return}if(!_t(I)&&!Mn(I)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let A=TE(I);switch(A.kind){case"invalid-envelope":{let F=`Invalid _meta envelope for protocol revision 2026-07-28: ${A.issue.key}: ${A.issue.problem}`;_t(I)?await l(I.id,ee.InvalidParams,F,{envelope:A.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${F}`));return}case"unsupported-revision":if(_t(I)){let F=new jo({supported:[...Zt],requested:A.requested});c(F),await l(I.id,F.code,F.message,F.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${A.requested}`));return;case"modern":if(_t(I)&&I.method==="server/discover"){if(n.phase==="probe"){n.instance.channel.deliver(I,{classification:A.classification});return}let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"probe",instance:F},F.channel.deliver(I,{classification:A.classification});return}if(n.phase==="probe"){if(Mn(I)){n.instance.channel.deliver(I,{classification:A.classification});return}n={phase:"pinned",era:"modern",instance:n.instance}}else{let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"pinned",era:"modern",instance:F}}if(await f(I)||s())return;n.instance.channel.deliver(I,{classification:A.classification});return;case"legacy":{if(r==="reject"){_t(I)&&await h(I,A.reason,A.requestedVersion);return}if(n.phase==="probe"){if(await y(n.instance),s())return;n={phase:"opening"}}let F=await b("legacy");if(s()){await S(F);return}n={phase:"pinned",era:"legacy",instance:F},n.instance.channel.deliver(I);return}}},k=[],z=!1,O=async()=>{if(!z){z=!0;try{for(;k.length>0;){let I=k.shift();try{await T(I)}catch(A){_t(I)&&await l(I.id,ee.InternalError,"Internal server error"),c(Mt(A))}}}finally{z=!1}}},x=async()=>{if(a||n.phase==="closed")return;a=!0;let I=n;n={phase:"closed"};for(let A of u.teardownAll())await i.send(A).catch(F=>c(Mt(F)));(I.phase==="probe"||I.phase==="pinned")&&await I.instance.product.close().catch(A=>c(Mt(A))),await i.close().catch(A=>c(Mt(A)))};i.onmessage=I=>{k.push(I),O()},i.onerror=I=>{c(I),(n.phase==="probe"||n.phase==="pinned")&&n.instance.channel.onerror?.(I)},i.onclose=()=>{if(a||n.phase==="closed")return;a=!0;let I=n;n={phase:"closed"},(I.phase==="probe"||I.phase==="pinned")&&I.instance.product.close().catch(A=>c(Mt(A)))};let _=i.start().catch(I=>{throw c(Mt(I)),I});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await x()}}}function Mt(e){return e instanceof Error?e:new Error(String(e))}var l0="0.4.0";var u0='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Component Code</title>\n <style>\n @font-face {\n font-family: Geist;\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-sans/Geist-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n body {\n margin: 0;\n padding: 1px;\n font-family: Geist, ui-sans-serif, system-ui, sans-serif;\n }\n </style>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=ee.prototype=new y;te.constructor=ee,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var ie={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function oe(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return oe(e.type,t,e.props)}function ce(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function le(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?le(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function pe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,pe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),pe(o,r,i,``,function(e){return e})):o!=null&&(ce(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+de(a,u),c+=pe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+de(a,u++),c+=pe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return pe(fe(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function b(e,t,n){if(e==null)return e;var r=[],i=0;return pe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function me(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var he=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ge={map:b,forEach:function(e,t,n){b(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!ce(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ie.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return oe(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return oe(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ce,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:me}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ie.T,n={};ie.T=n;try{var r=e(),i=ie.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,he)}catch(e){he(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),ie.T=t}},e.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},e.use=function(e){return ie.H.use(e)},e.useActionState=function(e,t,n){return ie.H.useActionState(e,t,n)},e.useCallback=function(e,t){return ie.H.useCallback(e,t)},e.useContext=function(e){return ie.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return ie.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return ie.H.useEffect(e,t)},e.useEffectEvent=function(e){return ie.H.useEffectEvent(e)},e.useId=function(){return ie.H.useId()},e.useImperativeHandle=function(e,t,n){return ie.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ie.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ie.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ie.H.useMemo(e,t)},e.useOptimistic=function(e,t){return ie.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return ie.H.useReducer(e,t,n)},e.useRef=function(e){return ie.H.useRef(e)},e.useState=function(e){return ie.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return ie.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ie.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=Object.defineProperty,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),m=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t&&f(n,Symbol.toStringTag,{value:`Module`}),n},h=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),g=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),_=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),v=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function y(e){return typeof e==`string`&&g.has(e.replace(/#$/,``))}function ee(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(h.has(n))return`2020-12`;if(g.has(n))return`2019-09`;if(_.has(n)||v.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function te(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ne(e,t=`|`){return e.map(e=>Oe(e)).join(t)}function re(e,t){return typeof t==`bigint`?t.toString():t}var ie=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ae(e){return new ie(e)}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pe(e){return fe(e._zod.def)??e._zod.def.shape}function b(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return de(this,t,e),e},enumerable:!0,configurable:!0})}function me(e,t,n){t in e?de(e,t,n):e[t]=n}function he(e,t,n,r){let i=pe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?b(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):me(e,a,r?r(n.value,a):n.value))}}function ge(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?b(e,n,()=>t[n]):me(e,n,r.value))}}function _e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ae(()=>{if(vt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xe(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Te=new Set([`string`,`number`,`symbol`]);function Ee(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function De(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 Oe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ke(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},je={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return he(i,e,Ne(e,t)),De(e,_e(n,{shape:i,checks:[]}))}function Ne(e,t){let n=pe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function S(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ne(e,t)),a={};return he(a,e,Reflect.ownKeys(pe(e)).filter(e=>!i.has(e))),De(e,_e(n,{shape:a,checks:[]}))}function Pe(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Fe(e,t){let n={};return he(n,e,Reflect.ownKeys(pe(e))),ge(n,t),n}function Ie(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Le(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return he(n,e,Reflect.ownKeys(pe(e))),he(n,t,Reflect.ownKeys(pe(t))),De(e,_e(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ne(t,n)):void 0,o={};return he(o,t,Reflect.ownKeys(pe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),De(t,_e(t._zod.def,{shape:o,checks:[]}))}function ze(e,t,n){let r=n?new Set(Ne(t,n)):void 0,i={};return he(i,t,Reflect.ownKeys(pe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),De(t,_e(t._zod.def,{shape:i}))}function Be(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 Ve(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 He(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ue(e){return typeof e==`string`?e:e?.message}function We(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 Ge(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ke(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:Ue(e.inst?._zod.def?.error?.(e))??Ue(a?.(e))??Ue(t?.error?.(e))??Ue(n.customError?.(e))??Ue(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 qe=/[\\uD800-\\uDBFF]/;function Je(e){let t=e.length;if(!qe.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 Ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Xe(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 Ze(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Qe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nt(e,n,r.value)}}function $e(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function et(e,t,n){return $e(e,t,n,!1)}function tt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $e(this,n,r(this))},set(e){$e(this,n,e)}})}return t}function nt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$e(this,t,n.bind(this))},set(e){$e(this,t,e)}})}function rt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var it,at=!1,ot={configurable:!0,get(){at=!0}};function st(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&it!==e._zod){it=void 0;return}it=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=at;at=!1;try{let r=n(this);return at?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),at||=e,r}catch(n){throw delete this[t],at||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ct(e,t,n,r){let i=rt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var lt=`~constantCatch`;function ut(e){let t=()=>e;return t[lt]=!0,t}var dt,ft=Object.freeze({status:`aborted`}),pt={value:void 0,enumerable:!1},mt=`captureStackTrace`in Error?Error:null;function ht(e){let t=mt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(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){pt.value=new a(r);try{Object.defineProperty(n,"_zod",pt)}finally{pt.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),Qe(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?ht(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 gt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});var vt=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(vt,e),vt}function bt(){let e=this._zod;return e.message??=JSON.stringify(e.def,re,2),e.message}function xt(e){this._zod.message=e}var St={get:bt,set:xt,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},wt=new WeakSet([Object.prototype,Error.prototype]),Tt=(e,t)=>{e.name=`$ZodError`,Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",St);let n=Object.getPrototypeOf(e);wt.has(n)||(wt.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})}}))},Et=C(`$ZodError`,Tt);C(`$ZodError`,Tt,void 0,{Parent:Error});function Dt(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 Ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kt(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 At(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jt=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 gt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Mt=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=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Nt=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 gt;return a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}};function Pt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ke(e,n,yt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ft=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?Pt(e,a.issues,i):{success:!0,data:a.value}},It=Symbol.for(`zod.compile.invalid`),Lt=Symbol.for(`zod.compile.fallback`),Rt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==It)return!0;if(r.definite===!0&&n===void 0)return!1}return zt(e,t,n)});function zt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gt;return a.issues.length===0}var Bt=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},Vt=e=>{let t=jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,At(n,a))};return n},Ht=e=>{let t=jt(e),n=(e,r,i,a)=>t(e,r,i,At(n,a));return n},Ut=e=>{let t=Mt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,At(n,a))};return n},Wt=e=>{let t=Mt(e),n=async(e,r,i,a)=>await t(e,r,i,At(n,a));return n},Gt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Kt=e=>(t,n,r)=>Nt(e)(t,n,r),qt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Jt=e=>async(t,n,r)=>Ft(e)(t,n,r),Yt=/^[cC][0-9a-z]{6,}$/,Xt=/^[0-9a-z]+$/,Zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qt=/^[0-9a-vA-V]{20}$/,$t=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/;function tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,rn=/^([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})$/,an=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)$/,on=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,sn=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function cn(){return new RegExp(sn,`u`)}var ln=/^(?:(?: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])$/,un=/^(([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}|:))$/,dn=/^((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])$/,fn=/^(([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])$/,pn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hn=/^https?$/,gn=/^\\+[1-9]\\d{6,14}$/,_n=`(?:(?:\\\\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 vn(e){return RegExp(`^${e}$`)}var yn=vn(_n);function bn(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 xn(e){return RegExp(`^${bn(e)}$`)}function Sn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${bn({precision:e.precision})}`:n;return RegExp(`^${_n}T(?:${r})$`)}var Cn=/^[\\s\\S]{0,}$/,wn=/^-?\\d+$/,Tn=/^-?\\d+(?:\\.\\d+)?$/,En=/^(?:true|false)$/i,Dn=/^null$/i,On=/^undefined$/i,kn=/^[^A-Z]*$/,An=/^[^a-z]*$/,jn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn=e=>{let t=e.value;return!oe(t)&&t.length!==void 0},Nn={number:`number`,bigint:`bigint`,object:`date`},Pn=C(`$ZodCheckLessThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=C(`$ZodCheckGreaterThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),In=C(`$ZodCheckMultipleOf`,(e,t)=>{jn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ln=C(`$ZodCheckNumberFormat`,(e,t)=>{jn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ae[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Je(r):i)<=t.maximum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=C(`$ZodCheckMinLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Je(r):i)>=t.minimum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Je(r):i;if(a===t.length)return;let o=Ye(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})}}),Vn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;jn.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=()=>{})}),Hn=C(`$ZodCheckRegex`,(e,t)=>{Vn.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})}}),Un=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kn,Vn.init(e,t)}),Wn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=An,Vn.init(e,t)}),Gn=C(`$ZodCheckIncludes`,(e,t)=>{jn.init(e,t);let n=Ee(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})}}),Kn=C(`$ZodCheckStartsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`^${Ee(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})}}),qn=C(`$ZodCheckEndsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`.*${Ee(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})}}),Jn=C(`$ZodCheckOverwrite`,(e,t)=>{jn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Yn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Xn={major:4,minor:6,patch:7},Zn=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xn;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=Be(t),a;for(let o of n){if(o._zod.def.when){if(Ve(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 gt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ge(t.issues,n,e),i||=Be(t,n))});else{if(t.issues.length===n)continue;Ge(t.issues,n,e),i||=Be(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Be(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gt;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 gt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return et(this,`~standard`,er(this))},set"~standard"(e){$e(this,`~standard`,e)}}),Qn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ke(e,t,yt()))}:{value:e.value};async function $n(e,t){let n={async:!0};return Qn(await e._zod.run({value:t,issues:[]},n),n)}function er(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Qn(r,n)}catch{}return $n(e,t)},vendor:`zod`,version:1}}var tr=C(`$ZodString`,(e,t)=>{Zn.init(e,t),e._zod.pattern=t.pattern??Cn,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}}),nr=C(`$ZodStringFormat`,(e,t)=>{Vn.init(e,t),tr.init(e,t)}),rr=C(`$ZodGUID`,(e,t)=>{t.pattern??=rn,nr.init(e,t)}),ir=C(`$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??=an(e)}else t.pattern??=an();nr.init(e,t)}),ar=C(`$ZodEmail`,(e,t)=>{t.pattern??=on,nr.init(e,t)});function or(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function sr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?or(e)||2:cr(e,t)}function cr(e,t){if(!t.normalize&&t.protocol?.source===hn.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 lr=/[\\t\\n\\r]/g;function ur(e){return e.replace(lr,``)}function dr(e,t){return t.lastIndex=0,t.test(e.hostname)}function fr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var pr=C(`$ZodURL`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sr(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=ur(r);return}t.hostname&&!dr(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&&!fr(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:ur(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=cn(),nr.init(e,t)}),hr=C(`$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?en:tn(t.length),nr.init(e,t)}),gr=C(`$ZodCUID`,(e,t)=>{t.pattern??=Yt,nr.init(e,t)}),_r=C(`$ZodCUID2`,(e,t)=>{t.pattern??=Xt,nr.init(e,t)}),vr=C(`$ZodULID`,(e,t)=>{t.pattern??=Zt,nr.init(e,t)}),yr=C(`$ZodXID`,(e,t)=>{t.pattern??=Qt,nr.init(e,t)}),br=C(`$ZodKSUID`,(e,t)=>{t.pattern??=$t,nr.init(e,t)}),xr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sn(t),nr.init(e,t)}),Sr=C(`$ZodISODate`,(e,t)=>{t.pattern??=yn,nr.init(e,t)}),Cr=C(`$ZodISOTime`,(e,t)=>{t.pattern??=xn(t),nr.init(e,t)}),wr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=nn,nr.init(e,t)}),Tr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=ln,nr.init(e,t)}),Er=/^[0-9a-fA-F:.]+$/;function Dr(e){return Er.test(e)?or(`http://[${e}]`):!1}var Or=C(`$ZodIPv6`,(e,t)=>{t.pattern??=un,nr.init(e,t),e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),kr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=dn,nr.init(e,t)});function Ar(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:Dr(n)}var jr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=fn,nr.init(e,t),e._zod.check=n=>{Ar(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,Pr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Nr,nr.init(e,t),e._zod.check=n=>{Mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Fr=/^[A-Za-z0-9_-]*$/;function Ir(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Lr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,nr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Rr=C(`$ZodE164`,(e,t)=>{t.pattern??=gn,nr.init(e,t)});function zr(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 Br=C(`$ZodJWT`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{zr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Vr=C(`$ZodNumber`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Tn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Hr=C(`$ZodNumberFormat`,(e,t)=>{Ln.init(e,t),Vr.init(e,t)}),Ur=C(`$ZodBoolean`,(e,t)=>{Zn.init(e,t),e._zod.pattern=En,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Wr=C(`$ZodUndefined`,(e,t)=>{Zn.init(e,t),e._zod.pattern=On,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Gr=C(`$ZodNull`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Kr=C(`$ZodAny`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),qr=C(`$ZodUnknown`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),Jr=C(`$ZodNever`,(e,t)=>{Zn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yr(e,t){let n=We(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 We(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,Ge(n.issues,t,e),n}}return i(n,a)}}var Xr=e=>Array.isArray(e)?e.length:-1;function Zr(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}var Qr=C(`$ZodArray`,(e,t)=>{Zn.init(e,t);let n=vt.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=>Zr(t,r,e)));else if(Zr(c,r,e),s&&c.issues.length!==0&&Be(c))break}return o.length?Promise.all(o).then(()=>r):r},Yr(e,Xr)});function $r(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...He(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ei=[];function ti(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ei,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ke(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ni(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Be(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$r(e,n,i,t,d,f))):$r(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ri=C(`$ZodObject`,(e,t)=>{Zn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ae(()=>ti(t));st(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||de(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=vt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Be(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>$r(n,t,e,r,a,o))):$r(s,t,e,r,a,o)}return o?ni(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ii=C(`$ZodObjectJIT`,(e,t)=>{ri.init(e,t);let n=e._zod.parse,r=ae(()=>ti(t)),i=vt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ve(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xe,c=!vt.jitless,l=c&&Se.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ni([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ai(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=>!Be(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=>Ke(e,r,yt())))}),t)}var oi=C(`$ZodUnion`,(e,t)=>{Zn.init(e,t),st(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),st(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),st(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)))}),st(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=>se(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=>ai(t,r,e,i)):ai(o,r,e,i)}});function si(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ci=C(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,oi.init(e,t);let n=e._zod.parse;st(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||de(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ae(()=>si(t));e._zod.parse=(i,a)=>{let o=i.value;if(!xe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),li=C(`$ZodIntersection`,(e,t)=>{Zn.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])=>di(e,t,n)):di(e,i,a)}});function ui(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(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=ui(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=ui(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 di(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=ui(t.value,n.value);if(!c.valid){if(Be(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fi=C(`$ZodRecord`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ce(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...He(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Tn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...He(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),pi=C(`$ZodEnum`,(e,t)=>{Zn.init(e,t);let n=te(t.entries),r=new Set(n);e._zod.values=r,st(e,`pattern`,e=>{let t=te(e.def.entries).filter(e=>Te.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ee(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=C(`$ZodLiteral`,(e,t)=>{Zn.init(e,t);let n=new Set(t.values);e._zod.values=n,st(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ee(e):e?Ee(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=C(`$ZodTransform`,(e,t)=>{Zn.init(e,t),e._zod.optin=`optional`,vt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(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 gt;return n.value=i,n}});function gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var _i=C(`$ZodOptional`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(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=>gi(e,t)):gi(e,r)}return t.innerType._zod.run(e,n)}}),vi=C(`$ZodExactOptional`,(e,t)=>{_i.init(e,t),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yi=C(`$ZodNullable`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)}|null)$`):void 0}),st(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)}),bi=C(`$ZodDefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(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=>xi(e,t)):xi(r,t)}});function xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Si=C(`$ZodPrefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(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))}),Ci=C(`$ZodNonOptional`,(e,t)=>{Zn.init(e,t),st(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=>wi(t,e)):wi(i,e)}});function wi(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 Ti(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ke(e,r,yt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ei=C(`$ZodCatch`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),st(e,`optout`,e=>e.def.innerType._zod.optout),st(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=>Ti(e,r,t,n)):Ti(e,r,t,n)}}),Di=C(`$ZodPipe`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>e.def.in._zod.values),st(e,`optin`,e=>e.def.in._zod.optin),st(e,`optout`,e=>e.def.out._zod.optout),st(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=>Oi(e,t.in,n)):Oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.out,n)):Oi(r,t.out,n)}});function Oi(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 ki=C(`$ZodPreprocess`,(e,t)=>{Di.init(e,t)}),Ai=C(`$ZodReadonly`,(e,t)=>{Zn.init(e,t),st(e,`propValues`,e=>e.def.innerType._zod.propValues),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`optin`,e=>e.def.innerType?._zod?.optin),st(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(ji):ji(r)}});function ji(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Mi=C(`$ZodLazy`,(e,t)=>{Zn.init(e,t),ue(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),st(e,`pattern`,e=>e.innerType?._zod?.pattern),st(e,`propValues`,e=>e.innerType?._zod?.propValues),st(e,`optin`,e=>e.innerType?._zod?.optin??void 0),st(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ni=C(`$ZodCustom`,(e,t)=>{jn.init(e,t),Zn.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=>Pi(t,n,r,e));Pi(i,n,r,e)}});function Pi(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(Ze(e))}}var Fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ii=`~memo`,Li=[];function Ri(e){return typeof e==`object`&&!!e}function zi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bi=new WeakMap,Vi=0,Hi=1,Ui=2;function Wi(e,t,n){let r=Bi.get(e);if(r!==void 0)return r?Ui:Vi;if(t.has(e))return Ui;t.add(e);let i=Vi,a=e=>{if(i!==Ui&&e?._zod){let r=Wi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hi:o.value?._zod?Wi(o.value,t,n):Vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fe(c);s(e?o(e,!0):Hi),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?Wi(r,t,!1):Hi);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),Gi(e,i)}function Gi(e,t){return t!==Hi&&Bi.set(e,t===Ui),t}function Ki(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qi,Ji=[],Yi={alloc(e,t,n){let r=qi;if(!r)return n;qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ji.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`&&Zi(n,e.value))throw new Fi;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=Wi(e,new Set,!1);if(i===Vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ui||r?n=!0:r=!0}let l=s.value;if(!Ri(l))return t(s,c);let u=c[Ii];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ii]=u);let d;i===c?d=a:(d=Ki(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(...zi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;qi=d;let p=Ji.length,m=t(s,c);qi=void 0;let h=Ji.length>p?Ji.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zi(e.issues):Li),e)):(h&&(h.issues=m.issues.length?zi(m.issues):Li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xi(){return Yi}function Zi(e,t){let n=e[Ii]?.backEdges;return n!==void 0&&Ri(t)&&n.has(t)}var Qi=()=>{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(Xe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Oe(e.values[0])}`:`Invalid option: expected one of ${ne(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`:``}: ${ne(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 $i(){return{localeError:Qi()}}var ea,ta=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 na(){return new ta}(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=na());var ra=globalThis.__zod_globalRegistry;function ia(e){return e.checks&&=[...e.checks],e}function aa(e,t){return new e(ia({type:`string`,...x(t)}))}function oa(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function sa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function la(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function pa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function ma(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function ha(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function ga(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function _a(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function ba(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function xa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Sa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ca(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function wa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Ta(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ea(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Da(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ka(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Aa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ja(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function Ma(e,t){return new e(ia({type:`number`,checks:[],...x(t)}))}function Na(e,t){return new e(ia({type:`number`,coerce:!0,checks:[],...x(t)}))}function Pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Fa(e,t){return new e({type:`boolean`,...x(t)})}function Ia(e,t){return new e({type:`undefined`,...x(t)})}function La(e,t){return new e({type:`null`,...x(t)})}function Ra(e){return new e({type:`any`})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...x(t)})}function Va(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!1})}function Ha(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ua(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Wa(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ga(e,t){return new In({check:`multiple_of`,...x(t),value:e})}function Ka(e,t){return new Rn({check:`max_length`,...x(t),maximum:e})}function qa(e,t){return new zn({check:`min_length`,...x(t),minimum:e})}function Ja(e,t){return new Bn({check:`length_equals`,...x(t),length:e})}function Ya(e,t){return new Hn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Xa(e){return new Un({check:`string_format`,format:`lowercase`,...x(e)})}function Za(e){return new Wn({check:`string_format`,format:`uppercase`,...x(e)})}function Qa(e,t){return new Gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function $a(e,t){return new Kn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function eo(e,t){return new qn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function to(e){return new Jn({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ye(e))}function so(e,t,n){return new e({type:`array`,element:t,...x(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ze(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(Ze(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new jn({check:`custom`,...x(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&de(e,t,n[t]);return e}function po(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??ra,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 mo(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 ho(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,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(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 go(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function _o(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}/${go(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+go(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>\n\nSet 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);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(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;vo(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 yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.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]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}de(n,r,e.length===1?e[0]:So(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=xo(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 Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.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=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(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)):fo(i,s),fo(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())vo(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)??[])Co(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)}fo(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,de(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:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(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 To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(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 To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},w=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ko=(e,t)=>{w(e,`minimum`,t),Oo(e,`maximum`,t)},Ao=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},jo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},No=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Po=(e,t)=>w(e,`minimum`,t.minimum),Fo=(e,t)=>Oo(e,`maximum`,t.maximum),Io=e=>(t,n)=>{No(t,n.format);let[r,i]=e[n.format];w(t,`minimum`,r),Oo(t,`maximum`,i)},Lo={greater_than:(e,t)=>w(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ao(e,t.value),number_format:Io(Ae),bigint_format:Io(je),min_length:Po,max_length:Fo,length_equals:(e,t)=>ko(e,t.length),min_size:Po,max_size:Fo,size_equals:(e,t)=>ko(e,t.size),string_format:(e,t)=>{No(e,t.format),t.pattern&&jo(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)=>Mo(e,t.mime)};function Ro(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ao(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Mo(t,i.mime);for(let e of i.patterns??[])jo(t,e);return t}var zo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Bo=new Map([[Nr,pn],[Fr,mn]]),Vo=e=>Bo.get(e)??e,Ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ro(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zo[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(Vo);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}))])}},Uo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ro(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Wo=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{mo(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{mo(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{mo(e,t,n,r,`Void cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{n.not={}},Zo=(e,t,n,r)=>{},Qo=(e,t,n,r)=>{},$o=(e,t,n,r)=>{mo(e,t,n,r,`Date cannot be represented in JSON Schema`)},es=(e,t,n,r)=>{let i=e._zod.def,a=te(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ts=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(mo(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(mo(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ns=(e,t,n,r)=>{mo(e,t,n,r,`NaN cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},is=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Ro(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},as=(e,t,n,r)=>{n.type=`boolean`},os=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ss=(e,t,n,r)=>{mo(e,t,n,r,`Function types cannot be represented in JSON Schema`)},cs=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ls=(e,t,n,r)=>{mo(e,t,n,r,`Map cannot be represented in JSON Schema`)},us=(e,t,n,r)=>{mo(e,t,n,r,`Set cannot be represented in JSON Schema`)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ro(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function fs(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fs(t.out):t.type===`catch`?fs(t.innerType):e._zod.optin}var ps=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)de(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fs(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ms=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},hs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(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)},gs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ho(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ho(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?fs(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Ro(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function _s(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_s(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_s(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Tn:wn).source),p):p}var vs=new WeakMap;function ys(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of vs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_s(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var bs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ro(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ho(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)de(i.patternProperties,Vo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ho(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=vs.get(t);n||(n=[],vs.set(t,n),t.deferred.push(()=>ys(t))),n.push(e)}i.additionalProperties=ho(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fs(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},xs=(e,t,n,r)=>{let i=e._zod.def,a=ho(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`}]},Ss=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cs=Symbol();function ws(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Cs):JSON.parse(o)}var Ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n.default=o)},Es=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n._prefault=o)},Ds=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Os=(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;ho(o,t,r);let s=t.seen.get(e);s.ref=o},ks=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},As=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},js=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ms=(e,t,n,r)=>{let i=e._zod.innerType;ho(i,t,r);let a=t.seen.get(e);a.ref=i},Ns={string:Ho,number:Uo,boolean:Wo,bigint:Go,symbol:Ko,null:qo,undefined:Jo,void:Yo,never:Xo,any:Zo,unknown:Qo,date:$o,enum:es,literal:ts,nan:ns,template_literal:rs,file:is,success:as,custom:os,function:ss,transform:cs,map:ls,set:us,array:ds,object:ps,union:ms,intersection:hs,tuple:gs,record:bs,nullable:xs,nonoptional:Ss,default:Ts,prefault:Es,catch:Ds,pipe:Os,readonly:ks,promise:As,optional:js,lazy:Ms};function Ps(e,t){if(`_idmap`in e){let n=e,r=po({...t,processors:Ns}),i={};for(let e of n._idmap.entries()){let[t,n]=e;ho(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;_o(r,n),de(a,t,wo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=po({...t,processors:Ns});return ho(e,n),_o(n,e),wo(n,e)}var Fs=new WeakSet([Object.prototype,Error.prototype]);function Is(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 Ls=C(`ZodError`,(e,t)=>{Et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Fs.has(n)||(Fs.add(n),Is(n,`format`,e=>t=>kt(e,t)),Is(n,`flatten`,e=>t=>Ot(e,t)),Is(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,re,2)}),Is(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,re,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Rs=jt(Ls),zs=Mt(Ls),Bs=Nt(Ls),Vs=Ft(Ls),Hs=Vt(Ls),Us=Ht(Ls),Ws=Ut(Ls),Gs=Wt(Ls),Ks=Gt(Ls),qs=Kt(Ls),Js=qt(Ls),Ys=Jt(Ls);function Xs(){vt.localeError||yt($i())}function Zs(){vt.memoizer||yt({memoizer:Xi()})}var Qs=C(`ZodType`,(e,t)=>(Xs(),Zn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_e(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 De(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yl(e,t))},superRefine(e,t){return this.check(bl(e,t))},overwrite(e){return this.check(to(e))},optional(){return I(this)},exactOptional(){return el(this)},nullable(){return nl(this)},nullish(){return I(nl(this))},nonoptional(e){return cl(this,e)},array(){return k(this)},or(e){return M([this,e])},and(e){return Kc(this,e)},transform(e){return fl(this,Zc(e))},default(e){return il(this,e)},prefault(e){return ol(this,e)},catch(e){return ul(this,e)},pipe(e){return fl(this,e)},readonly(){return hl(this)},describe(e){let t=this.clone();return ra.add(t,{description:e}),t},meta(...e){if(e.length===0)return ra.get(this);let t=this.clone();return ra.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 et(this,`~standard`,{...er(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){$e(this,`~standard`,e)},parse:function e(t,n){return Rs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},safeParse(e,t){return Bs(this,e,t)},async safeParseAsync(e,t){return Vs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$e(this,`spa`,e)},validate(e,t){return Rt(this,e,t)},validateAsync(e,t){return Bt(this,e,t)},encode:function e(t,n){return Hs(this,t,n,{callee:e})},decode:function e(t,n){return Us(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Gs(this,t,n,{callee:e})},safeEncode(e,t){return Ks(this,e,t)},safeDecode(e,t){return qs(this,e,t)},async safeEncodeAsync(e,t){return Js(this,e,t)},async safeDecodeAsync(e,t){return Ys(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return ra.get(this)?.description},get _def(){return this._zod.def}}),$s=C(`_ZodString`,(e,t)=>{tr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)},tt({format:e=>Ro(e).format??null,minLength:e=>Ro(e).minimum??null,maxLength:e=>Ro(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ec=C(`ZodString`,(e,t)=>{tr.init(e,t),$s.init(e,t)},{email(e){return this.check(oa(oc,e))},url(e){return this.check(fa(uc,e))},jwt(e){return this.check(Da(Ec,e))},emoji(e){return this.check(pa(fc,e))},guid(e){return this.check(sa(cc,e))},uuid(e){return this.check(ca(lc,e))},uuidv4(e){return this.check(la(lc,e))},uuidv6(e){return this.check(ua(lc,e))},uuidv7(e){return this.check(da(lc,e))},nanoid(e){return this.check(ma(pc,e))},cuid(e){return this.check(ha(mc,e))},cuid2(e){return this.check(ga(hc,e))},ulid(e){return this.check(_a(gc,e))},base64(e){return this.check(wa(Cc,e))},base64url(e){return this.check(Ta(wc,e))},xid(e){return this.check(va(_c,e))},ksuid(e){return this.check(ya(vc,e))},ipv4(e){return this.check(ba(yc,e))},ipv6(e){return this.check(xa(bc,e))},cidrv4(e){return this.check(Sa(xc,e))},cidrv6(e){return this.check(Ca(Sc,e))},e164(e){return this.check(Ea(Tc,e))},datetime(e){return this.check(Oa(nc,e))},date(e){return this.check(ka(rc,e))},time(e){return this.check(Aa(ic,e))},duration(e){return this.check(ja(ac,e))}});function T(e){return aa(ec,e)}var tc=C(`ZodStringFormat`,(e,t)=>{nr.init(e,t),$s.init(e,t)}),nc=C(`ZodISODateTime`,(e,t)=>{xr.init(e,t),tc.init(e,t)}),rc=C(`ZodISODate`,(e,t)=>{Sr.init(e,t),tc.init(e,t)}),ic=C(`ZodISOTime`,(e,t)=>{Cr.init(e,t),tc.init(e,t)}),ac=C(`ZodISODuration`,(e,t)=>{wr.init(e,t),tc.init(e,t)}),oc=C(`ZodEmail`,(e,t)=>{ar.init(e,t),tc.init(e,t)});function sc(e){return oa(oc,e)}var cc=C(`ZodGUID`,(e,t)=>{rr.init(e,t),tc.init(e,t)}),lc=C(`ZodUUID`,(e,t)=>{ir.init(e,t),tc.init(e,t)}),uc=C(`ZodURL`,(e,t)=>{pr.init(e,t),tc.init(e,t)});function dc(e){return fa(uc,e)}var fc=C(`ZodEmoji`,(e,t)=>{mr.init(e,t),tc.init(e,t)}),pc=C(`ZodNanoID`,(e,t)=>{hr.init(e,t),tc.init(e,t)}),mc=C(`ZodCUID`,(e,t)=>{gr.init(e,t),tc.init(e,t)}),hc=C(`ZodCUID2`,(e,t)=>{_r.init(e,t),tc.init(e,t)}),gc=C(`ZodULID`,(e,t)=>{vr.init(e,t),tc.init(e,t)}),_c=C(`ZodXID`,(e,t)=>{yr.init(e,t),tc.init(e,t)}),vc=C(`ZodKSUID`,(e,t)=>{br.init(e,t),tc.init(e,t)}),yc=C(`ZodIPv4`,(e,t)=>{Tr.init(e,t),tc.init(e,t)}),bc=C(`ZodIPv6`,(e,t)=>{Or.init(e,t),tc.init(e,t)}),xc=C(`ZodCIDRv4`,(e,t)=>{kr.init(e,t),tc.init(e,t)}),Sc=C(`ZodCIDRv6`,(e,t)=>{jr.init(e,t),tc.init(e,t)}),Cc=C(`ZodBase64`,(e,t)=>{Pr.init(e,t),tc.init(e,t)}),wc=C(`ZodBase64URL`,(e,t)=>{Lr.init(e,t),tc.init(e,t)}),Tc=C(`ZodE164`,(e,t)=>{Rr.init(e,t),tc.init(e,t)}),Ec=C(`ZodJWT`,(e,t)=>{Br.init(e,t),tc.init(e,t)}),Dc=C(`ZodNumber`,(e,t)=>{Vr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.isFinite=!0},tt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ro(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ro(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ro(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ro(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(kc(e))},safe(e){return this.check(kc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function E(e){return Ma(Dc,e)}var Oc=C(`ZodNumberFormat`,(e,t)=>{Hr.init(e,t),Dc.init(e,t)});function kc(e){return Pa(Oc,e)}var Ac=C(`ZodBoolean`,(e,t)=>{Ur.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function D(e){return Fa(Ac,e)}var jc=C(`ZodUndefined`,(e,t)=>{Wr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Mc(e){return Ia(jc,e)}var Nc=C(`ZodNull`,(e,t)=>{Gr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Pc(e){return La(Nc,e)}var Fc=C(`ZodAny`,(e,t)=>{Kr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ic(){return Ra(Fc)}var Lc=C(`ZodUnknown`,(e,t)=>{qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function O(){return za(Lc)}var Rc=C(`ZodNever`,(e,t)=>{Jr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r)});function zc(e){return Ba(Rc,e)}var Bc=C(`ZodArray`,(e,t)=>{Zs(),Qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function k(e,t){return so(Bc,e,t)}var Vc=C(`ZodObject`,(e,t)=>{Zs(),ii.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),ct(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return P(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_e(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_e(this._zod.def,{catchall:O()}))},loose(){return this.clone(_e(this._zod.def,{catchall:O()}))},strict(){return this.clone(_e(this._zod.def,{catchall:zc()}))},strip(){return this.clone(_e(this._zod.def,{catchall:void 0}))},extend(e){return Pe(this,e)},safeExtend(e){return Ie(this,e)},merge(e){return Le(this,e)},pick(e){return Me(this,e)},omit(e){return S(this,e)},partial(...e){return Re(Qc,this,e[0])},exactPartial(...e){return Re($c,this,e[0],`exactPartial`)},required(...e){return ze(sl,this,e[0])}});function A(e,t){return new Vc({type:`object`,shape:e??{},...x(t)})}function j(e,t){return new Vc({type:`object`,shape:e,catchall:O(),...x(t)})}var Hc=C(`ZodUnion`,(e,t)=>{oi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.options=t.options});function M(e,t){return new Hc({type:`union`,options:e,...x(t)})}var Uc=C(`ZodDiscriminatedUnion`,(e,t)=>{Hc.init(e,t),ci.init(e,t)});function Wc(e,t,n){return new Uc({type:`union`,options:t,discriminator:e,...x(n)})}var Gc=C(`ZodIntersection`,(e,t)=>{li.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function Kc(e,t){return new Gc({type:`intersection`,left:e,right:t})}var qc=C(`ZodRecord`,(e,t)=>{Zs(),fi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function N(e,t,n){return!t||!t._zod?new qc({type:`record`,keyType:T(),valueType:e,...x(t)}):new qc({type:`record`,keyType:e,valueType:t,...x(n)})}var Jc=C(`ZodEnum`,(e,t)=>{pi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})}});function P(e,t){return new Jc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Yc=C(`ZodLiteral`,(e,t)=>{mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Yc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Xc=C(`ZodTransform`,(e,t)=>{Zs(),hi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ze(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(Ze(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zc(e){return new Xc({type:`transform`,transform:e})}var Qc=C(`ZodOptional`,(e,t)=>{_i.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I(e){return new Qc({type:`optional`,innerType:e})}var $c=C(`ZodExactOptional`,(e,t)=>{vi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function el(e){return new $c({type:`optional`,innerType:e})}var tl=C(`ZodNullable`,(e,t)=>{yi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new tl({type:`nullable`,innerType:e})}var rl=C(`ZodDefault`,(e,t)=>{bi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function il(e,t){return new rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var al=C(`ZodPrefault`,(e,t)=>{Si.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ol(e,t){return new al({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var sl=C(`ZodNonOptional`,(e,t)=>{Ci.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cl(e,t){return new sl({type:`nonoptional`,innerType:e,...x(t)})}var ll=C(`ZodCatch`,(e,t)=>{Ei.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ul(e,t){return new ll({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ut(t)})}var dl=C(`ZodPipe`,(e,t)=>{Di.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r),e.in=t.in,e.out=t.out});function fl(e,t){return new dl({type:`pipe`,in:e,out:t})}var pl=C(`ZodPreprocess`,(e,t)=>{dl.init(e,t),ki.init(e,t)}),ml=C(`ZodReadonly`,(e,t)=>{Ai.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ks(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hl(e){return new ml({type:`readonly`,innerType:e})}var gl=C(`ZodLazy`,(e,t)=>{Mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _l(e){return new gl({type:`lazy`,getter:e})}var vl=C(`ZodCustom`,(e,t)=>{Ni.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r)});function yl(e,t={}){return co(vl,e,t)}function bl(e,t){return lo(e,t)}function xl(e,t){return new pl({type:`pipe`,in:Zc(e),out:t})}var Sl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Cl;Cl||={};function wl(e){return Oa(nc,e)}function Tl(e){return ka(rc,e)}function El(e){return Na(Dc,e)}var Dl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Ol=`io.modelcontextprotocol/related-task`,kl=`io.modelcontextprotocol/protocolVersion`,Al=`io.modelcontextprotocol/clientInfo`,jl=`io.modelcontextprotocol/serverInfo`,Ml=`io.modelcontextprotocol/clientCapabilities`,Nl=`io.modelcontextprotocol/subscriptionId`,Pl=`io.modelcontextprotocol/logLevel`,Fl=_l(()=>M([T(),E(),D(),Pc(),N(T(),Fl),k(Fl)])),Il=N(T(),Fl),Ll=k(Fl),Rl=M([T(),E().int()]),zl=T(),Bl=A({ttl:E().optional()}),Vl=A({taskId:T()}),Hl=j({progressToken:Rl.optional(),[Ol]:Vl.optional()}),Ul=A({_meta:Hl.optional()}),Wl=Ul.extend({task:Bl.optional()}),Gl=A({method:T(),params:Ul.loose().optional()}),Kl=A({_meta:Hl.optional()}),ql=A({method:T(),params:Kl.loose().optional()}),Jl=j({get[jl](){return cu.optional().catch(void 0)}}),L=j({_meta:Jl.optional()}),Yl=M([T(),E().int()]),Xl=A({jsonrpc:F(`2.0`),id:Yl,...Gl.shape}).strict(),Zl=A({jsonrpc:F(`2.0`),...ql.shape}).strict(),Ql=A({jsonrpc:F(`2.0`),id:Yl,result:L}).strict(),$l=A({jsonrpc:F(`2.0`),id:Yl.optional(),error:A({code:E().int(),message:T(),data:O().optional()})}).strict(),eu=M([Xl,Zl,Ql,$l]),tu=M([Ql,$l]),nu=L.strict(),ru=Kl.extend({requestId:Yl.optional(),reason:T().optional()}),iu=ql.extend({method:F(`notifications/cancelled`),params:ru}),au=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),ou=A({icons:k(au).optional()}),su=A({name:T(),title:T().optional()}),cu=su.extend({...su.shape,...ou.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),lu=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),Il).optional(),url:Il.optional()}),Il.optional())),uu=j({list:Il.optional(),cancel:Il.optional(),requests:j({sampling:j({createMessage:Il.optional()}).optional(),elicitation:j({create:Il.optional()}).optional()}).optional()}),du=j({list:Il.optional(),cancel:Il.optional(),requests:j({tools:j({call:Il.optional()}).optional()}).optional()}),fu=A({experimental:N(T(),Il).optional(),sampling:A({context:Il.optional(),tools:Il.optional()}).optional(),elicitation:lu.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:uu.optional(),extensions:N(T(),Il).optional()}),pu=Ul.extend({protocolVersion:T(),capabilities:fu,clientInfo:cu}),mu=Gl.extend({method:F(`initialize`),params:pu}),hu=A({experimental:N(T(),Il).optional(),logging:Il.optional(),completions:Il.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:du.optional(),extensions:N(T(),Il).optional()}),gu=L.extend({protocolVersion:T(),capabilities:hu,serverInfo:cu,instructions:T().optional()}),_u=ql.extend({method:F(`notifications/initialized`),params:Kl.optional()}),vu=Gl.extend({method:F(`server/discover`),params:Ul.optional()}),yu=L.extend({supportedVersions:k(T()),capabilities:hu,instructions:T().optional()}),bu=Gl.extend({method:F(`ping`),params:Ul.optional()}),xu=A({progress:E(),total:I(E()),message:I(T())}),Su=A({...Kl.shape,...xu.shape,progressToken:Rl}),Cu=ql.extend({method:F(`notifications/progress`),params:Su}),wu=Ul.extend({cursor:zl.optional()}),Tu=Gl.extend({params:wu.optional()}),Eu=L.extend({nextCursor:zl.optional()}),Du=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),Ou=Du.extend({text:T()}),ku=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Au=Du.extend({blob:ku}),ju=P([`user`,`assistant`]),Mu=A({audience:k(ju).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Nu=A({...su.shape,...ou.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:Mu.optional(),_meta:I(j({}))}),Pu=A({...su.shape,...ou.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:Mu.optional(),_meta:I(j({}))}),Fu=Tu.extend({method:F(`resources/list`)}),Iu=Eu.extend({resources:k(Nu)}),Lu=Tu.extend({method:F(`resources/templates/list`)}),Ru=Eu.extend({resourceTemplates:k(Pu)}),zu=Ul.extend({uri:T()}),Bu=zu,Vu=Gl.extend({method:F(`resources/read`),params:Bu}),Hu=L.extend({contents:k(M([Ou,Au]))}),Uu=ql.extend({method:F(`notifications/resources/list_changed`),params:Kl.optional()}),Wu=zu,Gu=Gl.extend({method:F(`resources/subscribe`),params:Wu}),Ku=zu,qu=Gl.extend({method:F(`resources/unsubscribe`),params:Ku}),Ju=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yu=Ul.extend({notifications:Ju}),Xu=Gl.extend({method:F(`subscriptions/listen`),params:Yu}),Zu=Kl.extend({notifications:Ju}),Qu=ql.extend({method:F(`notifications/subscriptions/acknowledged`),params:Zu}),$u=Jl.extend({[Nl]:Yl}),ed=L.extend({_meta:$u}),td=Kl.extend({uri:T()}),nd=ql.extend({method:F(`notifications/resources/updated`),params:td}),rd=A({name:T(),description:I(T()),required:I(D())}),id=A({...su.shape,...ou.shape,description:I(T()),arguments:I(k(rd)),_meta:I(j({}))}),ad=Tu.extend({method:F(`prompts/list`)}),od=Eu.extend({prompts:k(id)}),sd=Ul.extend({name:T(),arguments:N(T(),T()).optional()}),cd=Gl.extend({method:F(`prompts/get`),params:sd}),ld=A({type:F(`text`),text:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),ud=A({type:F(`image`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),dd=A({type:F(`audio`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),fd=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),pd=A({type:F(`resource`),resource:M([Ou,Au]),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),md=Nu.extend({type:F(`resource_link`)}),hd=M([ld,ud,dd,md,pd]),gd=A({role:ju,content:hd}),_d=L.extend({description:T().optional(),messages:k(gd)}),vd=ql.extend({method:F(`notifications/prompts/list_changed`),params:Kl.optional()}),yd=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),bd=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),xd=A({...su.shape,...ou.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),Fl).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:j({$schema:T().optional()}).optional(),annotations:yd.optional(),execution:bd.optional(),_meta:N(T(),O()).optional()}),Sd=Tu.extend({method:F(`tools/list`)}),Cd=Eu.extend({tools:k(xd)}),wd=L.extend({content:k(hd).default([]),structuredContent:O().optional(),isError:D().optional()}),Td=wd.or(L.extend({toolResult:O()})),Ed=Wl.extend({name:T(),arguments:N(T(),O()).optional()}),Dd=Gl.extend({method:F(`tools/call`),params:Ed}),Od=ql.extend({method:F(`notifications/tools/list_changed`),params:Kl.optional()}),kd=A({autoRefresh:D().default(!0),debounceMs:E().int().nonnegative().default(300)}),Ad=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jd=Ul.extend({level:Ad}),Md=Gl.extend({method:F(`logging/setLevel`),params:jd}),Nd=Kl.extend({level:Ad,logger:T().optional(),data:O()}),Pd=ql.extend({method:F(`notifications/message`),params:Nd}),Fd=A({name:T().optional()}),Id=A({hints:k(Fd).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Ld=A({mode:P([`auto`,`required`,`none`]).optional()}),Rd=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(hd),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),zd=Wc(`type`,[ld,ud,dd]),Bd=Wc(`type`,[ld,ud,dd,fd,Rd]),Vd=A({role:ju,content:M([Bd,k(Bd)]),_meta:N(T(),O()).optional()}),Hd=Wl.extend({messages:k(Vd),modelPreferences:Id.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:Il.optional(),tools:k(xd).optional(),toolChoice:Ld.optional()}),Ud=Gl.extend({method:F(`sampling/createMessage`),params:Hd}),Wd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:ju,content:zd}),Gd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:ju,content:M([Bd,k(Bd)])}),Kd=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),qd=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Jd=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Yd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Xd=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Zd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Qd=M([Yd,Xd]),$d=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ef=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),tf=M([$d,ef]),nf=M([Zd,Qd,tf]),rf=M([nf,Kd,qd,Jd]),af=Wl.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),rf),required:k(T()).optional()}).catchall(O())}),of=Wl.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),sf=M([af,of]),cf=Gl.extend({method:F(`elicitation/create`),params:sf}),lf=Kl.extend({elicitationId:T()}),uf=ql.extend({method:F(`notifications/elicitation/complete`),params:lf}),df=L.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),ff=A({type:F(`ref/resource`),uri:T()}),pf=A({type:F(`ref/prompt`),name:T()}),mf=Ul.extend({ref:M([pf,ff]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),hf=Gl.extend({method:F(`completion/complete`),params:mf}),gf=L.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),_f=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),vf=Gl.extend({method:F(`roots/list`),params:Ul.optional()}),yf=L.extend({roots:k(_f)}),bf=ql.extend({method:F(`notifications/roots/list_changed`),params:Kl.optional()}),xf=j({ttl:E().optional(),pollInterval:E().optional()}),Sf=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Cf=A({taskId:T(),status:Sf,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),wf=L.extend({task:Cf}),Tf=Kl.merge(Cf),Ef=ql.extend({method:F(`notifications/tasks/status`),params:Tf}),Df=Gl.extend({method:F(`tasks/get`),params:Ul.extend({taskId:T()})}),Of=L.merge(Cf),kf=Gl.extend({method:F(`tasks/result`),params:Ul.extend({taskId:T()})}),Af=L.loose(),jf=Tu.extend({method:F(`tasks/list`)}),Mf=Eu.extend({tasks:k(Cf)}),Nf=Gl.extend({method:F(`tasks/cancel`),params:Ul.extend({taskId:T()})}),Pf=L.merge(Cf),Ff=M([bu,mu,vu,hf,Md,cd,ad,Fu,Lu,Vu,Gu,qu,Xu,Dd,Sd]),If=M([iu,Cu,_u,bf]),Lf=M([nu,Wd,Gd,df,yf]),Rf=M([bu,Ud,cf,vf]),zf=M([iu,Cu,Pd,nd,Uu,Od,vd,Qu,uf]),Bf=M([nu,gu,yu,gf,_d,od,Iu,Ru,Hu,wd,Cd,ed]),Vf=dc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Sl.custom,message:`URL must be parseable`,fatal:!0}),ft}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Hf=j({resource:T().url(),authorization_servers:k(Vf).optional(),jwks_uri:T().url().optional(),scopes_supported:k(T()).optional(),bearer_methods_supported:k(T()).optional(),resource_signing_alg_values_supported:k(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:D().optional(),authorization_details_types_supported:k(T()).optional(),dpop_signing_alg_values_supported:k(T()).optional(),dpop_bound_access_tokens_required:D().optional()}),Uf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),service_documentation:Vf.optional(),revocation_endpoint:Vf.optional(),revocation_endpoint_auth_methods_supported:k(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:k(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:k(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:k(T()).optional(),code_challenge_methods_supported:k(T()).optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0),dpop_signing_alg_values_supported:k(T()).optional()}),Wf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,userinfo_endpoint:Vf.optional(),jwks_uri:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),acr_values_supported:k(T()).optional(),subject_types_supported:k(T()),id_token_signing_alg_values_supported:k(T()),id_token_encryption_alg_values_supported:k(T()).optional(),id_token_encryption_enc_values_supported:k(T()).optional(),userinfo_signing_alg_values_supported:k(T()).optional(),userinfo_encryption_alg_values_supported:k(T()).optional(),userinfo_encryption_enc_values_supported:k(T()).optional(),request_object_signing_alg_values_supported:k(T()).optional(),request_object_encryption_alg_values_supported:k(T()).optional(),request_object_encryption_enc_values_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),display_values_supported:k(T()).optional(),claim_types_supported:k(T()).optional(),claims_supported:k(T()).optional(),service_documentation:T().optional(),claims_locales_supported:k(T()).optional(),ui_locales_supported:k(T()).optional(),claims_parameter_supported:D().optional(),request_parameter_supported:D().optional(),request_uri_parameter_supported:D().optional(),require_request_uri_registration:D().optional(),op_policy_uri:Vf.optional(),op_tos_uri:Vf.optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0)}),Gf=A({...Wf.shape,...Uf.pick({code_challenge_methods_supported:!0}).shape}),Kf=A({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:El().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),qf=A({issued_token_type:F(`urn:ietf:params:oauth:token-type:id-jag`),access_token:T(),token_type:T().optional(),expires_in:E().optional(),scope:T().optional()}).strip(),Jf=A({error:T(),error_description:T().optional(),error_uri:T().optional()}),Yf=Vf.optional().or(F(``).transform(()=>void 0)),Xf=A({redirect_uris:k(Vf),token_endpoint_auth_method:T().optional(),grant_types:k(T()).optional(),response_types:k(T()).optional(),application_type:T().optional(),client_name:T().optional(),client_uri:Vf.optional(),logo_uri:Yf,scope:T().optional(),contacts:k(T()).optional(),tos_uri:Yf,policy_uri:T().optional(),jwks_uri:Vf.optional(),jwks:Ic().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),Zf=A({client_id:T(),client_secret:T().optional(),client_id_issued_at:E().optional(),client_secret_expires_at:E().optional(),issuer:T().optional().catch(void 0)}).strip(),Qf=Xf.merge(Zf),$f=A({error:T(),error_description:T().optional()}).strip(),ep=A({token:T(),token_type_hint:T().optional()}).strip(),tp=Symbol.for(`mcp.sdk.errorBrands`);function np(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,tp,{value:n,enumerable:!1,configurable:!0})}function rp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,tp)){let n=t[tp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,np(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var R=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),z=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,np(this,new.target)}},ip=class extends z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},ap=`2026-07-28`,op=[ap];function sp(e){return e>=ap}function cp(e){return e.filter(e=>!sp(e))}function lp(e){return e.filter(e=>sp(e))}function up(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var dp=[`task`,`inputRequests`,`requestState`];function fp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||dp.some(t=>t in e)?e:{...e,content:[]}}function pp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=A({ttl:E().optional()}),a=A({taskId:T()}),o=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:T(),params:s.loose().optional()}),u=A({_meta:o.optional()}),d=A({method:T(),params:u.loose().optional()}),f=j({_meta:o.optional()}),p=M([T(),E().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:T().optional()}),g=d.extend({method:F(`notifications/cancelled`),params:h}),_=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),v=A({icons:k(_).optional()}),y=A({name:T(),title:T().optional()}),ee=y.extend({...y.shape,...v.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),te=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),re=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ie=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ne.optional(),extensions:N(T(),t).optional()}),ae=s.extend({protocolVersion:T(),capabilities:ie,clientInfo:ee}),oe=l.extend({method:F(`initialize`),params:ae}),se=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:re.optional(),extensions:N(T(),t).optional()}),ce=f.extend({protocolVersion:T(),capabilities:se,serverInfo:ee,instructions:T().optional()}),le=d.extend({method:F(`notifications/initialized`),params:u.optional()}),ue=l.extend({method:F(`ping`),params:s.optional()}),de=A({progress:E(),total:I(E()),message:I(T())}),fe=A({...u.shape,...de.shape,progressToken:n}),pe=d.extend({method:F(`notifications/progress`),params:fe}),b=s.extend({cursor:r.optional()}),me=l.extend({params:b.optional()}),he=f.extend({nextCursor:r.optional()}),ge=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),_e=ge.extend({text:T()}),ve=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=ge.extend({blob:ve}),be=P([`user`,`assistant`]),xe=A({audience:k(be).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Se=A({...y.shape,...v.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:xe.optional(),_meta:I(j({}))}),Ce=A({...y.shape,...v.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:xe.optional(),_meta:I(j({}))}),we=me.extend({method:F(`resources/list`)}),Te=he.extend({resources:k(Se)}),Ee=me.extend({method:F(`resources/templates/list`)}),De=he.extend({resourceTemplates:k(Ce)}),x=s.extend({uri:T()}),Oe=x,ke=l.extend({method:F(`resources/read`),params:Oe}),Ae=f.extend({contents:k(M([_e,ye]))}),je=d.extend({method:F(`notifications/resources/list_changed`),params:u.optional()}),Me=x,Ne=l.extend({method:F(`resources/subscribe`),params:Me}),S=x,Pe=l.extend({method:F(`resources/unsubscribe`),params:S}),Fe=u.extend({uri:T()}),Ie=d.extend({method:F(`notifications/resources/updated`),params:Fe}),Le=A({name:T(),description:I(T()),required:I(D())}),Re=A({...y.shape,...v.shape,description:I(T()),arguments:I(k(Le)),_meta:I(j({}))}),ze=me.extend({method:F(`prompts/list`)}),Be=he.extend({prompts:k(Re)}),Ve=s.extend({name:T(),arguments:N(T(),T()).optional()}),He=l.extend({method:F(`prompts/get`),params:Ve}),Ue=A({type:F(`text`),text:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),We=A({type:F(`image`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ge=A({type:F(`audio`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ke=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),qe=A({type:F(`resource`),resource:M([_e,ye]),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Je=Se.extend({type:F(`resource_link`)}),Ye=M([Ue,We,Ge,Je,qe]),Xe=A({role:be,content:Ye}),Ze=f.extend({description:T().optional(),messages:k(Xe)}),Qe=d.extend({method:F(`notifications/prompts/list_changed`),params:u.optional()}),$e=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),et=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),tt=A({...y.shape,...v.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:N(T(),O()).optional()}),nt=me.extend({method:F(`tools/list`)}),rt=he.extend({tools:k(tt)}),it=f.extend({content:k(Ye),structuredContent:N(T(),O()).optional(),isError:D().optional()}),at=c.extend({name:T(),arguments:N(T(),O()).optional()}),ot=l.extend({method:F(`tools/call`),params:at}),st=d.extend({method:F(`notifications/tools/list_changed`),params:u.optional()}),ct=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),lt=s.extend({level:ct}),ut=l.extend({method:F(`logging/setLevel`),params:lt}),dt=u.extend({level:ct,logger:T().optional(),data:O()}),ft=d.extend({method:F(`notifications/message`),params:dt}),pt=A({name:T().optional()}),mt=A({hints:k(pt).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),ht=A({mode:P([`auto`,`required`,`none`]).optional()}),C=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(Ye),structuredContent:A({}).loose().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),gt=Wc(`type`,[Ue,We,Ge]),_t=Wc(`type`,[Ue,We,Ge,Ke,C]),vt=A({role:be,content:M([_t,k(_t)]),_meta:N(T(),O()).optional()}),yt=c.extend({messages:k(vt),modelPreferences:mt.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(tt).optional(),toolChoice:ht.optional()}),bt=l.extend({method:F(`sampling/createMessage`),params:yt}),xt=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:be,content:gt}),St=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:be,content:M([_t,k(_t)])}),Ct=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),wt=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Tt=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Et=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Dt=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ot=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),kt=M([Et,Dt]),At=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),jt=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Mt=M([At,jt]),Nt=M([Ot,kt,Mt]),Pt=M([Nt,Ct,wt,Tt]),Ft=c.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),Pt),required:k(T()).optional()}).catchall(O())}),It=c.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),Lt=M([Ft,It]),Rt=l.extend({method:F(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:T()}),Bt=d.extend({method:F(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),Ht=A({type:F(`ref/resource`),uri:T()}),Ut=A({type:F(`ref/prompt`),name:T()}),Wt=s.extend({ref:M([Ut,Ht]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),Gt=l.extend({method:F(`completion/complete`),params:Wt}),Kt=f.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),qt=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),Jt=l.extend({method:F(`roots/list`),params:s.optional()}),Yt=f.extend({roots:k(qt)}),Xt=d.extend({method:F(`notifications/roots/list_changed`),params:u.optional()}),Zt=j({ttl:E().optional(),pollInterval:E().optional()}),Qt=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=A({taskId:T(),status:Qt,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:F(`notifications/tasks/status`),params:tn}),rn=l.extend({method:F(`tasks/get`),params:s.extend({taskId:T()})}),an=f.merge($t),on=l.extend({method:F(`tasks/result`),params:s.extend({taskId:T()})}),sn=f.loose(),cn=me.extend({method:F(`tasks/list`)}),ln=he.extend({tasks:k($t)}),un=l.extend({method:F(`tasks/cancel`),params:s.extend({taskId:T()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,InitializeRequestParamsSchema:ae,InitializeRequestSchema:oe,ServerCapabilitiesSchema:se,InitializeResultSchema:ce,InitializedNotificationSchema:le,PingRequestSchema:ue,ProgressSchema:de,ProgressNotificationParamsSchema:fe,ProgressNotificationSchema:pe,PaginatedRequestParamsSchema:b,PaginatedRequestSchema:me,PaginatedResultSchema:he,ResourceContentsSchema:ge,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:be,AnnotationsSchema:xe,ResourceSchema:Se,ResourceTemplateSchema:Ce,ListResourcesRequestSchema:we,ListResourcesResultSchema:Te,ListResourceTemplatesRequestSchema:Ee,ListResourceTemplatesResultSchema:De,ResourceRequestParamsSchema:x,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:ke,ReadResourceResultSchema:Ae,ResourceListChangedNotificationSchema:je,SubscribeRequestParamsSchema:Me,SubscribeRequestSchema:Ne,UnsubscribeRequestParamsSchema:S,UnsubscribeRequestSchema:Pe,ResourceUpdatedNotificationParamsSchema:Fe,ResourceUpdatedNotificationSchema:Ie,PromptArgumentSchema:Le,PromptSchema:Re,ListPromptsRequestSchema:ze,ListPromptsResultSchema:Be,GetPromptRequestParamsSchema:Ve,GetPromptRequestSchema:He,TextContentSchema:Ue,ImageContentSchema:We,AudioContentSchema:Ge,ToolUseContentSchema:Ke,EmbeddedResourceSchema:qe,ResourceLinkSchema:Je,ContentBlockSchema:Ye,PromptMessageSchema:Xe,GetPromptResultSchema:Ze,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:at,CallToolRequestSchema:ot,ToolListChangedNotificationSchema:st,LoggingLevelSchema:ct,SetLevelRequestParamsSchema:lt,SetLevelRequestSchema:ut,LoggingMessageNotificationParamsSchema:dt,LoggingMessageNotificationSchema:ft,ModelHintSchema:pt,ModelPreferencesSchema:mt,ToolChoiceSchema:ht,ToolResultContentSchema:C,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:M([ue,oe,Gt,ut,He,ze,we,Ee,ke,Ne,Pe,ot,nt,rn,on,cn,un]),ClientNotificationSchema:M([g,pe,le,Xt,nn]),ClientResultSchema:M([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:M([ue,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:M([g,pe,ft,Ie,je,st,Qe,nn,Bt]),ServerResultSchema:M([m,ce,Kt,Ze,Be,Te,De,Ae,it,rt,an,ln,en]),CallToolResultWireSchema:O().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of dp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(fp).pipe(it)}}var mp;function hp(){return mp??=pp()}function gp(e){return e.type!==`object`}var _p=new Set([`const`,`enum`,`default`,`examples`]),vp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function yp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function bp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(yp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=y(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&yp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:_p.has(o)?i[o]=s:vp.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var xp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Sp={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Cp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},wp;function Tp(){if(wp)return wp;let e=hp();return wp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},wp}function Ep(e){return Object.prototype.hasOwnProperty.call(xp,e)}function Dp(e){return Object.prototype.hasOwnProperty.call(Sp,e)}function Op(e){return Object.prototype.hasOwnProperty.call(Cp,e)}function kp(e){return Op(e)?Tp().resultSchemas[e]:void 0}function Ap(e){return Ep(e)?Tp().requestSchemas[e]:void 0}function jp(e){return Dp(e)?Tp().notificationSchemas[e]:void 0}Object.keys(xp),Object.keys(Sp);function Mp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Np(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Pp={ok:!1,reason:`not-in-era`};function Fp(e){return Mp(e)&&Mp(e.outputSchema)&&gp(e.outputSchema)}function Ip(e){return e}var Lp={era:`2025-11-25`,hasRequestMethod:Ep,hasNotificationMethod:Dp,validateRequest:(e,t)=>Np(Ap(e),t),validateResult:(e,t)=>Np(kp(e),t),validateNotification:(e,t)=>Np(jp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pp,validateInputResponse:()=>Pp,samplingResultVariant:((e,t)=>{let n=hp();return Np(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=up(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&gp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Mp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ip(e)}}return{kind:`complete`,result:Ip(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Fp(e))?t:{...t,tools:n.map(e=>Fp(e)?{...e,outputSchema:bp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Rp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=M([T(),E().int()]),a=P([`user`,`assistant`]),o=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:E().optional()}),l=A({taskId:T()}),u=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=A({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=A({_meta:u.optional()}),m=A({method:T(),params:p.loose().optional()}),h=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),g=A({icons:k(h).optional()}),_=A({name:T(),title:T().optional()}),v=_.extend({..._.shape,...g.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),y=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ee=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),te=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ne=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ee.optional(),extensions:N(T(),t).optional()}),re=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:te.optional(),extensions:N(T(),t).optional()}),ie=A({progress:E(),total:I(E()),message:I(T())}),ae=A({...p.shape,...ie.shape,progressToken:n}),oe=m.extend({method:F(`notifications/progress`),params:ae}),se=p.extend({level:o,logger:T().optional(),data:O()}),ce=m.extend({method:F(`notifications/message`),params:se}),le=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),ue=le.extend({text:T()}),de=le.extend({blob:s}),fe=A({audience:k(a).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),pe=A({..._.shape,...g.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:fe.optional(),_meta:I(j({}))}),b=A({..._.shape,...g.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:fe.optional(),_meta:I(j({}))}),me=m.extend({method:F(`notifications/resources/list_changed`),params:p.optional()}),he=p.extend({uri:T()}),ge=m.extend({method:F(`notifications/resources/updated`),params:he}),_e=A({name:T(),description:I(T()),required:I(D())}),ve=A({..._.shape,...g.shape,description:I(T()),arguments:I(k(_e)),_meta:I(j({}))}),ye=m.extend({method:F(`notifications/prompts/list_changed`),params:p.optional()}),be=A({type:F(`text`),text:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),xe=A({type:F(`image`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Se=A({type:F(`audio`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Ce=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),we=A({type:F(`resource`),resource:M([ue,de]),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Te=pe.extend({type:F(`resource_link`)}),Ee=M([be,xe,Se,Te,we]),De=A({role:a,content:Ee}),x=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),Oe=m.extend({method:F(`notifications/tools/list_changed`),params:p.optional()}),ke=A({name:T().optional()}),Ae=A({hints:k(ke).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),je=A({mode:P([`auto`,`required`,`none`]).optional()}),Me=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),Ne=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),S=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Pe=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Fe=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ie=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Le=M([Pe,Fe]),Re=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ze=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Be=M([Re,ze]),Ve=M([Ie,Le,Be]),He=M([Ve,Me,Ne,S]),Ue=f.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),He),required:k(T()).optional()}).catchall(O())}),We=A({type:F(`ref/resource`),uri:T()}),Ge=A({type:F(`ref/prompt`),name:T()}),Ke=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),qe=ne.shape,Je=A({experimental:qe.experimental,sampling:qe.sampling,elicitation:qe.elicitation,roots:qe.roots,extensions:qe.extensions}),Ye=re.shape,Xe=A({experimental:Ye.experimental,logging:Ye.logging,completions:Ye.completions,prompts:Ye.prompts,resources:Ye.resources,tools:Ye.tools,extensions:Ye.extensions}),Ze=j({progressToken:n.optional(),[kl]:T(),[Al]:v.optional(),[Ml]:Je,[Pl]:o.optional()}),Qe=A({..._.shape,...g.shape,description:T().optional(),inputSchema:j({$schema:T().optional(),type:F(`object`)}),outputSchema:j({$schema:T().optional()}).optional(),annotations:x.optional(),_meta:N(T(),O()).optional()}),$e=A({type:F(`tool_result`),toolUseId:T(),content:k(Ee),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),et=M([be,xe,Se,Ce,$e]),tt=A({role:a,content:M([et,k(et)]),_meta:N(T(),O()).optional()}),nt=T(),rt=j({[jl]:v.optional().catch(void 0)}),it=rt.optional();function at(e){return j({_meta:it,resultType:nt.default(`complete`),...e})}let ot=at({}),st=at({nextCursor:r.optional()}),ct=at({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),lt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),ut=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),dt=at({description:T().optional(),messages:k(De)}),ft=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),pt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),mt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),ht=at({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),C=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`])}),gt=at({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),_t=A({messages:k(tt),modelPreferences:Ae.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(Qe).optional(),toolChoice:je.optional()}),vt=A({method:F(`sampling/createMessage`),params:_t}),yt=A({method:F(`roots/list`),params:A({_meta:N(T(),O()).optional()}).optional()}),bt=A({...tt.shape,model:T(),stopReason:T().optional()}),xt=A({roots:k(Ke)}),St=A({action:P([`accept`,`decline`,`cancel`]),content:N(T(),M([T(),E(),D(),k(T())])).optional()}),Ct=A({mode:F(`url`),message:T(),url:T().url()}),wt=M([Ue,Ct]),Tt=A({method:F(`elicitation/create`),params:wt}),Et=M([vt,yt,Tt]),Dt=M([bt,xt,St]),Ot=N(T(),Et),kt=N(T(),Dt),At=at({inputRequests:Ot.optional(),requestState:T().optional()}),jt={inputResponses:kt.optional(),requestState:T().optional()},Mt=A({_meta:Ze,...jt}),Nt=j({progressToken:n.optional()});function Pt(e,t){return A({method:F(e),params:A({_meta:Ze,...t})})}function Ft(e,t){return A({method:F(e),params:A({_meta:Nt.optional(),...t}).optional()})}let It={name:T(),arguments:N(T(),O()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:T(),arguments:N(T(),T()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:T(),...jt}),Gt={ref:M([Ge,We]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=j({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:T(),arguments:N(T(),T()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:T()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return j({_meta:it,...e})}let tn={"tools/call":en({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),"tools/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),"prompts/get":en({description:T().optional(),messages:k(De)}),"prompts/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),"resources/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),"resources/read":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),"completion/complete":en({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),"server/discover":en({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),"subscriptions/listen":en({})},nn=j({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=A({method:F(`notifications/subscriptions/acknowledged`),params:A({_meta:nn.optional(),notifications:Jt})}),an=A({_meta:nn.optional(),requestId:i,reason:T().optional()}),on=A({method:F(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":oe,"notifications/message":ce,"notifications/resources/updated":ge,"notifications/resources/list_changed":me,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":rn},cn=e=>A({jsonrpc:F(`2.0`),id:M([T(),E().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:ee,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:re,ProgressSchema:ie,ProgressNotificationParamsSchema:ae,ProgressNotificationSchema:oe,LoggingMessageNotificationParamsSchema:se,LoggingMessageNotificationSchema:ce,ResourceContentsSchema:le,TextResourceContentsSchema:ue,BlobResourceContentsSchema:de,AnnotationsSchema:fe,ResourceSchema:pe,ResourceTemplateSchema:b,ResourceListChangedNotificationSchema:me,ResourceUpdatedNotificationParamsSchema:he,ResourceUpdatedNotificationSchema:ge,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:be,ImageContentSchema:xe,AudioContentSchema:Se,ToolUseContentSchema:Ce,EmbeddedResourceSchema:we,ResourceLinkSchema:Te,ContentBlockSchema:Ee,PromptMessageSchema:De,ToolAnnotationsSchema:x,ToolListChangedNotificationSchema:Oe,ModelHintSchema:ke,ModelPreferencesSchema:Ae,ToolChoiceSchema:je,BooleanSchemaSchema:Me,StringSchemaSchema:Ne,NumberSchemaSchema:S,UntitledSingleSelectEnumSchemaSchema:Pe,TitledSingleSelectEnumSchemaSchema:Fe,LegacyTitledEnumSchemaSchema:Ie,SingleSelectEnumSchemaSchema:Le,UntitledMultiSelectEnumSchemaSchema:Re,TitledMultiSelectEnumSchemaSchema:ze,MultiSelectEnumSchemaSchema:Be,EnumSchemaSchema:Ve,PrimitiveSchemaDefinitionSchema:He,ElicitRequestFormParamsSchema:Ue,ResourceTemplateReferenceSchema:We,PromptReferenceSchema:Ge,RootSchema:Ke,ClientCapabilities2026Schema:Je,ServerCapabilities2026Schema:Xe,RequestMetaEnvelopeSchema:Ze,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:ot,PaginatedResultSchema:st,CallToolResultSchema:ct,ListToolsResultSchema:lt,ListPromptsResultSchema:ut,GetPromptResultSchema:dt,ListResourcesResultSchema:ft,ListResourceTemplatesResultSchema:pt,ReadResourceResultSchema:mt,CompleteResultSchema:ht,CacheableResultSchema:C,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(ot),CallToolResultResponseSchema:cn(M([ct,At])),ListToolsResultResponseSchema:cn(lt),ListPromptsResultResponseSchema:cn(ut),GetPromptResultResponseSchema:cn(M([dt,At])),ListResourcesResultResponseSchema:cn(ft),ListResourceTemplatesResultResponseSchema:cn(pt),ReadResourceResultResponseSchema:cn(M([mt,At])),CompleteResultResponseSchema:cn(ht),DiscoverResultResponseSchema:cn(gt),SubscriptionsListenResultResponseSchema:cn(Qt)}}var zp;function Bp(){return zp??=Rp()}var Vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Hp(e){return Vp.includes(e)}var Up=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Wp(e){return e[Up]}function Gp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Kp(e){return e===`public`||e===`private`}var B=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),qp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,np(this,new.target)}static fromError(t,n,r){if(t===B.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yp(e.elicitations,n)}if(t===B.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xp({supported:e.supported,requested:e.requested},n)}if(t===B.InvalidParams||t===B.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===B.ResourceNotFound||Object.keys(e).length===1))return new Jp(e.uri,n)}if(t===B.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Jp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(B.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(B.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(B.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(B.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qp=0,$p=`private`,em=[`tools/call`,`prompts/get`,`resources/read`];function tm(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||em.includes(e))return t;throw new qp(B.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function nm(e,t){let n=Wp(t);if(t.resultType!==`complete`||!Hp(e))return n===void 0?t:sm(t);let r=t,i=Gp(r.ttlMs)?r.ttlMs:am(n),a=Kp(r.cacheScope)?r.cacheScope:om(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Up],o}function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function im(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[jl]:t}}:!rm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[jl]:t}}}function am(e){return e!==void 0&&Gp(e.ttlMs)?e.ttlMs:Qp}function om(e){return e!==void 0&&Kp(e.cacheScope)?e.cacheScope:$p}function sm(e){let t={...e};return delete t[Up],t}var cm=[`elicitation/create`,`sampling/createMessage`,`roots/list`],lm;function um(){if(lm)return lm;let e=Bp();return lm={request:{"elicitation/create":A({method:F(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:F(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:F(`roots/list`),params:j({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},lm}function dm(e){return cm.includes(e)}function fm(e){return dm(e)?um().request[e]:void 0}function pm(e){return dm(e)?um().response[e]:void 0}var mm={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},hm={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function gm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function _m(e){return Object.prototype.hasOwnProperty.call(hm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function ym(e){return gm(e)?Bp().dispatchRequestSchemas[e]:void 0}function bm(e){return vm(e)?Bp().dispatchResultSchemas[e]:void 0}function xm(e){return _m(e)?Bp().notificationSchemas2026[e]:void 0}Object.keys(mm),Object.keys(hm);function Sm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wm={ok:!1,reason:`not-in-era`},Tm=[kl,Ml];function Em(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sm(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sm(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sm(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Dm={era:`2026-07-28`,hasRequestMethod:gm,hasNotificationMethod:_m,hasInputRequestMethod:e=>fm(e)!==void 0,validateRequest:(e,t)=>Cm(ym(e),t),validateResult:(e,t)=>Cm(bm(e),t),validateNotification:(e,t)=>Cm(xm(e),t),validateInputRequest:(e,t)=>Cm(fm(e),t),validateInputResponse:(e,t)=>Cm(pm(e),t),samplingResultVariant:()=>wm,outboundEnvelope(e){return{[kl]:e.protocolVersion,[Al]:e.clientInfo,[Ml]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Tm)n in e||t.push({key:n,problem:`missing`});let n=Bp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>up(e),inputRequestSchema:fm,decodeResult(e,t){if(!Sm(t))return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sm(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Bp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new z(R.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=km(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return im(nm(e,tm(e,Em(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Bp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Om;function km(){if(Om)return Om;let e=Bp();return Om={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Om}var Am=`2026-07-28`;function jm(e){return e!==void 0&&sp(e)?Dm:Lp}function Mm(e){return e.revision===void 0?e.era===`modern`?Dm.era:Lp.era:jm(e.revision).era}function Nm(e){return Im.some(t=>t.hasRequestMethod(e))}function Pm(e){return Im.some(t=>t.hasNotificationMethod(e))}function Fm(e){return e===`tasks/get`||e===`tasks/cancel`}var Im=[Lp,Dm],Lm=m({AnnotationsSchema:()=>Mu,AudioContentSchema:()=>dd,BaseMetadataSchema:()=>su,BaseRequestParamsSchema:()=>Ul,BlobResourceContentsSchema:()=>Au,BooleanSchemaSchema:()=>Kd,CallToolRequestParamsSchema:()=>Ed,CallToolRequestSchema:()=>Dd,CallToolResultSchema:()=>wd,CancelTaskRequestSchema:()=>Nf,CancelTaskResultSchema:()=>Pf,CancelledNotificationParamsSchema:()=>ru,CancelledNotificationSchema:()=>iu,ClientCapabilitiesSchema:()=>fu,ClientNotificationSchema:()=>If,ClientRequestSchema:()=>Ff,ClientResultSchema:()=>Lf,ClientTasksCapabilitySchema:()=>uu,CompatibilityCallToolResultSchema:()=>Td,CompleteRequestParamsSchema:()=>mf,CompleteRequestSchema:()=>hf,CompleteResultSchema:()=>gf,ContentBlockSchema:()=>hd,CreateMessageRequestParamsSchema:()=>Hd,CreateMessageRequestSchema:()=>Ud,CreateMessageResultSchema:()=>Wd,CreateMessageResultWithToolsSchema:()=>Gd,CreateTaskResultSchema:()=>wf,CursorSchema:()=>zl,DiscoverRequestSchema:()=>vu,DiscoverResultSchema:()=>yu,ElicitRequestFormParamsSchema:()=>af,ElicitRequestParamsSchema:()=>sf,ElicitRequestSchema:()=>cf,ElicitRequestURLParamsSchema:()=>of,ElicitResultSchema:()=>df,ElicitationCompleteNotificationParamsSchema:()=>lf,ElicitationCompleteNotificationSchema:()=>uf,EmbeddedResourceSchema:()=>pd,EmptyResultSchema:()=>nu,EnumSchemaSchema:()=>nf,GetPromptRequestParamsSchema:()=>sd,GetPromptRequestSchema:()=>cd,GetPromptResultSchema:()=>_d,GetTaskPayloadRequestSchema:()=>kf,GetTaskPayloadResultSchema:()=>Af,GetTaskRequestSchema:()=>Df,GetTaskResultSchema:()=>Of,IconSchema:()=>au,IconsSchema:()=>ou,ImageContentSchema:()=>ud,ImplementationSchema:()=>cu,InitializeRequestParamsSchema:()=>pu,InitializeRequestSchema:()=>mu,InitializeResultSchema:()=>gu,InitializedNotificationSchema:()=>_u,JSONArraySchema:()=>Ll,JSONObjectSchema:()=>Il,JSONRPCErrorResponseSchema:()=>$l,JSONRPCMessageSchema:()=>eu,JSONRPCNotificationSchema:()=>Zl,JSONRPCRequestSchema:()=>Xl,JSONRPCResponseSchema:()=>tu,JSONRPCResultResponseSchema:()=>Ql,JSONValueSchema:()=>Fl,LegacyTitledEnumSchemaSchema:()=>Zd,ListChangedOptionsBaseSchema:()=>kd,ListPromptsRequestSchema:()=>ad,ListPromptsResultSchema:()=>od,ListResourceTemplatesRequestSchema:()=>Lu,ListResourceTemplatesResultSchema:()=>Ru,ListResourcesRequestSchema:()=>Fu,ListResourcesResultSchema:()=>Iu,ListRootsRequestSchema:()=>vf,ListRootsResultSchema:()=>yf,ListTasksRequestSchema:()=>jf,ListTasksResultSchema:()=>Mf,ListToolsRequestSchema:()=>Sd,ListToolsResultSchema:()=>Cd,LoggingLevelSchema:()=>Ad,LoggingMessageNotificationParamsSchema:()=>Nd,LoggingMessageNotificationSchema:()=>Pd,ModelHintSchema:()=>Fd,ModelPreferencesSchema:()=>Id,MultiSelectEnumSchemaSchema:()=>tf,NotificationSchema:()=>ql,NotificationsParamsSchema:()=>Kl,NumberSchemaSchema:()=>Jd,PaginatedRequestParamsSchema:()=>wu,PaginatedRequestSchema:()=>Tu,PaginatedResultSchema:()=>Eu,PingRequestSchema:()=>bu,PrimitiveSchemaDefinitionSchema:()=>rf,ProgressNotificationParamsSchema:()=>Su,ProgressNotificationSchema:()=>Cu,ProgressSchema:()=>xu,ProgressTokenSchema:()=>Rl,PromptArgumentSchema:()=>rd,PromptListChangedNotificationSchema:()=>vd,PromptMessageSchema:()=>gd,PromptReferenceSchema:()=>pf,PromptSchema:()=>id,ReadResourceRequestParamsSchema:()=>Bu,ReadResourceRequestSchema:()=>Vu,ReadResourceResultSchema:()=>Hu,RelatedTaskMetadataSchema:()=>Vl,RequestIdSchema:()=>Yl,RequestMetaSchema:()=>Hl,RequestSchema:()=>Gl,ResourceContentsSchema:()=>Du,ResourceLinkSchema:()=>md,ResourceListChangedNotificationSchema:()=>Uu,ResourceRequestParamsSchema:()=>zu,ResourceSchema:()=>Nu,ResourceTemplateReferenceSchema:()=>ff,ResourceTemplateSchema:()=>Pu,ResourceUpdatedNotificationParamsSchema:()=>td,ResourceUpdatedNotificationSchema:()=>nd,ResultMetaObjectSchema:()=>Jl,ResultSchema:()=>L,RoleSchema:()=>ju,RootSchema:()=>_f,RootsListChangedNotificationSchema:()=>bf,SamplingContentSchema:()=>zd,SamplingMessageContentBlockSchema:()=>Bd,SamplingMessageSchema:()=>Vd,ServerCapabilitiesSchema:()=>hu,ServerNotificationSchema:()=>zf,ServerRequestSchema:()=>Rf,ServerResultSchema:()=>Bf,ServerTasksCapabilitySchema:()=>du,SetLevelRequestParamsSchema:()=>jd,SetLevelRequestSchema:()=>Md,SingleSelectEnumSchemaSchema:()=>Qd,StringSchemaSchema:()=>qd,SubscribeRequestParamsSchema:()=>Wu,SubscribeRequestSchema:()=>Gu,SubscriptionFilterSchema:()=>Ju,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Zu,SubscriptionsAcknowledgedNotificationSchema:()=>Qu,SubscriptionsListenRequestParamsSchema:()=>Yu,SubscriptionsListenRequestSchema:()=>Xu,SubscriptionsListenResultMetaSchema:()=>$u,SubscriptionsListenResultSchema:()=>ed,TaskAugmentedRequestParamsSchema:()=>Wl,TaskCreationParamsSchema:()=>xf,TaskMetadataSchema:()=>Bl,TaskSchema:()=>Cf,TaskStatusNotificationParamsSchema:()=>Tf,TaskStatusNotificationSchema:()=>Ef,TaskStatusSchema:()=>Sf,TextContentSchema:()=>ld,TextResourceContentsSchema:()=>Ou,TitledMultiSelectEnumSchemaSchema:()=>ef,TitledSingleSelectEnumSchemaSchema:()=>Xd,ToolAnnotationsSchema:()=>yd,ToolChoiceSchema:()=>Ld,ToolExecutionSchema:()=>bd,ToolListChangedNotificationSchema:()=>Od,ToolResultContentSchema:()=>Rd,ToolSchema:()=>xd,ToolUseContentSchema:()=>fd,UnsubscribeRequestParamsSchema:()=>Ku,UnsubscribeRequestSchema:()=>qu,UntitledMultiSelectEnumSchemaSchema:()=>$d,UntitledSingleSelectEnumSchemaSchema:()=>Yd}),Rm=e=>Xl.safeParse(e).success,zm=e=>Zl.safeParse(e).success,Bm=e=>Ql.safeParse(e).success,Vm=e=>$l.safeParse(e).success,Hm=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Um=`Mcp-Param-`,Wm=`x-mcp-header`,Gm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Km=new Set([`string`,`integer`,`boolean`]);function qm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(Wm in s){if(!o||a.length===0)return`${Xm(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of \'properties\' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=s[Wm];if(typeof e!=`string`||e.length===0)return`${Xm(a)}: x-mcp-header MUST be a non-empty string`;if(!Gm.test(e))return`${Xm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Km.has(i)){let e=`${Xm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Jm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ym.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Jm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ym=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Xm(e){return e.length===0?`<root>`:e.join(`.`)}var Zm=`=?base64?`,Qm=`?=`;function $m(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function eh(e){if(e.length===0||e.startsWith(Zm)&&e.endsWith(Qm)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function th(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function nh(e){return eh(e)?`${Zm}${th(e)}${Qm}`:e}function rh(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function ih(e,t){let n={};for(let r of e){let e=rh(t,r.path);if(e==null)continue;let i=$m(e);i!==void 0&&(n[`${Um}${r.headerName}`]=nh(i))}return n}B.InvalidRequest,B.UnsupportedProtocolVersion,B.InvalidParams,B.MethodNotFound,B.InvalidParams,B.MissingRequiredClientCapability,B.ParseError,B.InvalidRequest,B.MethodNotFound,B.UnsupportedProtocolVersion,B.MissingRequiredClientCapability;function ah(e,t){return Bs(e,t)}function oh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function sh(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ch=!1,lh=`draft-2020-12`;function uh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:lh});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ch||(ch=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Ps(e,{target:lh,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&fh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var dh=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function fh(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&dh.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||fh(e,`$id`in e?{}:t)))}return!1}function ph(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function mh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>ph(e)).join(`, `)}:{success:!0,data:n.value}}function hh(e){let t=Ps(e,{target:lh,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var gh=/\\\\\\.\\\\d\\{(\\d+)\\}/;function _h(e){let t=gh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>wl({local:e,offset:t,precision:n}))))}function vh(e,t){let n;switch(e){case`email`:n=[sc()];break;case`uri`:n=[dc()];break;case`date`:n=[Tl()];break;case`date-time`:n=_h(t);break}return new Set(n.map(e=>hh(e)).filter(e=>e!==void 0))}function yh(e,t,n){return n!==`zod`||vh(e,t).has(t)}function bh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xh(e){try{return uh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new qp(B.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Sh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ch(e){return Sh.has(e)||e.startsWith(`x-`)}var wh=new Set([`$schema`,...Object.keys(af.shape.requestedSchema.shape)]),Th={string:oh([qd,Yd,Xd,Zd]),number:oh([Jd]),integer:oh([Jd]),boolean:oh([Kd]),array:oh([$d,ef])},Eh=new Set(qd.shape.format.unwrap().options);function Dh(e,t,n,r){if(!bh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Th,e.type)?Th[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ch(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Eh.has(e.format)?(typeof s!=`string`||!yh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Dh(n,`properties.${e}`,t,r)])):wh.has(i)?n[i]=a:Ch(i)||r.push(i);if(r.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function kh(e,t){if(!bh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ah(rf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Ah(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Ah(e,t[r],`${n}[${r}]`)):!bh(e)||!bh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Ah(r,t[e],i):Ch(e)?[]:[i]})}function jh(e){if(!sh(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Oh(xh(e.requestedSchema),t),r=ah(af.shape.requestedSchema,n);if(!r.success)throw new qp(B.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${kh(n,r.error.message)}`);let i=Ah(n,r.data);if(i.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Mh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Mh,{elicit(e){try{return{method:`elicitation/create`,params:jh(e)}}catch(e){throw e instanceof qp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Nh=!0,Ph=10,Fh=250;function Ih(e){return{autoFulfill:e?.autoFulfill??Nh,maxRounds:e?.maxRounds??Ph}}function Lh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Rh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function zh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Bh(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new z(R.InputRequiredRoundsExceeded,Rh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Bh(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await zh(Fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Lh(r,u,c.requestState),d);if(Hm(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Hh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Uh={IdJagTokenExchangeResponseSchema:qf,OAuthClientInformationFullSchema:Qf,OAuthClientInformationSchema:Zf,OAuthClientMetadataSchema:Xf,OAuthClientRegistrationErrorSchema:$f,OAuthErrorResponseSchema:Jf,OAuthMetadataSchema:Uf,OAuthProtectedResourceMetadataSchema:Hf,OAuthTokenRevocationRequestSchema:ep,OAuthTokensSchema:Kf,OpenIdProviderDiscoveryMetadataSchema:Gf,OpenIdProviderMetadataSchema:Wf},Wh={},Gh={};function Kh(e,t){let n=e.slice(0,-6);Wh[n]=t,Gh[n]=e=>t.safeParse(e).success}for(let e of Hh)Kh(e,Lm[e]);for(let[e,t]of Object.entries(Uh))Kh(e,t);Object.freeze(Wh);var qh=Object.freeze(Gh);function Jh(e){switch(e){case`initialize`:case`notifications/initialized`:return jm(void 0);case`server/discover`:return jm(Am);default:return}}var Yh=[kl,Al,Ml,Pl],Xh=[`inputResponses`,`requestState`];function Zh(e,t){let n=e.params;if(!ng(n))return{message:e,lifted:{}};let r=n._meta,i=ng(r)?Yh.filter(e=>e in r):[],a=t===`request`?Xh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ng(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Qh(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function $h(e){return()=>e}var eg=$h(void 0),tg=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Dl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'${e.kind}\' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Bm(e)||Vm(e)?this._onresponse(e):Rm(e)?this._onrequest(e,t):zm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new z(R.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Zh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(Pm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Zh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(B.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Nm(n.method)&&!i.hasRequestMethod(n.method)&&!(Fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(B.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(B.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(B.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ag(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?eg:$h(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),sh(t))return u(e,t,n);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(B.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:B.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Bm(e)?n(e):n(qp.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(sh(t))return Fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return jm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Jh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Nm(t)&&!e.hasRequestMethod(t))throw new z(R.MethodNotSupportedByProtocolVersion,`Method \'${t}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof z?e:new z(R.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(dg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;mh(n,o).then(e=>{e.success?d(e.data):f(new z(R.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ee=r?.timeout??6e4;this._setupTimeout(h,ee,r?.maxTotalTimeout,()=>y(new z(R.RequestTimeout,`Request timed out`,{timeout:ee})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new z(R.NotConnected,`Not connected`);if(Pm(t.method)&&!e.hasNotificationMethod(t.method))throw new z(R.MethodNotSupportedByProtocolVersion,`Notification \'${t.method}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Nm(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await mh(t.params,{...r.params});if(!a.success)throw new qp(B.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await mh(t.params,{...r.params});if(!i.success)throw new qp(B.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ng(a)&&ng(i)?{...a,...i}:i}return n}function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(e){let t={},n=[];if(!ig(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ig(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function og(e){throw new z(R.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function sg(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:$h(void 0),signal:r,send:(()=>og(`send`)),notify:()=>og(`notify`)}}}async function cg(e,t,n,r,i){if(!ig(r)||typeof r.method!=`string`)throw new z(R.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new z(R.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new z(R.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ig(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(sg(n,a,s,i,e.sessionId)))}function lg(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ug(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>cg(e,i,t,n,r),retry:(e,t)=>r.retry(e,lg(o,t))};return Vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function dg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}p((e=>{var t=/; *([!#$%&\'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*"|[!#$%&\'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function fg(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fg(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fg(e[r],t[r]))return!1;return!0}return e===t}function pg(e){return encodeURI(mg(e))}function mg(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var hg={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},gg={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},_g={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},vg=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function yg(e,t=Object.create(null),n=vg,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:yg(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(_g[i])continue;let a=`${r}/${pg(i)}`,o=e[i];if(Array.isArray(o)){if(hg[i]){let e=o.length;for(let r=0;r<e;r++)yg(o[r],t,n,`${a}/${r}`)}}else if(gg[i])for(let e in o)yg(o[e],t,n,`${a}/${pg(e)}`);else yg(o,t,n,a)}return t}var bg=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,xg=[0,31,28,31,30,31,30,31,31,30,31,30,31],Sg=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,Cg=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,wg=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Tg=/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,Eg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,jg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Mg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,Ng=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,Pg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function Fg(e){return e.test.bind(e)}var Ig={date:Rg,time:zg.bind(void 0,!1),"date-time":Vg,duration:Pg,uri:Wg,"uri-reference":Fg(wg),"uri-template":Fg(Tg),url:Fg(Eg),email:jg,hostname:Fg(Cg),ipv4:Fg(Mg),ipv6:Fg(Ng),regex:Kg,uuid:Fg(Dg),"json-pointer":Fg(Og),"json-pointer-uri-fragment":Fg(kg),"relative-json-pointer":Fg(Ag)};function Lg(e){return e%4==0&&(e%100!=0||e%400==0)}function Rg(e){let t=e.match(bg);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Lg(n)?29:xg[r])}function zg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Bg=/t|\\s/i;function Vg(e){let t=e.split(Bg);return t.length==2&&Rg(t[0])&&zg(!0,t[1])}var Hg=/\\/|:/,Ug=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Wg(e){return Hg.test(e)&&Ug.test(e)}var Gg=/[^\\\\]\\\\Z/;function Kg(e){if(Gg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function qg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Jg(e,t,n=`2019-09`,r=yg(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:ee,oneOf:te,if:ne,then:re,else:ie,format:ae,properties:oe,patternProperties:se,additionalProperties:ce,unevaluatedProperties:le,minProperties:ue,maxProperties:de,propertyNames:fe,dependentRequired:pe,dependentSchemas:b,dependencies:me,prefixItems:he,items:ge,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:be,maxContains:xe,minItems:Se,maxItems:Ce,uniqueItems:we,minimum:Te,maximum:Ee,exclusiveMinimum:De,exclusiveMaximum:x,multipleOf:Oe,minLength:ke,maxLength:Ae,pattern:je,__absolute_ref__:Me,__absolute_recursive_ref__:Ne}=t,S=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Ne]:a,u=`${s}/$recursiveRef`,d=Jg(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||S.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[Me||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw Me&&Me!==d&&(e+=` Absolute URI "${Me}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Jg(e,t,n,r,i,a,o,l,c);if(u.valid||S.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:S.length===0,errors:S}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fg(e,h)||S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fg(e,t))||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Jg(e,v,n,r,i,a,o,t).valid&&S.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Pe=[];if(y!==void 0){let t=`${s}/anyOf`,l=S.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u||=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ee!==void 0){let t=`${s}/allOf`,l=S.length,u=!0;for(let s=0;s<ee.length;s++){let l=ee[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u&&=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(te!==void 0){let t=`${s}/oneOf`,l=S.length,u=te.filter((s,l)=>{let u=Object.create(c),d=Jg(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return S.push(...d.errors),d.valid&&Pe.push(u),d.valid}).length;u===1?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Pe),ne!==void 0){let t=`${s}/if`;if(Jg(e,ne,n,r,i,a,o,t,c).valid){if(re!==void 0){let l=Jg(e,re,n,r,i,a,o,`${s}/then`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(ie!==void 0){let l=Jg(e,ie,n,r,i,a,o,`${s}/else`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||S.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ue!==void 0&&t.length<ue&&S.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ue} properties.`}),de!==void 0&&t.length>de&&S.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pg(s)}`,c=Jg(s,fe,n,r,i,a,e,t);c.valid||S.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(pe!==void 0){let t=`${s}/dependantRequired`;for(let n in pe)if(n in e){let r=pe[n];for(let i of r)i in e||S.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(b!==void 0)for(let t in b){let l=`${s}/dependentSchemas`;if(t in e){let s=Jg(e,b[t],n,r,i,a,o,`${l}/${pg(t)}`,c);s.valid||S.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(me!==void 0){let t=`${s}/dependencies`;for(let s in me)if(s in e){let c=me[s];if(Array.isArray(c))for(let n of c)n in e||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Jg(e,c,n,r,i,a,o,`${t}/${pg(s)}`);l.valid||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(oe!==void 0){let t=`${s}/properties`;for(let s in oe){if(!(s in e))continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],oe[s],n,r,i,a,d,`${t}/${pg(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,S.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&se!==void 0){let t=`${s}/patternProperties`;for(let s in se){let d=new RegExp(s,`u`),f=se[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pg(p)}`,h=Jg(e[p],f,n,r,i,a,m,`${t}/${pg(s)}`);h.valid?c[p]=l[p]=!0:(u=i,S.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&ce!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],ce,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,S.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&le!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pg(s)}`,u=Jg(e[s],le,n,r,i,a,l,t);u.valid?c[s]=!0:S.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Ce!==void 0&&e.length>Ce&&S.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Ce}).`}),Se!==void 0&&e.length<Se&&S.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Se}).`});let t=e.length,l=0,u=!1;if(he!==void 0){let d=`${s}/prefixItems`,f=Math.min(he.length,t);for(;l<f;l++){let t=Jg(e[l],he[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ge!==void 0){let d=`${s}/items`;if(Array.isArray(ge)){let s=Math.min(ge.length,t);for(;l<s;l++){let t=Jg(e[l],ge[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Jg(e[l],ge,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Jg(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,S.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&be===void 0)S.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(be!==void 0&&t<be)S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${be}).`});else{let l=`${s}/contains`,u=S.length,d=0;for(let s=0;s<t;s++){let t=Jg(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):S.push(...t.errors)}d>=(be||0)&&(S.length=u),be===void 0&&xe===void 0&&d===0?S.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):be!==void 0&&d<be?S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${be} items matching schema. Only ${d} items were found.`}):xe!==void 0&&d>xe&&S.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${xe} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Jg(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||S.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(we)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fg(r,t))&&(S.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(Te!==void 0&&(De===!0&&e<=Te||e<Te)&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${De?`or equal to `:``} ${Te}.`}),Ee!==void 0&&(x===!0&&e>=Ee||e>Ee)&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${x?`or equal to `:``} ${Ee}.`})):(Te!==void 0&&e<Te&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Te}.`}),Ee!==void 0&&e>Ee&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Ee}.`}),De!==void 0&&e<=De&&S.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${De}.`}),x!==void 0&&e>=x&&S.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${x}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&S.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=ke===void 0&&Ae===void 0?0:qg(e);ke!==void 0&&t<ke&&S.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ke}).`}),Ae!==void 0&&t>Ae&&S.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Ae}).`}),je!==void 0&&!new RegExp(je,`u`).test(e)&&S.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),ae!==void 0&&Ig[ae]&&!Ig[ae](e)&&S.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${ae}".`})}return{valid:S.length===0,errors:S}}var Yg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=yg(e)}validate(e){return Jg(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),yg(e,this.lookup)}},Xg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ee(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Yg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Zg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e),this.name=new.target.name,np(this,new.target)}};(class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Qg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,np(this,new.target)}},$g=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),e_=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(t_(e))}set(e,t){let n=t_(e),r=$g.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!$g.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(t_(e))&&!$g.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=$g.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function t_(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function n_(e,t){return t===void 0?e:`${e}\\0${t}`}var r_=864e5,i_=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(n_(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:a_(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function a_(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var o_=Symbol.for(`mcp.authSeamEscape`);function s_(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[o_]===!0}var c_=-32022,l_=new Set([-32001,-32020,-32021]);function u_(e,t){switch(e.kind){case`result`:return d_(e.result,t);case`rpc-error`:return f_(e,t);case`http-error`:return p_(e,t);case`network-error`:return m_(e.error,t);case`unusable-reply`:return{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${g_(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:m_(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new z(R.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function d_(e,t){let n=jm(Am).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Xp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function f_(e,t){let{code:n,message:r,data:i}=e;if(n===c_){let e=__(i);if(e===void 0)return{kind:`legacy`};let n=new Xp({supported:e,requested:v_(i)??t.requestedVersion},r),a=lp(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return l_.has(n),{kind:`legacy`}}function p_(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new ip(t?R.ClientHttpForbidden:R.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new ip(R.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=y_(e.body);return n===void 0?{kind:`legacy`}:f_(n,t)}function m_(e,t){return t.environment===`browser`&&h_(e)?{kind:`legacy`}:{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: ${g_(e)}`,{cause:e},{cause:e})}}function h_(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function g_(e){return e instanceof Error?e.message:String(e)}function __(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function v_(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function y_(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var b_=`legacy`;function x_(e,t){let n=e?.mode??b_;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!sp(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?lp(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...op],fallbackAvailable:!t||cp(t).length>0,probe:r}}function S_(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function C_(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var w_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Bm(e)||Vm(e))&&e.id===t.id){n._pending=void 0,Bm(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,T_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},T_=new WeakMap;function E_(e){let t=T_.get(e);T_.delete(e),t?.()}function D_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:jm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function O_(e){return e instanceof z&&e.code===R.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function k_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(s_(t)||t instanceof Qg||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof ip){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return O_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function A_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await w_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>D_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=k_(r,n),d=u_(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new z(R.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function j_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function M_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(N_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=A_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await P_(a),t.close=o}if(s)throw N_();return u}function N_(){return new z(R.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function P_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function F_(e){let t=e._meta?.[jl];return qh.Implementation(t)?t:void 0}function I_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&I_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&I_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&I_(n,t)}}function L_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function R_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&yu.safeParse(e.discover).success))return e;throw new z(R.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var z_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},B_=64,V_={};(class extends tg{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{V_.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,V_.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),V_.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new z(R.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Ih(t?.inputRequired),this._cache=new i_(t?.responseCacheStore??new e_,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??B_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&sp(this._negotiatedProtocolVersion)&&Rm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ug({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=rg(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=L_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new qp(B.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new qp(B.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new qp(l.reason===`not-in-era`?B.InternalError:B.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{I_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new qp(c.reason===`not-in-era`?B.InternalError:B.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new z(R.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,R_(t.prior),t);let n=x_(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=cp(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new z(R.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=C_(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:S_(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?j_(e):void 0;r=o===void 0?await A_(t,{...a,transport:e,transportKind:i}):await M_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),E_(e),t}if(E_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=F_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&lp(i).length>0?lp(i):op).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new z(R.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=F_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return sp(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new z(R.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new z(R.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new z(R.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new z(R.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new z(R.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new z(R.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new z(R.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new z(R.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new z(R.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new z(R.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},yu,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new z(R.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),r_),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:qm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new z(R.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!sp(n))throw new z(R.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new z(R.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new z(R.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(z_,e.method)?z_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Nl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Vm(e)?n.settle({cause:`remote`,error:qp.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new z(R.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new z(R.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&S_()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=ih(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new qp(B.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof qp&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new qp(B.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new qp(B.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof qp?e:new qp(B.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||C_(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=qm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=ah(kd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,np(this,new.target)}};var H_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},U_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},W_=new Set;function G_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;W_.has(o)||(W_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},K_(t)):e=>s({method:a,params:e})]}function K_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var q_=`2026-01-26`,J_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=eu.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Y_=M([F(`light`),F(`dark`)]).describe(`Color theme preference for the host environment.`),X_=M([F(`inline`),F(`fullscreen`),F(`pip`)]).describe(`Display mode for UI presentation.`),Z_=N(M([F(`--color-background-primary`),F(`--color-background-secondary`),F(`--color-background-tertiary`),F(`--color-background-inverse`),F(`--color-background-ghost`),F(`--color-background-info`),F(`--color-background-danger`),F(`--color-background-success`),F(`--color-background-warning`),F(`--color-background-disabled`),F(`--color-text-primary`),F(`--color-text-secondary`),F(`--color-text-tertiary`),F(`--color-text-inverse`),F(`--color-text-ghost`),F(`--color-text-info`),F(`--color-text-danger`),F(`--color-text-success`),F(`--color-text-warning`),F(`--color-text-disabled`),F(`--color-border-primary`),F(`--color-border-secondary`),F(`--color-border-tertiary`),F(`--color-border-inverse`),F(`--color-border-ghost`),F(`--color-border-info`),F(`--color-border-danger`),F(`--color-border-success`),F(`--color-border-warning`),F(`--color-border-disabled`),F(`--color-ring-primary`),F(`--color-ring-secondary`),F(`--color-ring-inverse`),F(`--color-ring-info`),F(`--color-ring-danger`),F(`--color-ring-success`),F(`--color-ring-warning`),F(`--font-sans`),F(`--font-mono`),F(`--font-weight-normal`),F(`--font-weight-medium`),F(`--font-weight-semibold`),F(`--font-weight-bold`),F(`--font-text-xs-size`),F(`--font-text-sm-size`),F(`--font-text-md-size`),F(`--font-text-lg-size`),F(`--font-heading-xs-size`),F(`--font-heading-sm-size`),F(`--font-heading-md-size`),F(`--font-heading-lg-size`),F(`--font-heading-xl-size`),F(`--font-heading-2xl-size`),F(`--font-heading-3xl-size`),F(`--font-text-xs-line-height`),F(`--font-text-sm-line-height`),F(`--font-text-md-line-height`),F(`--font-text-lg-line-height`),F(`--font-heading-xs-line-height`),F(`--font-heading-sm-line-height`),F(`--font-heading-md-line-height`),F(`--font-heading-lg-line-height`),F(`--font-heading-xl-line-height`),F(`--font-heading-2xl-line-height`),F(`--font-heading-3xl-line-height`),F(`--border-radius-xs`),F(`--border-radius-sm`),F(`--border-radius-md`),F(`--border-radius-lg`),F(`--border-radius-xl`),F(`--border-radius-full`),F(`--border-width-regular`),F(`--shadow-hairline`),F(`--shadow-sm`),F(`--shadow-md`),F(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),M([T(),Mc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);A({method:F(`ui/open-link`),params:A({url:T().describe(`URL to open in the host\'s browser`)})});var Q_=A({isError:D().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),$_=A({isError:D().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),ev=A({isError:D().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();A({method:F(`ui/notifications/sandbox-proxy-ready`),params:A({})});var tv=A({connectDomains:k(T()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:k(T()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:k(T()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:k(T()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),nv=A({camera:A({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:A({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});A({method:F(`ui/notifications/size-changed`),params:A({width:E().optional().describe(`New width in pixels.`),height:E().optional().describe(`New height in pixels.`)})});var rv=A({method:F(`ui/notifications/tool-input`),params:A({arguments:N(T(),O().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),iv=A({method:F(`ui/notifications/tool-input-partial`),params:A({arguments:N(T(),O().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),av=A({method:F(`ui/notifications/tool-cancelled`),params:A({reason:T().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),ov=A({fonts:T().optional()}),sv=A({variables:Z_.optional().describe(`CSS variables for theming the app.`),css:ov.optional().describe(`CSS blocks that apps can inject.`)}),cv=A({method:F(`ui/resource-teardown`),params:A({})}),lv=N(T(),O()),uv=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)});A({method:F(`ui/notifications/request-teardown`),params:A({}).optional()});var dv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:D().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:D().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:nv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:tv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:uv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:uv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),fv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:D().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:k(X_).optional().describe(`Display modes the app supports.`)});A({method:F(`ui/notifications/initialized`),params:A({}).optional()}),A({csp:tv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:nv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:T().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:D().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),A({method:F(`ui/request-display-mode`),params:A({mode:X_.describe(`The display mode being requested.`)})});var pv=A({mode:X_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),mv=M([F(`model`),F(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:T().optional(),visibility:k(mv).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:zc().optional(),permissions:zc().optional()}),A({mimeTypes:k(T()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),A({method:F(`ui/download-file`),params:A({contents:k(M([pd,md])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),A({method:F(`ui/message`),params:A({role:F(`user`).describe(`Message role, currently only "user" is supported.`),content:k(hd).describe(`Message content blocks (text, image, etc.).`)})}),A({method:F(`ui/notifications/sandbox-resource-ready`),params:A({html:T().describe(`HTML content to load into the inner iframe.`),sandbox:T().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:tv.optional().describe(`CSP configuration from resource metadata.`),permissions:nv.optional().describe(`Sandbox permissions from resource metadata.`)})});var hv=A({method:F(`ui/notifications/tool-result`),params:wd.describe(`Standard MCP tool execution result.`)}),gv=A({toolInfo:A({id:Yl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:xd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Y_.optional().describe(`Current color theme preference.`),styles:sv.optional().describe(`Style configuration for theming the app.`),displayMode:X_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:k(X_).optional().describe(`Display modes the host supports.`),containerDimensions:M([A({height:E().describe(`Fixed container height in pixels.`)}),A({maxHeight:M([E(),Mc()]).optional().describe(`Maximum container height in pixels.`)})]).and(M([A({width:E().describe(`Fixed container width in pixels.`)}),A({maxWidth:M([E(),Mc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:T().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:T().optional().describe(`User\'s timezone in IANA format.`),userAgent:T().optional().describe(`Host application identifier.`),platform:M([F(`web`),F(`desktop`),F(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:D().optional().describe(`Whether the device supports touch input.`),hover:D().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:E().describe(`Top safe area inset in pixels.`),right:E().describe(`Right safe area inset in pixels.`),bottom:E().describe(`Bottom safe area inset in pixels.`),left:E().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),_v=A({method:F(`ui/notifications/host-context-changed`),params:gv.describe(`Partial context update containing only changed fields.`)});A({method:F(`ui/update-model-context`),params:A({content:k(hd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:N(T(),O().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),A({method:F(`ui/initialize`),params:A({appInfo:cu.describe(`App identification (name and version).`),appCapabilities:fv.describe(`Features and capabilities this app provides.`),protocolVersion:T().describe(`Protocol version this app supports.`)})});var vv=A({protocolVersion:T().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cu.describe(`Host application identification and version.`),hostCapabilities:dv.describe(`Features and capabilities provided by the host.`),hostContext:gv.describe(`Rich context about the host environment.`)}).passthrough(),yv={target:`draft-2020-12`};async function bv(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](yv);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function xv(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Sv(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var Cv=class e extends tg{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H_;_methods=new U_;setRequestHandler=(...e)=>{let[t,...n]=G_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=G_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:rv,toolinputpartial:iv,toolresult:hv,toolcancelled:av,hostcontextchanged:_v};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&yt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Sv(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await xv(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await xv(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await bv(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await bv(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:cv.shape.params,result:lv},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ev,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},nu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Q_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},$_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},pv,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new J_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:q_}},vv,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},wv=e=>`${e}`.split(`.`)[1]?.length??0,Tv=e=>10**-wv(e),Ev=(e,t)=>`${+e.toFixed(wv(t))}`,Dv=class extends Error{},Ov=/[A-Za-z_$][\\w$-]*/y,kv=/-?(?:\\d[\\d_]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/iy,Av={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`\'`,nbsp:`\\xA0`},jv=e=>e.replace(/&(#x[\\da-f]+|#\\d+|\\w+);/gi,(e,t)=>t[0]===`#`?String.fromCodePoint(t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):+t.slice(1)):Av[t]??e),Mv=e=>e.replace(/\\\\(u\\{[\\da-f]+\\}|u[\\da-f]{4}|x[\\da-f]{2}|[\\s\\S])/gi,(e,t)=>t.length>1?String.fromCodePoint(parseInt(t.replace(/[ux{}]/gi,``),16)):{n:`\n`,t:` `,r:`\\r`,b:`\\b`,f:`\\f`,v:`\\v`,0:`\\0`}[t]??t);function Nv(e){let t=0,n=e=>{throw new Dv(e)},r=()=>e.slice(t,t+12).split(`\n`)[0],i=n=>{n.lastIndex=t;let r=n.exec(e)?.[0];return r&&(t+=r.length),r},a=()=>{for(;;)if(i(/\\s+/y),e.startsWith(`//`,t))i(/\\/\\/.*/y);else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n<0?e.length:n+2}else return},o=n=>(a(),e.startsWith(n,t)),s=e=>{o(e)||n(`Expected \\`${e}\\` at \\`${r()}\\`.`),t+=e.length};function c(){let a=[i(Ov)??n(`Expected a name at \\`${r()}\\`.`)];for(;e[t]===`.`;)t++,a.push(i(Ov)??n("Expected a name after `.`."));return a}function l(r,i=!1){let a=e[t],o=t+1;for(;o<e.length&&e[o]!==a;)e[o]===`\\\\`&&!i&&o++,o++;o>=e.length&&n(`A string is not closed.`);let s=e.slice(t+1,o);return a==="`"&&s.includes("${")&&n(`A template string cannot run here.`),t=o+1,{type:`string`,value:i?jv(s):Mv(s),quote:a,jsx:i,start:r,end:t}}function u(){a();let r=t,f=e[t];if(f===`"`||f===`\'`||f==="`")return l(r);if(f===`<`)return d();if(f===`(`){t++;let e=u();return s(`)`),e}if(f===`[`){t++;let e=[];for(;!o(`]`);)e.push(u()),o(`]`)||s(`,`);return t++,{type:`array`,items:e,start:r,end:t}}if(f===`{`){t++;let n=[];for(;!o(`}`);){let r=t,i=e[t]===`"`||e[t]===`\'`?l(t).value:c()[0],a={type:`name`,path:[i],start:r,end:t};n.push([i,o(`:`)?(t++,u()):a]),o(`}`)||s(`,`)}return t++,{type:`object`,entries:n,start:r,end:t}}let p=i(kv);if(p)return{type:`number`,value:+p.replace(/_/g,``),start:r,end:t};let m=c(),h=t;if(m.length===1){let e=m[0];if(e===`true`||e===`false`)return{type:`boolean`,value:e===`true`,start:r,end:h};if(e===`null`||e===`undefined`)return{type:e,start:r,end:h}}return o(`(`)&&n(`\\`${m.join(`.`)}()\\` is a call, which cannot run here.`),{type:`name`,path:m,start:r,end:h}}function d(){let f=t;s(`<`);let p=o(`>`)?``:c().join(`.`),m=[];for(;;){if(o(`/>`))return t+=2,{type:`element`,name:p,attributes:m,children:[],start:f,end:t};if(o(`>`))break;let c=t;if(o(`{`)){t++,s(`...`);let e=u();s(`}`),m.push({name:``,value:e,spread:!0,start:c,end:t});continue}let d=i(/[\\w$:-]+/y)??n(`Expected a prop at \\`${r()}\\`.`),h=t,g=null;o(`=`)&&(t++,a(),e[t]===`{`?(t++,g=u(),s(`}`)):g=e[t]===`"`||e[t]===`\'`?l(t,!0):u()),m.push({name:d,value:g,start:c,end:g?t:h})}t++;let h=[];for(;;){t>=e.length&&n(`\\`<${p}>\\` is not closed.`);let r=t;if(e.startsWith(`</`,t)){t+=2,a();let r=e[t]===`>`?``:c().join(`.`);return r!==p&&n(`\\`</${r}>\\` does not close \\`<${p}>\\`.`),s(`>`),{type:`element`,name:p,attributes:m,children:h,start:f,end:t}}e[t]===`<`?h.push(d()):e[t]===`{`?(t++,o(`}`)||h.push(u()),s(`}`)):(t=e.slice(t).search(/[<{]/)+t,t<r&&(t=e.length),h.push({type:`text`,raw:e.slice(r,t),start:r,end:t}))}}let f=[];for(;!o(`;`)&&t<e.length;){e[t]!==`<`&&e[t]!==`(`&&n(`Expected an element at \\`${r()}\\`.`);let i=u();i.type!==`element`&&n(`Expected an element.`),f.push(i)}return f}function Pv(e,t={}){let n=[],r=(e,r,i)=>{let a=t[`${e}.${r}`]??t[r],{value:o}=i,s=i.type===`string`?i.quote:``;a===!1||s==="`"||`${o}`.includes(`\n`)||n.push({prop:r,kind:Array.isArray(a)?`option`:i.type===`string`?`text`:i.type,value:o,range:{start:i.start,end:i.end},quote:s,jsx:i.type===`string`&&(!s||!!i.jsx),step:typeof o==`number`?Tv(o):1,...Array.isArray(a)?{options:a}:a})},i=e=>{for(let{name:t,value:n}of e.attributes)n?.type===`element`?i(n):(n?.type===`string`||n?.type===`number`||n?.type===`boolean`)&&r(e.name,t,n);let[t]=e.children,n=t?.type===`text`?t.raw.trim():``;if(e.children.length===1&&n&&!n.includes(`\n`)){let i=t.start+t.raw.indexOf(n);r(e.name,`children`,{type:`string`,value:jv(n),quote:``,start:i,end:i+n.length})}for(let t of e.children)t.type===`element`&&i(t)};return e.forEach(i),n}function Fv(e,t){let{quote:n}=e;if(typeof t!=`string`){let r=typeof t==`number`?Ev(t,e.step):`${t}`;return e.jsx&&n?`{${r}}`:r}if(!e.jsx){let e=n||`"`;return e+t.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(e,`\\\\${e}`)+e}let r=t.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return n?n+r.replaceAll(n,n===`"`?`"`:`'`)+n:r.replaceAll(`>`,`>`).replaceAll(`{`,`{`).replaceAll(`}`,`}`)}function Iv(e,t,n){let{start:r,end:i}=t.range;return e.slice(0,r)+Fv(t,n)+e.slice(i)}function Lv(e){let t=[],n=e=>{for(let r of e.attributes)!r.value&&!r.spread?t.push(r.end):r.value?.type===`element`&&n(r.value);for(let t of e.children)t.type===`element`&&n(t)};return Nv(e).forEach(n),t.reverse().reduce((e,t)=>e.slice(0,t)+`={true}`+e.slice(t),e)}var Rv=new Set(`as async await break case catch class const continue default delete do else enum export extends false finally for from function if import in instanceof interface let new null of return satisfies static switch this throw true try type typeof undefined var void while yield`.split(` `)),zv=/^(|[(,=:?[{}>&|!]|return)$/;function Bv(e){let t=[],n=[{in:`code`,depth:0}],r=0,i=``,a=t=>(t.lastIndex=r,t.exec(e)?.[0]??``),o=(e,n)=>{n&&t.push({ink:e,start:r,end:r+n}),r+=n},s=t=>{let n=r+1;for(;n<e.length&&e[n]!==t;)n+=e[n]===`\\\\`?2:1;o(`string`,Math.min(n+1,e.length)-r)};for(;r<e.length;){let t=n[n.length-1],c=e[r];if(t.in===`text`){if(c===`{`)r++,n.push({in:`code`,depth:0});else if(c===`<`)r++,e[r]===`/`?(r++,o(`tag`,a(/[\\w$.:-]*/y).length),r=Math.max(r,e.indexOf(`>`,r)+1),n.pop()):n.push({in:`tag`,named:!1});else{let t=e.slice(r).search(/[<{]/);r=t<0?e.length:r+t}continue}if(t.in===`tag`){let i=a(/[\\w$.:-]+/y);i?o(t.named?`attribute`:`tag`,i.length):c===`"`||c===`\'`?s(c):c===`{`?(r++,n.push({in:`code`,depth:0})):c===`>`?(r++,n[n.length-1]={in:`text`}):e.startsWith(`/>`,r)?(r+=2,n.pop()):r++,t.named=!0;continue}let l=a(/\\s+|\\/\\/.*|\\/\\*[\\s\\S]*?(\\*\\/|$)/y);if(l){r+=l.length;continue}let u=a(/[A-Za-z_$][\\w$]*/y);if(u){let t=e.slice(r+u.length).match(/^\\s*(\\S)/)?.[1],n=Rv.has(u)?`keyword`:t===`(`||/^[A-Z]/.test(u)?`tag`:e[r-1]===`.`||t===`:`&&i!==`?`?`attribute`:void 0;n?o(n,u.length):r+=u.length,i=u===`return`?u:`name`;continue}let d=a(/\\d[\\d_]*\\.?\\d*(e[+-]?\\d+)?n?|\\.\\d+/iy);if(d){o(`keyword`,d.length),i=`name`;continue}if(c===`"`||c===`\'`||c==="`"){s(c),i=`name`;continue}if(c===`<`&&zv.test(i)&&/[A-Za-z>]/.test(e[r+1]??``)){r++,n.push({in:`tag`,named:e[r]===`>`}),e[r]===`>`&&(r++,n[n.length-1]={in:`text`});continue}if(c===`{`&&t.depth++,c===`}`){if(t.depth===0&&n.length>1){r++,n.pop();continue}t.depth--}i=e.startsWith(`&&`,r)||e.startsWith(`||`,r)?`&`:c,r++}return t}var Vv=`.cc{--cc-surface:light-dark(#fff,oklch(17.5% 0 0));--cc-subtle:light-dark(oklch(93% 0 0),oklch(24.5% 0 0));--cc-sunken:light-dark(oklch(89.5% 0 0),oklch(21% 0 0));--cc-foreground:light-dark(oklch(22.7% .006 271.2),oklch(92.3% .004 286.3));--cc-secondary:light-dark(oklch(41.8% .014 274.6),oklch(78.2% .016 281.9));--cc-muted:light-dark(oklch(52% .044 267.6),oklch(67.3% .028 276.2));--cc-disabled:light-dark(oklch(72% .01 270),oklch(48% .01 280));--cc-text:light-dark(oklch(49% .04 268),oklch(67.3% .028 276.2));--cc-line:light-dark(oklch(59% .02 270),oklch(51% .02 276));--cc-tag:light-dark(oklch(46% .185 145.3),oklch(84.4% .185 145.3));--cc-attribute:light-dark(oklch(46% .088 229.9),oklch(85.7% .088 229.9));--cc-string:light-dark(oklch(46% .191 32.2),oklch(71.2% .191 32.2));--cc-keyword:light-dark(oklch(46% .2 317.2),oklch(76.9% .2 317.2));--cc-sans:Geist, ui-sans-serif, system-ui, sans-serif;--cc-mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--cc-ease:.24s cubic-bezier(.2, .9, .3, 1);--copy:0;--reset:0;--split:.5;--seam:min(2px, var(--split) * (100cqw - 4px), (1 - var(--split)) * (100cqw - 4px));--edge:calc(2px + var(--split) * (100cqw - 4px - var(--seam)));box-sizing:border-box;outline:1px solid var(--cc-subtle);background:var(--cc-subtle);width:100%;color:var(--cc-foreground);font:16px/24px var(--cc-sans);text-align:left;-webkit-font-smoothing:antialiased;border-radius:8px;position:relative;overflow:hidden;container-type:inline-size}.cc[data-theme=light]{color-scheme:light}.cc[data-theme=dark]{color-scheme:dark}.cc *,.cc :before,.cc :after{box-sizing:inherit}.cc-frame{background:var(--cc-surface);gap:2px;padding:2px;display:grid}.cc-split{inset:0 auto;left:calc(var(--edge) + var(--seam) / 2 - 5px);width:14px;translate:max(-8px, min(0px, (1 - var(--split)) * (100cqw - 4px - var(--seam)) - 8px));cursor:grab;touch-action:none;display:none;position:absolute}.cc-split:active{cursor:grabbing}.cc-split:before,.cc-split:after{content:"";transition:.4s linear(0, .48, 1, 1.13, 1.06, 1, .98, 1);transition-property:opacity,scale;position:absolute}.cc-split:before{top:calc(50% - 29.315px);left:calc(var(--seam) / 2 + 4px);transform-origin:1px;background:var(--cc-surface);width:9px;height:58.63px;mask:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'3 0 9 58.63\'%3E%3Cpath d=\'M3 0H4A6 6 0 0 0 8 5.66A6 6 0 0 1 12 11.31V47.31A6 6 0 0 1 8 52.97A6 6 0 0 0 4 58.63H3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(50% - 20px);left:calc(var(--seam) / 2 + 5px);transform-origin:0;background:var(--cc-disabled);border-radius:2px;width:4px;height:40px}.cc-split:not(:hover,:active):before,.cc-split:not(:hover,:active):after{opacity:0;scale:.8}.cc-split:active:before,.cc-split:active:after{scale:1.1}@container (width>=640px){.cc-frame{grid-template-columns:calc(var(--split) * (100% - var(--seam))) minmax(0, 1fr);column-gap:var(--seam)}.cc-preview{overflow:clip}.cc-code{clip-path:inset(-2px 0 0 -2px)}.cc>.cc-tab{--cut:calc(var(--edge) + var(--seam) - 2px);clip-path:polygon(-1px -1px, calc(var(--cut) + 6px) -1px, calc(var(--cut) + 6px) 0, calc(var(--cut) + 4.45px) .2px, calc(var(--cut) + 3px) .8px, calc(var(--cut) + 1.76px) 1.76px, calc(var(--cut) + .8px) 3px, calc(var(--cut) + .2px) 4.45px, var(--cut) 6px, var(--cut) calc(100% + 6px), -1px calc(100% + 6px))}.cc-split{display:block}.cc[data-only]>.cc-frame{grid-template-columns:minmax(0,1fr)}.cc[data-only]>.cc-tab{clip-path:none}}.cc{--share:.5;--seam-y:2px;--edge-y:var(--rest,0px)}.cc[data-stack]{--seam-y:min(2px, var(--share) * var(--stack), (1 - var(--share)) * var(--stack));--edge-y:calc(2px + var(--share) * (var(--stack) - var(--seam-y)))}@container (width<640px){.cc[data-stack]>.cc-frame{height:calc(var(--stack) + 4px);grid-template-rows:calc(var(--share) * (100% - var(--seam-y))) minmax(0, 1fr);row-gap:var(--seam-y)}.cc[data-stack] .cc-preview{min-height:0;overflow:clip}.cc[data-stack] .cc-code{clip-path:inset(-2px -2px 0);flex-direction:column;min-height:0;padding-top:0;display:flex}.cc[data-stack] .cc-body{flex-grow:1;min-height:0;margin-top:22px;overflow-y:auto}.cc[data-stack][data-tabs=hidden] .cc-body{margin-top:0}.cc[data-stack]>.cc-tab{clip-path:inset(-1px -7px calc(26px - var(--edge-y) - var(--seam-y)) -1px)}.cc-split{inset:auto 0;top:calc(var(--edge-y) + var(--seam-y) / 2 - 5px);width:auto;height:14px;translate:0 max(-8px, min(0px, (1 - var(--share)) * (var(--stack,100vh) - var(--seam-y)) - 8px));display:block}.cc-split:before{top:calc(var(--seam-y) / 2 + 4px);transform-origin:50% 1px;width:58.63px;height:9px;left:calc(50% - 29.315px);mask-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 3 58.63 9\'%3E%3Cpath d=\'M0 3V4A6 6 0 0 1 5.66 8A6 6 0 0 0 11.31 12H47.31A6 6 0 0 0 52.97 8A6 6 0 0 1 58.63 4V3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(var(--seam-y) / 2 + 5px);transform-origin:50% 0;width:40px;height:4px;left:calc(50% - 20px)}}.cc-preview{place-items:center;min-width:0;padding:48px 24px 24px;display:grid}.cc[data-tabs=hidden] .cc-preview{padding-top:24px}.cc[data-tabs=hidden] .cc-code{padding-top:0}.cc-problem{color:var(--cc-muted);font:14px/20px var(--cc-sans);text-align:center;margin:0}.cc-tab{--inset:0px;top:calc(var(--inset) * -1);left:calc(var(--inset) * -1);background:var(--ground);height:24px;color:var(--cc-muted);font:12px/16px var(--cc-sans);white-space:nowrap;pointer-events:none;border-bottom-right-radius:6px;align-items:center;padding:0 8px;display:flex;position:absolute}.cc-tab:before,.cc-tab:after{content:"";background:radial-gradient(circle at 100% 100%, #0000 6px, var(--ground) 6.5px);width:6px;height:6px;position:absolute}.cc-tab:before{top:var(--inset);left:100%}.cc-tab:after{top:100%;left:var(--inset)}.cc>.cc-tab{--ground:var(--cc-subtle)}.cc-code{--ground:var(--cc-surface);--tint:var(--cc-text);background:var(--cc-sunken);min-width:0;color:var(--cc-text);font:14px/24px var(--cc-mono);border-radius:6px;padding-top:22px;position:relative}.cc-code>.cc-tab{--inset:2px}.cc-body{display:flex}.cc-lines{color:var(--cc-line);text-align:right;white-space:pre;-webkit-user-select:none;user-select:none;flex-shrink:0;padding:16px 4px 16px 16px}.cc-scroll{scrollbar-width:thin;scrollbar-color:var(--cc-disabled) #0000;flex-grow:1;min-width:0;padding:16px 16px 16px 4px;overflow-x:auto}.cc .cc-scroll>code{all:unset;white-space:pre;tab-size:2;width:max-content;min-width:100%;display:block}.cc-tag{color:var(--cc-tag)}.cc-attribute{color:var(--cc-attribute)}.cc-string{--tint:var(--cc-string);color:var(--cc-string)}.cc-keyword{--tint:var(--cc-keyword);color:var(--cc-keyword)}.cc-box{all:unset;background:color-mix(in srgb, var(--tint) 14%, #0000);white-space:pre;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;border-radius:4px;margin:0 -2px;padding:0 4px;line-height:20px;display:inline-block}.cc-box:is(:hover,:focus-within,[aria-expanded=true]){background:color-mix(in srgb, var(--tint) 28%, #0000)}:is(.cc-box,.cc-action,.cc-menu>button):focus-visible{outline-offset:-2px;outline:2px solid}.cc-scrub{cursor:ew-resize;touch-action:pan-y}.cc-field{cursor:text;min-width:8px;display:inline-grid}.cc-field:after{content:attr(data-value);visibility:hidden;white-space:pre;grid-area:1/1}.cc-field>input{all:unset;grid-area:1/1;width:100%;min-width:0}.cc-menu{min-width:96px;font:14px/20px var(--cc-mono);border:0;margin:0;padding:2px;display:none;position:fixed;inset:auto}.cc-menu,.cc-code:after{background:var(--cc-subtle);color:var(--cc-secondary);border-radius:8px;box-shadow:0 8px 24px oklch(0% 0 0/.12)}.cc-menu:popover-open{gap:2px;display:grid}.cc-menu>button{all:unset;white-space:pre;cursor:pointer;border-radius:6px;align-items:center;gap:16px;height:32px;padding:0 8px;display:flex}.cc-menu>button:is(:hover,:focus){background:var(--cc-sunken);color:var(--cc-foreground)}.cc-menu>[aria-checked=true]:after{content:"\u2713";color:var(--cc-muted);margin-left:auto}.cc-code:is(:hover,:has(:focus-visible)){--copy:1}@media (hover:none){.cc-code{--copy:1}}.cc-changed{--reset:1}.cc-actions{--open:max(var(--copy), var(--reset));padding:0 calc(var(--open) * 4px) 0 0;pointer-events:auto;transition:padding var(--cc-ease);border-radius:0 0 0 6px;top:-2px;left:auto;right:-2px}.cc-actions:before,.cc-actions:after{background:radial-gradient(circle at 0 100%, #0000 6px, var(--ground) 6.5px);opacity:var(--open);transition:opacity var(--cc-ease);left:auto}.cc-actions:before{right:100%}.cc-actions:after{right:var(--inset)}.cc-slot{--shown:var(--copy);width:calc(var(--shown) * 24px);transition:width var(--cc-ease);justify-content:flex-end;display:flex;overflow:hidden}.cc-note,.cc-reset{--shown:var(--reset)}.cc-action{all:unset;width:20px;height:20px;color:var(--cc-muted);cursor:pointer;transform:translateX(calc((1 - var(--shown)) * 24px));transition:transform var(--cc-ease);border-radius:4px;flex-shrink:0;place-items:center;display:grid}.cc-action:hover{color:var(--cc-foreground)}.cc-action svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.cc-code:after{content:attr(data-note);font:12px/16px var(--cc-sans);white-space:nowrap;opacity:0;transition:opacity var(--cc-ease);pointer-events:none;padding:4px 8px;position:absolute;top:26px;right:4px}.cc-code:has(.cc-note :is(:hover,:focus)):after{opacity:1}@media (prefers-reduced-motion:reduce){.cc *{transition:none!important}}`,Hv=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),V=c(o(((e,t)=>{t.exports=Hv()}))(),1),Uv=Vv;function Wv(e,t){(0,d.useInsertionEffect)(()=>{if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.prepend(n)},[])}function Gv(e){let t=e.replace(/^\\s*\\n/,``).trimEnd().split(`\n`),n=Math.min(...t.filter(e=>e.trim()).map(e=>e.search(/\\S/)));return t.map(e=>e.slice(n)).join(`\n`)}var Kv=e=>e.kind===`boolean`||typeof e.value==`number`?`cc-box cc-keyword`:e.quote?`cc-box cc-string`:`cc-box`,qv=`M8 7.5h7.5v8H8zM12 4.5H4.5v8`,Jv=`M5 10.5l3 3 7-7`,Yv=`M5 8.5a5.5 5.5 0 1 1 .5 4.5M5 4.5v4h4`,Xv=`M16 10a6 6 0 1 1-12 0a6 6 0 0 1 12 0M10 9.5V13m0-6v.01`;function Zv({control:e,onChange:t,written:n}){let{min:r=-1/0,max:i=1/0,step:a}=e,o=e.value,s=(0,d.useRef)(null),c=i-r<1/0?Math.min(12,Math.max(2,240*a/(i-r))):6,l=()=>s.current=null,u=e=>{e=Math.min(i,Math.max(r,e)),e!==o&&t(e)};return(0,V.jsx)(`span`,{className:`${Kv(e)} cc-scrub`,role:`slider`,tabIndex:0,"aria-label":e.prop,"aria-valuenow":o,"aria-valuemin":r>-1/0?r:void 0,"aria-valuemax":i<1/0?i:void 0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),s.current={x:e.clientX,value:o}},onPointerMove:e=>{if(s.current){let t=Math.round((e.clientX-s.current.x)/c);u(s.current.value+t*a)}},onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{let t=e.shiftKey?a*10:a,n={ArrowUp:o+t,ArrowRight:o+t,ArrowDown:o-t,ArrowLeft:o-t,Home:r,End:i}[e.key];n!==void 0&&isFinite(n)&&(e.preventDefault(),u(n))},children:n})}function Qv({control:e,onChange:t,written:n}){return(0,V.jsx)(`button`,{type:`button`,className:Kv(e),"aria-label":e.prop,"aria-pressed":e.value,onClick:()=>t(!e.value),children:n})}function $v({control:e,onChange:t}){let n=`${e.value}`,{quote:r}=e;return(0,V.jsxs)(`label`,{className:Kv(e),children:[r,(0,V.jsx)(`span`,{className:`cc-field`,"data-value":n,children:(0,V.jsx)(`input`,{size:1,value:n,"aria-label":e.prop,spellCheck:!1,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.currentTarget.blur()}})}),r]})}function ey({control:e,onChange:t,written:n}){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!1),s=t=>{let n=typeof t==`string`?e.quote:``;return n+t+n},c=()=>[...r.current.children];return(0,d.useEffect)(()=>{let e=r.current,t=e=>o(e.newState===`open`),n=()=>e.matches(`:popover-open`)&&e.hidePopover();return e.addEventListener(`toggle`,t),addEventListener(`scroll`,n,!0),()=>{e.removeEventListener(`toggle`,t),removeEventListener(`scroll`,n,!0)}},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{ref:i,type:`button`,className:Kv(e),"aria-haspopup":`menu`,"aria-expanded":a,"aria-label":e.prop,onClick:e=>{let t=r.current,{left:n,bottom:i}=e.currentTarget.getBoundingClientRect();t.style.left=`${n}px`,t.style.top=`${i+4}px`,t.showPopover(),t.querySelector(`[aria-checked=true]`)?.focus()},children:n}),(0,V.jsx)(`div`,{ref:r,className:`cc-menu`,popover:`auto`,role:`menu`,onKeyDown:e=>{let t=c(),n=t.indexOf(document.activeElement),{key:r}=e,a=r.length===1&&[...t.slice(n+1),...t].find(e=>e.textContent.replace(/^\\W/,``).startsWith(r)),o=a?t.indexOf(a):{ArrowDown:n+1,ArrowUp:n-1,Home:0,End:-1}[r];r===`Escape`&&i.current.focus(),o!==void 0&&(e.preventDefault(),t.at(o%t.length).focus())},children:e.options.map(n=>(0,V.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n===e.value,onClick:()=>t(n),children:s(n)},`${n}`))})]})}function ty({source:e,tokens:t,controls:n,onChange:r}){let i=[],a=0,o=0,s=n=>{for(;a<n;){for(;o<t.length&&t[o].end<=a;)o++;let r=t[o];if(r&&r.start<=a){let t=Math.min(r.end,n);i.push((0,V.jsx)(`span`,{className:`cc-${r.ink}`,children:e.slice(a,t)},a)),a=t}else{let t=Math.min(r?.start??n,n);i.push(e.slice(a,t)),a=t}}};return n.forEach((t,n)=>{s(t.range.start);let o={control:t,written:e.slice(t.range.start,t.range.end),onChange:e=>r(t,e)},c={boolean:Qv,number:Zv,option:ey,text:$v}[t.kind];i.push((0,V.jsx)(c,{...o},`c${n}`)),a=t.range.end}),s(e.length),(0,V.jsxs)(`div`,{className:`cc-body`,children:[(0,V.jsx)(`div`,{className:`cc-lines`,"aria-hidden":!0,children:e.split(`\n`).map((e,t)=>t+1).join(`\n`)}),(0,V.jsx)(`div`,{className:`cc-scroll`,children:(0,V.jsx)(`code`,{children:i})})]})}function ny({slot:e,label:t,d:n,hidden:r,onClick:i}){return(0,V.jsx)(`span`,{className:`cc-slot${e}`,children:(0,V.jsx)(`button`,{type:`button`,className:`cc-action`,"aria-label":t,tabIndex:r?-1:0,onClick:i,children:(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":!0,children:(0,V.jsx)(`path`,{d:n})})})})}function ry({source:e,changed:t,note:n,onReset:r}){let[i,a]=(0,d.useState)(!1);return(0,V.jsxs)(`div`,{className:`cc-tab cc-actions${t?` cc-changed`:``}`,children:[n&&(0,V.jsx)(ny,{slot:` cc-note`,label:n,d:Xv,hidden:!t}),(0,V.jsx)(ny,{slot:` cc-reset`,label:`Reset code`,d:Yv,hidden:!t,onClick:r}),(0,V.jsx)(ny,{slot:``,label:i?`Copied`:`Copy code`,d:i?Jv:qv,onClick:()=>navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})})]})}var iy=(2*Math.PI/.35)**2,ay=4*Math.PI/.35;function oy(e,t,n,r){let i={min:n,closed:r===void 0?0:r*2-1,to:r??.5,home:.5,off:0,speed:0,track:1,show(){e.style.setProperty(t,`${Math.min(1,Math.max(0,i.to+i.off))}`)},jump(e){i.off=matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:i.off+i.to-e,i.to=e,o||=(a=performance.now(),requestAnimationFrame(s))},ease(e){let t=n-e;return t<=0?e:t>n/2?0:n-n/4*(1-Math.exp(-4*t/n))},stop:()=>cancelAnimationFrame(o)},a=0,o=0,s=e=>{let t=Math.min(.05,(e-a)/1e3);a=e;for(let e=0;e<t;e+=.001)i.speed-=(iy*i.off+ay*i.speed)*.001,i.off+=i.speed*.001;Math.abs(i.off)*i.track<.5?i.off=i.speed=o=0:o=requestAnimationFrame(s),i.show()};return i}function sy({start:e}){let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=t.current,r=n.parentElement,i=r.firstElementChild,a=i.firstElementChild,o=oy(r,`--split`,160,e),s=oy(r,`--share`,80),c=o,l,u=()=>c=r.clientWidth<640?s:o,d=e=>c===s?e.clientY:e.clientX,f=globalThis.ResizeObserver&&new ResizeObserver(()=>r.style.setProperty(`--rest`,`${a.offsetTop+a.offsetHeight}px`));f?.observe(a),n.onpointerdown=e=>{if(!e.button){if(e.preventDefault(),n.setPointerCapture(e.pointerId),u()===s){if(!(`stack`in r.dataset)){let e=i.clientHeight-4;s.to=s.home=a.offsetHeight/(e-2),s.show(),r.style.setProperty(`--stack`,`${e}px`),r.dataset.stack=``}s.track=i.clientHeight-6}else o.track=i.clientWidth-6;l=d(e)-c.to*c.track}},n.onpointermove=e=>{if(l===void 0)return;if(!(e.buttons&1))return p();let{track:t}=c,n=d(e)-l;if(c.closed){let e=c.closed<0?Math.min(n,0):Math.max(n-t,0);if(l+=e,n-=e,(c.closed<0?n:t-n)<c.min){c.to=n/t,c.show();return}c.closed=0}let r=c.ease(n),i=c.ease(t-n);c.closed=r?+!i:-1,c.closed?(c.jump(c.closed<0?0:1),l=d(e)-c.to*t):c.to=(r===n?t-i:r)/t,c.show()};let p=()=>{if(l===void 0)return;l=void 0;let{min:e,track:t}=c,n=c.to*t,r=Math.min(n,t-n);c.closed&&r<e/2?c.jump(c.closed<0?0:1):r<e&&(c.closed=0,c.jump((n<e?e:t-e)/t))};return n.onpointerup=n.onpointercancel=n.onlostpointercapture=p,n.ondblclick=()=>{u()===s&&!(`stack`in r.dataset)||(c.closed=0,c.jump(c.home))},()=>{o.stop(),s.stop(),f?.disconnect()}},[]),(0,V.jsx)(`div`,{ref:t,className:`cc-split`,"aria-hidden":!0})}function cy({className:e,theme:t,title:n=`Preview`,tabs:r=!0,collapsed:i,only:a,preview:o,tab:s,source:c,changed:l,note:u,onReset:d,...f}){let p=a||!i?void 0:+(i===`code`);return(0,V.jsxs)(`div`,{className:e?`cc ${e}`:`cc`,"data-theme":t,"data-tabs":r?void 0:`hidden`,"data-only":a,style:p===void 0?void 0:{"--split":p},children:[(0,V.jsxs)(`div`,{className:`cc-frame`,children:[a!==`code`&&(0,V.jsx)(`div`,{className:`cc-preview`,children:o}),a!==`preview`&&(0,V.jsxs)(`div`,{className:`cc-code`,"data-note":u,children:[r&&s,(0,V.jsx)(ry,{source:c,changed:l,note:u,onReset:d}),(0,V.jsx)(ty,{source:c,...f})]})]}),r&&a!==`code`&&(0,V.jsx)(`div`,{className:`cc-tab`,children:n}),!a&&(0,V.jsx)(sy,{start:p})]})}var ly=Symbol(),uy=e=>jv(e.split(/\\s*\\n\\s*/).filter(Boolean).join(` `));function dy(e,t){let[n,...r]=e;if(!Object.hasOwn(t,n))throw new Dv(`\\`${n}\\` is not in \\`scope\\`.`);let i=t[n];for(let e of r)i=i?.[e];if(i===void 0)throw new Dv(`\\`${e.join(`.`)}\\` is not in \\`scope\\`.`);return i}function fy(e,t){switch(e.type){case`element`:return my(e,t);case`name`:return dy(e.path,t);case`array`:return e.items.map(e=>fy(e,t));case`object`:return Object.fromEntries(e.entries.map(([e,n])=>[e,fy(n,t)]));case`null`:return null;case`undefined`:return;default:return e.value}}function py(e,t){return e.type===`text`?uy(e.raw)||null:fy(e,t)}function my(e,t){let n=e.name?/^[a-z][^.]*$/.test(e.name)?e.name:dy(e.name.split(`.`),t):d.Fragment,r={},i=t[ly];for(let a of e.attributes){let e=typeof n!=`string`&&i?.get(a.value?.start);if(e){let{name:t}=a;r[`on${t[0].toUpperCase()}${t.slice(1)}Change`]=e}a.spread?Object.assign(r,fy(a.value,t)):r[a.name]=!a.value||fy(a.value,t)}return(0,d.createElement)(n,r,...e.children.map(e=>py(e,t)))}var hy=Uv,gy=class extends d.Component{state={};static getDerivedStateFromError(e){return{problem:e instanceof Error?e.message:`${e}`}}static getDerivedStateFromProps({source:e},t){return t.source===e?null:{source:e,problem:void 0}}render(){let{problem:e}=this.state;return e?(0,V.jsx)(`p`,{className:`cc-problem`,children:e}):this.props.children}};function _y({code:e,file:t=`Code`,theme:n,note:r,className:i,scope:a,interactive:o,controls:s,onChange:c,children:l,...u}){Wv(`component-code`,hy);let f=(0,d.useMemo)(()=>{let t=Gv(e);try{return o?Lv(t):t}catch{return t}},[e,o]),[p,m]=(0,d.useState)({from:f,to:f});p.from!==f&&m({from:f,to:f});let h=p.from===f?p.to:f,g=(0,d.useMemo)(()=>Bv(h),[h]),_=(e,t)=>{let n=Iv(h,e,t);m({from:f,to:n}),c?.({prop:e.prop,value:t,code:n})},v=l,y,ee=[];if(a)try{let e=Nv(h);o&&(ee=Pv(e,s));let t={...a,[ly]:new Map(ee.map(e=>[e.range.start,t=>typeof t==typeof e.value&&_(e,t)]))};v=(0,d.createElement)(d.Fragment,null,...e.map(e=>my(e,t)))}catch(e){if(!(e instanceof Dv))throw e;y=e.message}return(0,V.jsx)(cy,{className:i,theme:n,...u,preview:y?(0,V.jsx)(`p`,{className:`cc-problem`,children:y}):(0,V.jsx)(gy,{source:h,children:v}),tab:(0,V.jsx)(`div`,{className:`cc-tab`,children:t}),source:h,changed:h!==f,note:r,onReset:()=>m({from:f,to:f}),tokens:g,controls:ee,onChange:_})}function vy(){let e=document.documentElement,t=document.currentScript.previousElementSibling,n=e=>parent.postMessage(e,`*`);addEventListener(`message`,e=>{e.source===parent&&(t.textContent=e.data.css)}),addEventListener(`error`,e=>n({problem:e.message})),addEventListener(`unhandledrejection`,e=>n({problem:`${e.reason?.message??e.reason}`})),new ResizeObserver(()=>n({height:e.getBoundingClientRect().height})).observe(e),addEventListener(`load`,()=>n({ready:!0}))}var yy=(e,t)=>e.replace(RegExp(`</${t}`,`gi`),`<\\\\/${t}`);function by(e,t,n,r){return`<!doctype html><html><head><meta charset="utf-8"><style>:root{${r}}body{margin:0}</style><style>${yy(t,`style`)}</style><script>(${vy})()<\\/script></head><body>${e}<script>${yy(n,`script`)}<\\/script></body></html>`}function xy(e,t){let n,r,i,a,o=``,s=e=>e?.contentWindow?.postMessage({css:o},`*`),c=({source:e,data:o})=>{let c=[n,r].find(t=>t&&t.contentWindow===e);if(!(!c||typeof o!=`object`||!o)&&(o.height!==void 0&&(c.style.height=`${Math.ceil(o.height)}px`),o.problem&&(c===n?t(o.problem):a??=o.problem),o.ready&&c===r)){n?.remove(),n=c,r=void 0,c.dataset.shown=``,s(c),t(a),a=void 0;let e=i;i=void 0,e?.()}};return addEventListener(`message`,c),{run(t,a,s){let c=()=>{r=document.createElement(`iframe`),r.setAttribute(`sandbox`,`allow-scripts`),r.title=`Preview`,n&&(r.style.height=n.style.height),r.srcdoc=by(t,o,a,s),e.append(r)};r?i=c:c()},css(e){o=e,s(n),s(r)},stop(){removeEventListener(`message`,c),n?.remove(),r?.remove()}}}var Sy=/^-?(?:\\d+\\.?\\d*|\\.\\d+)$/,Cy=e=>/\\.css$/i.test(e)?`css`:/\\.m?js$/i.test(e)?`js`:`html`;function wy(e,t,n,r,i,a=``){let o=Array.isArray(t);return{prop:e,kind:o?`option`:typeof n==`string`?`text`:typeof n,value:n,range:{start:r,end:i},quote:a,jsx:!1,step:typeof n==`number`?Tv(n):1,...o?{options:t}:t===!0?{}:t}}var Ty=e=>(t,n,r)=>{r&&e.push({ink:t,start:n,end:n+r})},Ey=/\\x3C!--[\\s\\S]*?(?:-->|$)|<[!/]?([A-Za-z][\\w:-]*)([^>]*)>?/g,Dy=/([^\\s"\'=<>/]+)(?:\\s*=\\s*("[^"]*"?|\'[^\']*\'?|[^\\s>]+))?/g;function Oy(e,t){let n=[],r=[],i=Ty(n),a=new RegExp(Ey),o;for(;o=a.exec(e);){let[n,s,c]=o;if(!s)continue;let l=o.index+n.indexOf(s);i(`tag`,l,s.length);let u=s.toLowerCase();for(let e of c.matchAll(Dy)){let[,n,a]=e,o=l+s.length+e.index;if(i(`attribute`,o,n.length),!a)continue;let c=o+e[0].length-a.length;i(`string`,c,a.length);let d=t[`${u}.${n}`]??t[n];if(!d)continue;let f=/^["\']/.test(a)?a[0]:``,p=f?a.slice(1,-1):a;r.push(wy(n,d,Sy.test(p)?+p:p,c,c+a.length,f))}if(n[1]!==`/`&&(u===`script`||u===`style`)){let t=e.indexOf(`</${u}`,a.lastIndex);a.lastIndex=t<0?e.length:t}}return{tokens:n,controls:r}}var ky=/(["\'])(?:\\\\.|(?!\\1)[^\\\\])*\\1?|#[\\da-f]{3,8}\\b|(?<![\\w-])-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?|!important/gi;function Ay(e,t){let n=[],r=[],i=Ty(n),a=0;for(;a<e.length;){let n=/\\s+|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/y;n.lastIndex=a;let o=n.exec(e)?.[0].length;if(o){a+=o;continue}let s=a,c=0;for(;s<e.length;){let t=e[s];if(t===`"`||t===`\'`){let n=e.indexOf(t,s+1);s=n<0?e.length:n+1;continue}if(t===`(`)c++;else if(t===`)`)c--;else if(c<=0&&/[{};]/.test(t))break;s++}let l=e.slice(a,s).trimEnd(),u=l.indexOf(`:`);if(l[0]===`@`)i(`keyword`,a,l.match(/^@[\\w-]*/)[0].length);else if(e[s]===`{`)i(`tag`,a,l.length);else if(u>0){let e=l.slice(0,u).trim();i(`attribute`,a,e.length);let n=l.slice(u+1).search(/\\S/),o=a+u+1+n,s=n<0?``:l.slice(u+1+n);for(let e of s.matchAll(ky))i(e[1]?`string`:`keyword`,o+e.index,e[0].length);let c=t[e],d=s.match(/^(-?(?:\\d+\\.?\\d*|\\.\\d+))([a-z]*|%)$/i);c&&s&&r.push(d&&(!Array.isArray(c)||!d[2])?wy(e,c,+d[1],o,o+d[1].length):wy(e,c,s,o,o+s.length))}a=s+1}return{tokens:n,controls:r}}var jy=/\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)|true|false|(["\'])(?:\\\\.|(?!\\3)[^\\\\\\n])*\\3)(?=[ \\t]*(?:[;,\\n]|$))/g;function My(e,t){let n=[];for(let r of e.matchAll(jy)){let[e,i,a,o=``]=r,s=t[i];if(!s)continue;let c=r.index+e.length-a.length,l=o?a.slice(1,-1).replace(/\\\\(.)/g,`$1`):Sy.test(a)?+a:a===`true`;n.push(wy(i,s,l,c,c+a.length,o))}return{tokens:Bv(e),controls:n}}var Ny={html:Oy,css:Ay,js:My};function Py(e,t,n){let r=typeof n==`number`?Ev(n,t.step):`${n}`;if(e===`css`)return r.replace(/[;{}<]/g,``);let{quote:i}=t;if(e===`html`){let e=r.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return i?i+e.replaceAll(i,i===`"`?`"`:`'`)+i:e}if(typeof n!=`string`)return r;let a=i||`\'`;return a+r.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(a,`\\\\${a}`).replaceAll(`\n`,`\\\\n`)+a}function Fy(e,t,n,r){let{start:i,end:a}=n.range;return t.slice(0,i)+Py(e,n,r)+t.slice(a)}var Iy=Uv+`.cc .cc-files{pointer-events:auto;padding:0 2px}.cc-files>button{all:unset;cursor:pointer;border-radius:4px;align-items:center;height:20px;padding:0 6px;display:flex}.cc-files>:hover{color:var(--cc-secondary)}.cc-files>[aria-selected=true]{background:var(--cc-sunken);color:var(--cc-foreground)}.cc-files>:focus-visible{outline-offset:-2px;outline:2px solid}.cc-run:not([hidden]){width:100%;display:grid}.cc-run>iframe{opacity:0;pointer-events:none;border:0;grid-area:1/1;width:100%}.cc-run>[data-shown]{opacity:1;pointer-events:auto}`,Ly=(e,t)=>Object.keys(e).filter(e=>Cy(e)===t).map(t=>e[t]).join(`\n`);function Ry({html:e,css:t,js:n,theme:r}){let i=(0,d.useRef)(null),a=(0,d.useRef)(null),[o,s]=(0,d.useState)();return(0,d.useEffect)(()=>{let e=xy(i.current,s);return a.current=e,e.stop},[]),(0,d.useEffect)(()=>a.current.css(t),[t]),(0,d.useEffect)(()=>{let t=matchMedia(`(prefers-color-scheme: dark)`),r=()=>{let{colorScheme:r,color:o,fontFamily:s}=getComputedStyle(i.current),c=r.includes(`dark`)&&(!r.includes(`light`)||t.matches);a.current.run(e,n,`color-scheme:${c?`dark`:`light`};color:${o};font-family:${s}`)};return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e,n,r]),(0,V.jsxs)(V.Fragment,{children:[o&&(0,V.jsx)(`p`,{className:`cc-problem`,children:o}),(0,V.jsx)(`div`,{ref:i,className:`cc-run`,hidden:!!o})]})}function zy({files:e,controls:t={},onChange:n,theme:r,note:i,className:a,...o}){Wv(`component-code-html`,Iy);let s=(0,d.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Gv(t)])),[JSON.stringify(e)]),c=Object.keys(s),[l,u]=(0,d.useState)(c[0]),f=c.includes(l)?l:c[0],[p,m]=(0,d.useState)({from:s,to:s});p.from!==s&&m({from:s,to:s});let h=p.from===s?p.to:s,g=Cy(f),{tokens:_,controls:v}=Ny[g](h[f],t);return(0,V.jsx)(cy,{className:a,theme:r,...o,preview:(0,V.jsx)(Ry,{html:Ly(h,`html`),css:Ly(h,`css`),js:Ly(h,`js`),theme:r}),tab:(0,V.jsx)(`div`,{className:`cc-tab cc-files`,role:`tablist`,children:c.map(e=>(0,V.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===f,onClick:()=>u(e),children:e},e))}),source:h[f],changed:c.some(e=>h[e]!==s[e]),note:i,onReset:()=>m({from:s,to:s}),tokens:_,controls:v,onChange:(e,t)=>{let r=Fy(g,h[f],e,t);m({from:s,to:{...h,[f]:r}}),n?.({file:f,prop:e.prop,value:t,code:r})}})}var By=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function te(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,ne||(ne=!0,ce());else{var t=n(l);t!==null&&de(te,t.startTime-e)}}var ne=!1,re=-1,ie=5,ae=-1;function oe(){return g?!0:!(e.unstable_now()-ae<ie)}function se(){if(g=!1,ne){var t=e.unstable_now();ae=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(re),re=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&oe());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&de(te,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ce():ne=!1}}}var ce;if(typeof y==`function`)ce=function(){y(se)};else if(typeof MessageChannel<`u`){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=se,ce=function(){ue.postMessage(null)}}else ce=function(){_(se,0)};function de(t,n){re=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(re),re=-1):h=!0,de(te,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ne||(ne=!0,ce()))),r},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Vy=o(((e,t)=>{t.exports=By()})),Hy=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),Uy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Hy()})),Wy=o((e=>{var t=Vy(),n=u(),r=Uy();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){e.memoizedState!==null&&be(we,e);var t=xe.current,n=nf(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function x(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),up._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);default:return``}}function S(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function C(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=me.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function _t(e,t){var n=me.p;try{return me.p=e,t()}finally{me.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[yt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\\n"\\\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&sn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));Qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(ju(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=p({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=p({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(p({},Bn,{dataTransfer:0})),Un=Mn(p({},Fn,{relatedTarget:0})),Wn=Mn(p({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(p({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(p({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(p({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(p({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(p({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(p({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(p({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(p({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=zd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){jd(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=zd(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=xi(31,n,t,a),e.elementType=se,e.lanes=o,e;case _:return Ei(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=xi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case re:return e=xi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=xi(19,n,t,a),e.elementType=ie,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:S(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:S(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ze(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else t===27?(t=qi,ff(e.type)?(e=Cf,Cf=null,qi=e):qi=t):qi=Ki?Sf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ve(null),oa=null,sa=null;function ca(e,t,n){be(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ye(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=Cd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=b.S;b.S=function(e,t){du=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=ve(null);function Na(){var e=Ma.current;return e===null?ql.pooledCache:e}function Pa(e,t){t===null?be(Ma,Ma.current):be(Ma,t.pool)}function Fa(){var e=Na();return e===null?null:{parent:xa._currentValue,pool:e}}var Ia=Error(i(460)),La=Error(i(474)),Ra=Error(i(542)),za={then:function(){}};function Ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e}throw Ua=t,Ia}}function Ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ua=e,Ia):e}}var Ua=null;function Wa(){if(Ua===null)throw Error(i(459));var e=Ua;return Ua=null,e}function Ga(e){if(e===Ia||e===Ra)throw Error(i(483))}var Ka=null,qa=0;function Ja(e){var t=qa;return qa+=1,Ka===null&&(Ka=[]),Va(Ka,e,t)}function Ya(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Xa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Ha(i)===t.type)?(t=a(t,n.props),Ya(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ya(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ya(n,t),n.return=e,n;case g:return t=ki(t,e.mode,n),t.return=e,t;case oe:return t=Ha(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ja(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Xa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Ha(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ja(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Xa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ha(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ja(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Xa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function ee(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Ha(o),ee(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return ee(e,r,Ja(o),c);if(o.$$typeof===te)return ee(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=ee(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(L&f)===f:(r&f)===f){f!==0&&f===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:eo=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uo(n[e],t)}var po=ve(null),mo=ve(0);function ho(e,t){e=eu,be(mo,e),be(po,t),eu=e|t.baseLanes}function go(){be(mo,eu),be(po,po.current)}function _o(){eu=mo.current,ye(po),ye(mo)}var vo=ve(null),yo=null;function bo(e){var t=e.alternate;be(To,To.current&1),be(vo,e),yo===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(yo=e)}function xo(e){be(To,To.current),be(vo,e),yo===null&&(yo=e)}function So(e){e.tag===22?(be(To,To.current),be(vo,e),yo===null&&(yo=e)):Co(e)}function Co(){be(To,To.current),be(vo,vo.current)}function wo(e){ye(vo),yo===e&&(yo=null),ye(To)}var To=ve(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=0,w=null,Oo=null,ko=null,Ao=!1,jo=!1,Mo=!1,No=0,Po=0,Fo=null,Io=0;function Lo(){throw Error(i(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,r,i,a){return Do=a,w=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?tc:nc,Mo=!1,a=n(r,i),Mo=!1,jo&&(a=Vo(t,n,r,i)),Bo(e),a}function Bo(e){b.H=T;var t=Oo!==null&&Oo.next!==null;if(Do=0,ko=Oo=w=null,Ao=!1,Po=0,Fo=null,t)throw Error(i(300));e===null||yc||(e=e.dependencies,e!==null&&pa(e)&&(yc=!0))}function Vo(e,t,n,r){w=e;var a=0;do{if(jo&&(Fo=null),Po=0,jo=!1,25<=a)throw Error(i(301));if(a+=1,ko=Oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}b.H=rc,o=t(n,r)}while(jo);return o}function Ho(){var e=b.H,t=e.useState()[0];return t=typeof t.then==`function`?Yo(t):t,e=e.useState()[0],(Oo===null?null:Oo.memoizedState)!==e&&(w.flags|=1024),t}function Uo(){var e=No!==0;return No=0,e}function Wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Go(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Do=0,ko=Oo=w=null,jo=!1,Po=No=0,Fo=null}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ko===null?w.memoizedState=ko=e:ko=ko.next=e,ko}function qo(){if(Oo===null){var e=w.alternate;e=e===null?null:e.memoizedState}else e=Oo.next;var t=ko===null?w.memoizedState:ko.next;if(t!==null)ko=t,Oo=e;else{if(e===null)throw w.alternate===null?Error(i(467)):Error(i(310));Oo=e,e={memoizedState:Oo.memoizedState,baseState:Oo.baseState,baseQueue:Oo.baseQueue,queue:Oo.queue,next:null},ko===null?w.memoizedState=ko=e:ko=ko.next=e}return ko}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(e){var t=Po;return Po+=1,Fo===null&&(Fo=[]),e=Va(Fo,e,t),t=w,(ko===null?t.memoizedState:ko.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?tc:nc),e}function Xo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Yo(e);if(e.$$typeof===te)return ha(e)}throw Error(i(438,String(e)))}function Zo(e){var t=null,n=w.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=w.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Jo(),w.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Qo(e,t){return typeof t==`function`?t(e):t}function $o(e){return es(qo(),Oo,e)}function es(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Do&f)===f:(L&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((Do&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,w.lanes|=p,nu|=p;f=u.action,Mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,w.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(yc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=qo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(yc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ns(e,t,n){var r=w,a=qo(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Oo||a).memoizedState,n);if(s&&(a.memoizedState=n,yc=!0),a=a.queue,Ds(as.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ko!==null&&ko.memoizedState.tag&1){if(r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||Do&127||rs(r,t,n)}return n}function rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=w.updateQueue,t===null?(t=Jo(),w.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function is(e,t,n,r){t.value=n,t.getSnapshot=r,os(t)&&ss(e)}function as(e,t,n){return n(function(){os(t)&&ss(e)})}function os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ss(e){var t=gi(e,2);t!==null&&Eu(t,e,2)}function cs(e){var t=Ko();if(typeof e==`function`){var n=e;if(e=n(),Mo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function ls(e,t,n,r){return e.baseState=n,es(e,Oo,typeof r==`function`?r:Qo)}function us(e,t,n,r,a){if(Qs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};b.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=b.T,o={};b.T=o;try{var s=n(i,r),c=b.S;c!==null&&c(o,s),fs(e,t,s)}catch(n){ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),b.T=a}}else try{a=n(i,r),fs(e,t,a)}catch(n){ms(e,t,n)}}function fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ps(e,t,n)},function(n){return ms(e,t,n)}):ps(e,t,n)}function ps(e,t,n){t.status=`fulfilled`,t.value=n,hs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ds(e,n)))}function ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,hs(t),t=t.next;while(t!==r)}e.action=null}function hs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gs(e,t){return t}function _s(e,t){if(Ji){var n=ql.formState;if(n!==null){a:{var r=w;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:t},n.queue=r,n=Ys.bind(null,w,r),r.dispatch=n,r=cs(!1),a=Zs.bind(null,w,!1,r.queue),r=Ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=us.bind(null,w,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function vs(e){return ys(qo(),Oo,e)}function ys(e,t,n){if(t=es(e,t,gs)[0],e=$o(Qo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Yo(t)}catch(e){throw e===Ia?Ra:e}else r=t;t=qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(w.flags|=2048,Ss(9,{destroy:void 0},bs.bind(null,i,n),null)),[r,a,e]}function bs(e,t){e.action=t}function xs(e){var t=qo(),n=Oo;if(n!==null)return ys(t,n,e);qo(),t=t.memoizedState,n=qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=w.updateQueue,t===null&&(t=Jo(),w.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Cs(){return qo().memoizedState}function ws(e,t,n,r){var i=Ko();w.flags|=e,i.memoizedState=Ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ts(e,t,n,r){var i=qo();r=r===void 0?null:r;var a=i.memoizedState.inst;Oo!==null&&r!==null&&Ro(r,Oo.memoizedState.deps)?i.memoizedState=Ss(t,a,n,r):(w.flags|=e,i.memoizedState=Ss(1|t,a,n,r))}function Es(e,t){ws(8390656,8,e,t)}function Ds(e,t){Ts(2048,8,e,t)}function Os(e){w.flags|=4;var t=w.updateQueue;if(t===null)t=Jo(),w.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ks(e){var t=qo().memoizedState;return Os({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function As(e,t){return Ts(4,2,e,t)}function js(e,t){return Ts(4,4,e,t)}function Ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ns(e,t,n){n=n==null?null:n.concat([e]),Ts(4,4,Ms.bind(null,t,e),n)}function Ps(){}function Fs(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Is(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ro(t,r[1]))return r[0];if(r=e(),Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Ls(e,t,n){return n===void 0||Do&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),w.lanes|=e,nu|=e,n)}function Rs(e,t,n,r){return Fr(n,t)?n:po.current===null?!(Do&42)||Do&1073741824&&!(L&261930)?(yc=!0,e.memoizedState=n):(e=Tu(),w.lanes|=e,nu|=e,t):(e=Ls(e,n,r),Fr(e,t)||(yc=!0),e)}function zs(e,t,n,r,i){var a=me.p;me.p=a!==0&&8>a?a:8;var o=b.T,s={};b.T=s,Zs(e,!1,t,n);try{var c=i(),l=b.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Xs(e,t,Aa(c,r),wu(e)):Xs(e,t,r,wu(e))}catch(n){Xs(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{me.p=a,o!==null&&s.types!==null&&(o.types=s.types),b.T=o}}function Bs(){}function Vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Hs(e).queue;zs(e,a,t,he,n===null?Bs:function(){return Us(e),n(r)})}function Hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Us(e){var t=Hs(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},wu())}function Ws(){return ha(up)}function Gs(){return qo().memoizedState}function Ks(){return qo().memoizedState}function qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=ro(n);var r=io(t,e,n);r!==null&&(Eu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Js(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e)?$s(t,n):(n=hi(e,t,n,r),n!==null&&(Eu(n,e,r),ec(n,t,r)))}function Ys(e,t,n){Xs(e,t,n,wu())}function Xs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))$s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),ql===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Eu(n,e,r),ec(n,t,r),!0}return!1}function Zs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Qs(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Eu(t,e,2)}function Qs(e){var t=e.alternate;return e===w||t!==null&&t===w}function $s(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ec(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var T={readContext:ha,use:Xo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};T.useEffectEvent=Lo;var tc={readContext:ha,use:Xo,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ws(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Ko();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ko();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Js.bind(null,w,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:function(e){e=cs(e);var t=e.queue,n=Ys.bind(null,w,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){return Ls(Ko(),e,t)},useTransition:function(){var e=cs(!1);return e=zs.bind(null,w,e.queue,!0,!1),Ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=w,a=Ko();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));L&127||rs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Es(as.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,o,n,t),null),n},useId:function(){var e=Ko(),t=ql.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Io++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:_s,useActionState:_s,useOptimistic:function(e){var t=Ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,w,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return Ko().memoizedState=qs.bind(null,w)},useEffectEvent:function(e){var t=Ko(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:$o,useRef:Cs,useState:function(){return $o(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){return Rs(qo(),Oo.memoizedState,e,t)},useTransition:function(){var e=$o(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:vs,useActionState:vs,useOptimistic:function(e,t){return ls(qo(),Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};nc.useEffectEvent=ks;var rc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:ts,useRef:Cs,useState:function(){return ts(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=qo();return Oo===null?Ls(n,e,t):Rs(n,Oo.memoizedState,e,t)},useTransition:function(){var e=ts(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:xs,useActionState:xs,useOptimistic:function(e,t){var n=qo();return Oo===null?(n.baseState=e,[e,n.queue.dispatch]):ls(n,Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};rc.useEffectEvent=ks;function ic(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=ro(n);r.tag=2,t!=null&&(r.callback=t),t=io(e,r,n),t!==null&&(Eu(t,e,n),ao(t,e,n))}};function oc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function cc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function lc(e){li(e)}function uc(e){console.error(e)}function dc(e){li(e)}function fc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function mc(e,t,n){return n=ro(n),n.tag=3,n.payload={element:null},n.callback=function(){fc(e,t)},n}function hc(e){return e=ro(e),e.tag=3,e}function gc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){pc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function _c(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=vo.current,n!==null){switch(n.tag){case 31:case 13:return yo===null?Ru():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ji)return t=vo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=mc(e.stateNode,r,a),oo(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=mc(n.stateNode,r,e),oo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=hc(a),gc(a,e,n,r),oo(n,a),!1}n=n.return}while(n!==null);return!1}var vc=Error(i(461)),yc=!1;function bc(e,t,n,r){t.child=e===null?$a(t,null,n,r):Qa(t,e.child,n,r)}function xc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=zo(e,t,n,o,a,i),s=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,bc(e,t,r,i),t.child)}function Sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Cc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!A(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Vc(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(yc=!1,t.pendingProps=r=a,A(e,i))e.flags&131072&&(yc=!0);else return t.lanes=e.lanes,Vc(e,t,i)}return Ac(e,t,n,r,i)}function wc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pa(t,a===null?null:a.cachePool),a===null?go():ho(t,a),So(t);else return r=t.lanes=536870912,Ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Pa(t,null),go(),Co(t)):(Pa(t,a.cachePool),ho(t,a),Co(t),t.memoizedState=null);return bc(e,t,i,n),t.child}function Tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ec(e,t,n,r,i){var a=Na();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Pa(t,null),go(),So(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Dc(e,t){return t=O({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function E(e,t,n){return Qa(t,e.child,null,n),e=Dc(t,t.pendingProps),e.flags|=2,wo(t),t.memoizedState=null,e}function Oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Dc(t,r),t.lanes=536870912,Tc(null,e);if(xo(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(xo(t),a)if(t.flags&256)t.flags&=-257,t=E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(yc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,yc||a){if(r=ql,r!==null&&(s=mt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Eu(r,e,s),vc;Ru(),t=E(e,t,n)}else e=o.treeContext,qi=Sf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Dc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ac(e,t,n,r,i){return ma(t),n=zo(e,t,n,r,void 0,i),r=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,i),t.child)}function D(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Vo(t,r,n,i),Bo(e),r=Uo(),e!==null&&!yc?(Wo(e,t,a),Vc(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,a),t.child)}function jc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ac,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},to(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(ic(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&ac.enqueueReplaceState(a,a.state,null),lo(t,r,a,i),co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&sc(t,a,r,o),eo=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),co(),l=t.memoizedState,s||f!==l||eo?(typeof d==`function`&&(ic(t,n,d,r),l=t.memoizedState),(c=eo||oc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,no(e,t),o=t.memoizedProps,u=cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&sc(t,a,r,c),eo=!1,f=t.memoizedState,a.state=f,lo(t,r,a,i),co();var p=t.memoizedState;o!==d||f!==p||eo||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(ic(t,n,s,r),p=t.memoizedState),(u=eo||oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,kc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Qa(t,e.child,null,i),t.child=Qa(t,null,n,i)):bc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Vc(e,t,i),e}function Mc(e,t,n,r){return na(),t.flags|=256,bc(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fa()}}function Fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ic(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(To.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(a?bo(t):Co(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Co(t),a=t.mode,c=O({mode:`hidden`,children:c},a),r=Ei(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(null,r)):(bo(t),Lc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(bo(t),t.flags&=-257,t=Rc(e,t,n)):t.memoizedState===null?(Co(t),c=r.fallback,a=t.mode,r=O({mode:`visible`,children:r.children},a),c=Ei(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Qa(t,e.child,null,n),r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,t=Tc(null,r)):(Co(t),t.child=e.child,t.flags|=128,t=null);else if(bo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Rc(e,t,n)}else if(yc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,yc||s){if(s=ql,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Eu(s,e,r),vc;yf(c)||Ru(),t=Rc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=Sf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Lc(t,r.children),t.flags|=4096);return t}return a?(Co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,a,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,Tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Pc(n):(a=c.cachePool,a===null?a=Fa():(l=xa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(e.child,r)):(bo(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=O({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function O(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Rc(e,t,n){return Qa(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function k(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=To.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,be(To,o),bc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zc(e,n,t);else if(e.tag===19)zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bc(t,!0,n,null,a,r);break;case`together`:Bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function A(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function j(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(bo(t),e=Vc(e,t,n),e===null?null:e.sibling):Ic(e,t,n):(bo(t),t.flags|=128,null);bo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return k(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(To,To.current),r)break;return null;case 22:return t.lanes=0,wc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Vc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yc=!0;else{if(!A(e,n)&&!(t.flags&128))return yc=!1,j(e,t,n);yc=!!(e.flags&131072)}else yc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ha(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=cc(e,r),t.tag=1,t=jc(null,t,e,r,n)):(t.tag=0,t=Ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=xc(null,t,e,r,n);break a}else if(a===ae){t.tag=14,t=Sc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=cc(r,t.pendingProps),jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,no(e,t),lo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),co(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Mc(e,t,r,n);break a}else if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=Sf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===a){t=Vc(e,t,n);break a}bc(e,t,r,n)}t=t.child}return t;case 26:return kc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=ef(Ce.current).createElement(n),r[yt]=t,r[bt]=e,Jd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=Ef(t.type,t.pendingProps,Ce.current),Ki=t,Xi=!0,a=qi,ff(t.type)?(Cf=a,qi=Sf(r.firstChild)):qi=a),bc(e,t,t.pendingProps.children,n),kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=gf(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=Sf(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=zo(e,t,Ho,null,null,n),up._currentValue=a),kc(e,t),bc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=_f(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Ic(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):bc(e,t,r,n),t.child;case 11:return xc(e,t,t.type,t.pendingProps,n);case 7:return bc(e,t,t.pendingProps,n),t.child;case 8:return bc(e,t,t.pendingProps.children,n),t.child;case 12:return bc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),bc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,bc(e,t,r,n),t.child;case 14:return Sc(e,t,t.type,t.pendingProps,n);case 15:return Cc(e,t,t.type,t.pendingProps,n);case 19:return k(e,t,n);case 31:return Oc(e,t,n);case 22:return wc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Na(),a===null&&(a=ql,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},to(t),ca(t,xa,a)):((e.lanes&n)!==0&&(no(e,t),lo(t,null,null,n),co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),bc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function M(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Ua=za,La}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!R(t))if(Fu())e.flags|=8192;else throw Ua=za,La}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ou|=t)}function Kc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?M(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),qc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(M(t),o===null?(qc(t),Uc(t,a,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(M(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&M(t),qc(t),Uc(t,a,e,r,n)),null;case 27:if(x(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}e=xe.current,ta(t)?$i(t,e):(e=Ef(a,r,n),t.stateNode=e,M(t))}return qc(t),null;case 5:if(x(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}if(o=xe.current,ta(t))$i(t,o);else{var s=ef(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&M(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Qi(t,!0)}else e=ef(e).createTextNode(r),e[yt]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return Ee(),e===null&&Fd(t.stateNode.containerInfo),qc(t),null;case 10:return la(t.type),qc(t),null;case 19:if(ye(To),r=t.memoizedState,r===null)return qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Kc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return be(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>fu&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return qc(t),null}else 2*ze()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,be(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return x(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(To),null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&ye(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function P(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:x(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:ye(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&ye(Ma);break;case 24:la(xa)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function F(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function I(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[bt]=t}catch(t){nd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[yt]=e,t[bt]=n}catch(t){nd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Qd=yp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},yp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=cc(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&Yc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Dl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{fo(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Qc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:sl||I(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||I(n,t);var r=ml,i=hl;ff(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Df(n.stateNode),ml=r,hl=i;break;case 5:sl||I(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):pf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:F(2,n,t),sl||F(4,n,t),gl(e,t,n);break;case 1:sl||(I(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){nd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){nd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(F(3,e,e.return),Yc(3,e),F(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else np(a,e.type,e.stateNode);else e.stateNode=Xf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(a,e.type,e.stateNode):Xf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),e.flags&32){a=e.stateNode;try{an(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(ep=null,a=Cl,Cl=Af(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){nd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=Af(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:F(4,t,t.return),Ol(t);break;case 1:I(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),Ol(t);break;case 27:Df(t.stateNode);case 26:case 5:I(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),Yc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)uo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Qc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Qc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&z(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=Af(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&F(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:F(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:F(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,L=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Kl&2&&L!==0?L&-L:b.T===null?gt():Cd()}function Tu(){if(au===0)if(!(L&536870912)||Ji){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),au=e}else au=536870912;return e=vo.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===ql&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,L,au,!1)),ut(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(ru|=n),tu===4&&Au(e,L,au,!1)),hd(e))}function Du(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-ze(),10<a)){if(Au(r,t,au,!Zl),at(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Rl(t,a,d);var m=(a&62914560)===a?uu-ze():(a&4194048)===a?du-ze():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function ju(){return Kl&6?!0:(gd(0,!1),!1)}function Mu(){if(Jl!==null){if(Yl===0)var e=Jl.return;else e=Jl,sa=oa=null,Go(e),Ka=null,qa=0,e=Jl;for(;e!==null;)P(e.alternate,e),e=e.return;Jl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),ql=e,Jl=n=Ci(e.current,null),L=t,Yl=0,Xl=null,Zl=!1,Ql=ot(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,pi(),n}function Pu(e,t){w=null,b.H=T,t===Ia||t===Ra?(t=Wa(),Yl=3):t===La?(t=Wa(),Yl=4):Yl=t===vc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,Jl===null&&(tu=1,fc(e,ji(t,e.current)))}function Fu(){var e=vo.current;return e===null?!0:(L&4194048)===L?yo===null:(L&62914560)===L||L&536870912?e===yo:!1}function Iu(){var e=b.H;return b.H=T,e===null?T:e}function Lu(){var e=b.A;return b.A=Wl,e}function Ru(){tu=4,Zl||(L&4194048)!==L&&vo.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||ql===null||Au(ql,L,au,!1)}function zu(e,t,n){var r=Kl;Kl|=2;var i=Iu(),a=Lu();(ql!==e||L!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&Jl!==null){var s=Jl,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:vo.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Gu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Gu(e,s,c,l)}}Bu(),o=tu;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Kl=r,b.H=i,b.A=a,Jl===null&&(ql=null,L=0,pi()),o}function Bu(){for(;Jl!==null;)Uu(Jl)}function Vu(e,t){var n=Kl;Kl|=2;var r=Iu(),a=Lu();ql!==e||L!==t?(pu=null,fu=ze()+500,Nu(e,t)):Ql=ot(e,t);a:do try{if(Yl!==0&&Jl!==null){t=Jl;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Gu(e,t,o,1);break;case 2:case 9:if(Ba(o)){Yl=0,Xl=null,Wu(t);break}t=function(){Yl!==2&&Yl!==9||ql!==e||(Yl=7),hd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ba(o)?(Yl=0,Xl=null,Wu(t)):(Yl=0,Xl=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?R(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,Ku(u))}break b}}Yl=0,Xl=null,Gu(e,t,o,5);break;case 6:Yl=0,Xl=null,Gu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return sa=oa=null,b.H=r,b.A=a,Kl=n,Jl===null?(ql=null,L=0,pi(),tu):0}function Hu(){for(;Jl!==null&&!Le();)Uu(Jl)}function Uu(e){var t=Hc(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=D(n,t,t.pendingProps,t.type,void 0,L);break;case 11:t=D(n,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:Go(t);default:P(n,t),t=Jl=wi(t,eu),t=Hc(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Gu(e,t,n,r){sa=oa=null,Go(t),Ka=null,qa=0;var i=t.return;try{if(_c(e,i,t,n,L)){tu=1,fc(e,ji(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;tu=1,fc(e,ji(n,e.current)),Jl=null;return}t.flags&32768?(Ji||r===1?e=!0:Ql||L&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=vo.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,Zl);return}e=t.return;var n=N(t.alternate,t,eu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);tu===0&&(tu=5)}function qu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);tu=6,Jl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(hu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=fi,dt(e,n,o,s,c,l),e===ql&&(Jl=ql=null,L=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ue,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=b.T,b.T=null,a=me.p,me.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,me.p=a,b.T=r}}hu=1,Yu(),Xu(),Zu()}}function Yu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=$d,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var ee=d[s];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}yp=!!Qd,$d=Qd=null}finally{Kl=i,me.p=r,b.T=n}}e.current=t,hu=2}}function Xu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,me.p=r,b.T=n}}hu=3}}function Zu(){if(hu===4||hu===3){hu=0,Re();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),C(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=b.T,i=me.p,me.p=2,b.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{b.T=t,me.p=i}}vu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=C(vu),r=b.T,a=me.p;try{me.p=32>n?32:n,b.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,gd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{me.p=a,b.T=r,Qu(e,t)}}function td(e,t,n){t=ji(n,t),t=mc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=ji(n,e),n=hc(2),r=io(t,n,2),r!==null&&(gc(n,r,t,e),ut(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(L&n)===n&&(tu===4||tu===3&&(L&62914560)===L&&300>ze()-uu?!(Kl&2)&&Nu(e,0):iu|=n,ou===L&&(ou=0)),hd(e)}function ad(e,t){t===0&&(t=ct()),e=gi(e,t),e!==null&&(ut(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Fe(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=L,a=at(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=ze(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}hu!==0&&hu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=L,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),C(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=bd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=L;return r=at(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,ze()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){Kl&6?Fe(Ve,_d):vd()})}function Cd(){if(md===0){var e=Ea;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<si.length;Dd++){var Od=si[Dd];ci(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:At(l),h=u==null?c:At(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Cr;else if(_r(c))if(wr)v=Nr;else{v=jr;var y=Ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&en(c,`number`,c.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var ee;if(ar)b:{switch(e){case`compositionstart`:var te=`onCompositionStart`;break b;case`compositionend`:te=`onCompositionEnd`;break b;case`compositionupdate`:te=`onCompositionUpdate`;break b}te=void 0}else pr?dr(e,n)&&(te=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(te=`onCompositionStart`);te&&(cr&&n.locale!==`ko`&&(pr||te!==`onCompositionStart`?te===`onCompositionEnd`&&pr&&(ee=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=zd(r,te),0<y.length&&(te=new Kn(te,e,null,n,i),s.push({event:te,listeners:y}),ee?te.data=ee:(ee=fr(n),ee!==null&&(te.data=ee)))),(ee=sr?mr(e,n):hr(e,n))&&(te=zd(r,`onBeforeInput`),0<te.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:te}),y.data=ee)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=xn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\\r\\n?/g,Ud=/\\u0000|\\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`\n`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Kd(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Md(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Kd(e,t,s,c,n,null)}rn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);Gp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=me.d;me.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=ju();return e||t}function Nf(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Us(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=jt(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Mt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var a=(a=Ce.current)?Af(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=jt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=jt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wf(e){return`href="`+Zt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Zt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Jd(r,`style`,a),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wf(n.href);var o=e.querySelector(Gf(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Kf(n),(a=Of.get(a))&&Qf(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(a=e.querySelector(Yf(o)))?(t.instance=a,Mt(a),a):(r=n,(a=Of.get(o))&&(r=p({},n),$f(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function R(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function z(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:te,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},to(a),e}function pp(e){return e?(e=yi,e):yi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=ro(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=io(e,r,t),n!==null&&(Eu(n,e,t),ao(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=ht(t);var n=gi(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=2,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function xp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=8,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Ld(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}hd(a),!(Kl&6)&&(fu=ze()+500,gd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Eu(s,a,2),ju(),gp(a,2)}if(a=Cp(r),a===null&&Ld(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Cp(e){return e=hn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function B(e){this._internalRoot=e}qp.prototype.render=B.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=B.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ju(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:b,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Je=Xp.inject(Yp),Ye=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=lc,s=uc,c=dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[xt]=t.current,Fd(e),new B(t)}})),Gy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Wy()}))(),Ky=`0.4.0`,qy=A({source:T().describe("The component\'s module in TSX. It may import only from \'react\'. Its exports, the default one by its function\'s name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:T().describe(`How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control.`),file:T().optional().describe("The file named in the code\'s tab, such as `Card.tsx`."),controls:N(T(),M([F(!1),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),Jy=A({files:N(T(),T()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page\'s body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:N(T(),M([F(!0),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")}),Yy={tsx:`tsx`,jsx:`jsx`,ts:`ts`,js:`js`,html:`html`,css:`css`},Xy=(e,t)=>`\\`${e}\\`\\n\\n\\`\\`\\`${Yy[e.split(`.`).pop()??``]??``}\\n${t}\\n\\`\\`\\``;function Zy({prop:e,value:t,files:n,file:r,problem:i}){return[`In Component Code, the user set \\`${e}\\` to \\`${typeof t==`string`?JSON.stringify(t):`${t}`}\\` in \\`${r}\\`. The preview now runs this code, which is its whole state:`,...Object.entries(n).map(([e,t])=>Xy(e,t)),i?`The preview throws instead of rendering: ${i}`:`The preview renders without throwing.`].join(`\n\n`)}var H;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(H||={});var U;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(U||={});function Qy(e){switch(e){case U.num:return`num`;case U.bigint:return`bigint`;case U.decimal:return`decimal`;case U.regexp:return`regexp`;case U.string:return`string`;case U.name:return`name`;case U.eof:return`eof`;case U.bracketL:return`[`;case U.bracketR:return`]`;case U.braceL:return`{`;case U.braceBarL:return`{|`;case U.braceR:return`}`;case U.braceBarR:return`|}`;case U.parenL:return`(`;case U.parenR:return`)`;case U.comma:return`,`;case U.semi:return`;`;case U.colon:return`:`;case U.doubleColon:return`::`;case U.dot:return`.`;case U.question:return`?`;case U.questionDot:return`?.`;case U.arrow:return`=>`;case U.template:return`template`;case U.ellipsis:return`...`;case U.backQuote:return"`";case U.dollarBraceL:return"${";case U.at:return`@`;case U.hash:return`#`;case U.eq:return`=`;case U.assign:return`_=`;case U.preIncDec:return`++/--`;case U.postIncDec:return`++/--`;case U.bang:return`!`;case U.tilde:return`~`;case U.pipeline:return`|>`;case U.nullishCoalescing:return`??`;case U.logicalOR:return`||`;case U.logicalAND:return`&&`;case U.bitwiseOR:return`|`;case U.bitwiseXOR:return`^`;case U.bitwiseAND:return`&`;case U.equality:return`==/!=`;case U.lessThan:return`<`;case U.greaterThan:return`>`;case U.relationalOrEqual:return`<=/>=`;case U.bitShiftL:return`<<`;case U.bitShiftR:return`>>/>>>`;case U.plus:return`+`;case U.minus:return`-`;case U.modulo:return`%`;case U.star:return`*`;case U.slash:return`/`;case U.exponent:return`**`;case U.jsxName:return`jsxName`;case U.jsxText:return`jsxText`;case U.jsxEmptyText:return`jsxEmptyText`;case U.jsxTagStart:return`jsxTagStart`;case U.jsxTagEnd:return`jsxTagEnd`;case U.typeParameterStart:return`typeParameterStart`;case U.nonNullAssertion:return`nonNullAssertion`;case U._break:return`break`;case U._case:return`case`;case U._catch:return`catch`;case U._continue:return`continue`;case U._debugger:return`debugger`;case U._default:return`default`;case U._do:return`do`;case U._else:return`else`;case U._finally:return`finally`;case U._for:return`for`;case U._function:return`function`;case U._if:return`if`;case U._return:return`return`;case U._switch:return`switch`;case U._throw:return`throw`;case U._try:return`try`;case U._var:return`var`;case U._let:return`let`;case U._const:return`const`;case U._while:return`while`;case U._with:return`with`;case U._new:return`new`;case U._this:return`this`;case U._super:return`super`;case U._class:return`class`;case U._extends:return`extends`;case U._export:return`export`;case U._import:return`import`;case U._yield:return`yield`;case U._null:return`null`;case U._true:return`true`;case U._false:return`false`;case U._in:return`in`;case U._instanceof:return`instanceof`;case U._typeof:return`typeof`;case U._void:return`void`;case U._delete:return`delete`;case U._async:return`async`;case U._get:return`get`;case U._set:return`set`;case U._declare:return`declare`;case U._readonly:return`readonly`;case U._abstract:return`abstract`;case U._static:return`static`;case U._public:return`public`;case U._private:return`private`;case U._protected:return`protected`;case U._override:return`override`;case U._as:return`as`;case U._enum:return`enum`;case U._type:return`type`;case U._implements:return`implements`;default:return``}}var $y=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},eb=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},tb=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=U.eof}__init8(){this.contextualKeyword=H.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new eb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},W;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(W||={});var nb,rb,ib,G,K,ab;function ob(){return ab++}function sb(e){if(`pos`in e){let t=lb(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var cb=class{constructor(e,t){this.line=e,this.column=t}};function lb(e){let t=1,n=1;for(let r=0;r<e;r++)K.charCodeAt(r)===W.lineFeed?(t++,n=1):n++;return new cb(t,n)}function ub(e,t,n,r){K=e,G=new tb,ab=1,nb=t,rb=n,ib=r}function q(e){return G.contextualKeyword===e}function db(e){let t=Ub();return t.type===U.name&&t.contextualKeyword===e}function fb(e){return G.contextualKeyword===e&&Z(U.name)}function pb(e){fb(e)||yb()}function mb(){return Q(U.eof)||Q(U.braceR)||hb()}function hb(){let e=G.tokens[G.tokens.length-1],t=e?e.end:0;for(let e=t;e<G.start;e++){let t=K.charCodeAt(e);if(t===W.lineFeed||t===W.carriageReturn||t===8232||t===8233)return!0}return!1}function gb(){let e=Wb();for(let t=G.end;t<e;t++){let e=K.charCodeAt(t);if(e===W.lineFeed||e===W.carriageReturn||e===8232||e===8233)return!0}return!1}function _b(){return Z(U.semi)||mb()}function vb(){_b()||yb(`Unexpected token, expected ";"`)}function J(e){Z(e)||yb(`Unexpected token, expected "${Qy(e)}"`)}function yb(e=`Unexpected token`,t=G.start){if(G.error)return;let n=SyntaxError(e);n.pos=t,G.error=n,G.pos=K.length,Qb(U.eof)}var bb=[9,11,12,W.space,W.nonBreakingSpace,W.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],xb=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,Sb=new Uint8Array(65536);for(let e of bb)Sb[e]=1;function Cb(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var wb=new Uint8Array(65536);for(let e=0;e<128;e++)wb[e]=+!!Cb(e);for(let e=128;e<65536;e++)wb[e]=1;for(let e of bb)wb[e]=0;wb[8232]=0,wb[8233]=0;var Tb=wb.slice();for(let e=W.digit0;e<=W.digit9;e++)Tb[e]=0;var Eb=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,H._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,H._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,H._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,H._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,H._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,H._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(U._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(U._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,H._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(U._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(U._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(U._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,H._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(U._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(U._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(U._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,H._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(U._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,H._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(U._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,H._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(U._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,H._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(U._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,H._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,H._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,H._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,H._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,H._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(U._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(U._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(U._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(U._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Db(){let e=0,t=0,n=G.pos;for(;n<K.length&&(t=K.charCodeAt(n),!(t<W.lowercaseA||t>W.lowercaseZ));){let r=Eb[e+(t-W.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Eb[e];if(r>-1&&!wb[t]){G.pos=n,r&1?Qb(r>>>1):Qb(U.name,r>>>1);return}for(;n<K.length;){let e=K.charCodeAt(n);if(wb[e])n++;else if(e===W.backslash){if(n+=2,K.charCodeAt(n)===W.leftCurlyBrace){for(;n<K.length&&K.charCodeAt(n)!==W.rightCurlyBrace;)n++;n++}}else if(e===W.atSign&&K.charCodeAt(n+1)===W.atSign)n+=2;else break}G.pos=n,Qb(U.name)}var Y;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(Y||={});var Ob;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})(Ob||={});function kb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Ab(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function jb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ImportDeclaration}function Mb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Nb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration}function Pb(e){return e.identifierRole===Y.ObjectShorthandTopLevelDeclaration||e.identifierRole===Y.ObjectShorthandBlockScopedDeclaration||e.identifierRole===Y.ObjectShorthandFunctionScopedDeclaration}var Fb=class{constructor(){this.type=G.type,this.contextualKeyword=G.contextualKeyword,this.start=G.start,this.end=G.end,this.scopeDepth=G.scopeDepth,this.isType=G.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function X(){G.tokens.push(new Fb),qb()}function Ib(){G.tokens.push(new Fb),G.start=G.pos,_x()}function Lb(){G.type===U.assign&&--G.pos,fx()}function Rb(e){for(let t=G.tokens.length-e;t<G.tokens.length;t++)G.tokens[t].isType=!0;let t=G.isType;return G.isType=!0,t}function zb(e){G.isType=e}function Z(e){return Q(e)?(X(),!0):!1}function Bb(e){let t=G.isType;G.isType=!0,Z(e),G.isType=t}function Q(e){return G.type===e}function Vb(){let e=G.snapshot();X();let t=G.type;return G.restoreFromSnapshot(e),t}var Hb=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function Ub(){let e=G.snapshot();X();let t=G.type,n=G.contextualKeyword;return G.restoreFromSnapshot(e),new Hb(t,n)}function Wb(){return Gb(G.pos)}function Gb(e){return xb.lastIndex=e,e+xb.exec(K)[0].length}function Kb(){return K.charCodeAt(Wb())}function qb(){if(Zb(),G.start=G.pos,G.pos>=K.length){let e=G.tokens;e.length>=2&&e[e.length-1].start>=K.length&&e[e.length-2].start>=K.length&&yb(`Unexpectedly reached the end of input.`),Qb(U.eof);return}Jb(K.charCodeAt(G.pos))}function Jb(e){Tb[e]||e===W.backslash||e===W.atSign&&K.charCodeAt(G.pos+1)===W.atSign?Db():ux(e)}function Yb(){for(;K.charCodeAt(G.pos)!==W.asterisk||K.charCodeAt(G.pos+1)!==W.slash;)if(G.pos++,G.pos>K.length){yb(`Unterminated comment`,G.pos-2);return}G.pos+=2}function Xb(e){let t=K.charCodeAt(G.pos+=e);if(G.pos<K.length)for(;t!==W.lineFeed&&t!==W.carriageReturn&&t!==W.lineSeparator&&t!==W.paragraphSeparator&&++G.pos<K.length;)t=K.charCodeAt(G.pos)}function Zb(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);switch(e){case W.carriageReturn:K.charCodeAt(G.pos+1)===W.lineFeed&&++G.pos;case W.lineFeed:case W.lineSeparator:case W.paragraphSeparator:++G.pos;break;case W.slash:switch(K.charCodeAt(G.pos+1)){case W.asterisk:G.pos+=2,Yb();break;case W.slash:Xb(2);break;default:return}break;default:if(Sb[e])++G.pos;else return}}}function Qb(e,t=H.NONE){G.end=G.pos,G.type=e,G.contextualKeyword=t}function $b(){let e=K.charCodeAt(G.pos+1);if(e>=W.digit0&&e<=W.digit9){hx(!0);return}e===W.dot&&K.charCodeAt(G.pos+2)===W.dot?(G.pos+=3,Qb(U.ellipsis)):(++G.pos,Qb(U.dot))}function ex(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.slash,1)}function tx(e){let t=e===W.asterisk?U.star:U.modulo,n=1,r=K.charCodeAt(G.pos+1);e===W.asterisk&&r===W.asterisk&&(n++,r=K.charCodeAt(G.pos+2),t=U.exponent),r===W.equalsTo&&K.charCodeAt(G.pos+2)!==W.greaterThan&&(n++,t=U.assign),dx(t,n)}function nx(e){let t=K.charCodeAt(G.pos+1);if(t===e){K.charCodeAt(G.pos+2)===W.equalsTo?dx(U.assign,3):dx(e===W.verticalBar?U.logicalOR:U.logicalAND,2);return}if(e===W.verticalBar){if(t===W.greaterThan){dx(U.pipeline,2);return}else if(t===W.rightCurlyBrace&&ib){dx(U.braceBarR,2);return}}if(t===W.equalsTo){dx(U.assign,2);return}dx(e===W.verticalBar?U.bitwiseOR:U.bitwiseAND,1)}function rx(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.bitwiseXOR,1)}function ix(e){let t=K.charCodeAt(G.pos+1);if(t===e){dx(U.preIncDec,2);return}t===W.equalsTo?dx(U.assign,2):e===W.plusSign?dx(U.plus,1):dx(U.minus,1)}function ax(){let e=K.charCodeAt(G.pos+1);if(e===W.lessThan){if(K.charCodeAt(G.pos+2)===W.equalsTo){dx(U.assign,3);return}G.isType?dx(U.lessThan,1):dx(U.bitShiftL,2);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.lessThan,1)}function ox(){if(G.isType){dx(U.greaterThan,1);return}let e=K.charCodeAt(G.pos+1);if(e===W.greaterThan){let e=K.charCodeAt(G.pos+2)===W.greaterThan?3:2;if(K.charCodeAt(G.pos+e)===W.equalsTo){dx(U.assign,e+1);return}dx(U.bitShiftR,e);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.greaterThan,1)}function sx(){G.type===U.greaterThan&&(--G.pos,ox())}function cx(e){let t=K.charCodeAt(G.pos+1);if(t===W.equalsTo){dx(U.equality,K.charCodeAt(G.pos+2)===W.equalsTo?3:2);return}if(e===W.equalsTo&&t===W.greaterThan){G.pos+=2,Qb(U.arrow);return}dx(e===W.equalsTo?U.eq:U.bang,1)}function lx(){let e=K.charCodeAt(G.pos+1),t=K.charCodeAt(G.pos+2);e===W.questionMark&&!(ib&&G.isType)?t===W.equalsTo?dx(U.assign,3):dx(U.nullishCoalescing,2):e===W.dot&&!(t>=W.digit0&&t<=W.digit9)?(G.pos+=2,Qb(U.questionDot)):(++G.pos,Qb(U.question))}function ux(e){switch(e){case W.numberSign:++G.pos,Qb(U.hash);return;case W.dot:$b();return;case W.leftParenthesis:++G.pos,Qb(U.parenL);return;case W.rightParenthesis:++G.pos,Qb(U.parenR);return;case W.semicolon:++G.pos,Qb(U.semi);return;case W.comma:++G.pos,Qb(U.comma);return;case W.leftSquareBracket:++G.pos,Qb(U.bracketL);return;case W.rightSquareBracket:++G.pos,Qb(U.bracketR);return;case W.leftCurlyBrace:ib&&K.charCodeAt(G.pos+1)===W.verticalBar?dx(U.braceBarL,2):(++G.pos,Qb(U.braceL));return;case W.rightCurlyBrace:++G.pos,Qb(U.braceR);return;case W.colon:K.charCodeAt(G.pos+1)===W.colon?dx(U.doubleColon,2):(++G.pos,Qb(U.colon));return;case W.questionMark:lx();return;case W.atSign:++G.pos,Qb(U.at);return;case W.graveAccent:++G.pos,Qb(U.backQuote);return;case W.digit0:{let e=K.charCodeAt(G.pos+1);if(e===W.lowercaseX||e===W.uppercaseX||e===W.lowercaseO||e===W.uppercaseO||e===W.lowercaseB||e===W.uppercaseB){mx();return}}case W.digit1:case W.digit2:case W.digit3:case W.digit4:case W.digit5:case W.digit6:case W.digit7:case W.digit8:case W.digit9:hx(!1);return;case W.quotationMark:case W.apostrophe:gx(e);return;case W.slash:ex();return;case W.percentSign:case W.asterisk:tx(e);return;case W.verticalBar:case W.ampersand:nx(e);return;case W.caret:rx();return;case W.plusSign:case W.dash:ix(e);return;case W.lessThan:ax();return;case W.greaterThan:ox();return;case W.equalsTo:case W.exclamationMark:cx(e);return;case W.tilde:dx(U.tilde,1);return;default:break}yb(`Unexpected character \'${String.fromCharCode(e)}\'`,G.pos)}function dx(e,t){G.pos+=t,Qb(e)}function fx(){let e=G.pos,t=!1,n=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated regular expression`,e);return}let r=K.charCodeAt(G.pos);if(t)t=!1;else{if(r===W.leftSquareBracket)n=!0;else if(r===W.rightSquareBracket&&n)n=!1;else if(r===W.slash&&!n)break;t=r===W.backslash}++G.pos}++G.pos,vx(),Qb(U.regexp)}function px(){for(;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e===W.underscore)G.pos++;else break}}function mx(){for(G.pos+=2;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF||e===W.underscore)G.pos++;else break}K.charCodeAt(G.pos)===W.lowercaseN?(++G.pos,Qb(U.bigint)):Qb(U.num)}function hx(e){let t=!1,n=!1;e||px();let r=K.charCodeAt(G.pos);if(r===W.dot&&(++G.pos,px(),r=K.charCodeAt(G.pos)),(r===W.uppercaseE||r===W.lowercaseE)&&(r=K.charCodeAt(++G.pos),(r===W.plusSign||r===W.dash)&&++G.pos,px(),r=K.charCodeAt(G.pos)),r===W.lowercaseN?(++G.pos,t=!0):r===W.lowercaseM&&(++G.pos,n=!0),t){Qb(U.bigint);return}if(n){Qb(U.decimal);return}Qb(U.num)}function gx(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}let t=K.charCodeAt(G.pos);if(t===W.backslash)G.pos++;else if(t===e)break;G.pos++}G.pos++,Qb(U.string)}function _x(){for(;;){if(G.pos>=K.length){yb(`Unterminated template`);return}let e=K.charCodeAt(G.pos);if(e===W.graveAccent||e===W.dollarSign&&K.charCodeAt(G.pos+1)===W.leftCurlyBrace){if(G.pos===G.start&&Q(U.template))if(e===W.dollarSign){G.pos+=2,Qb(U.dollarBraceL);return}else{++G.pos,Qb(U.backQuote);return}Qb(U.template);return}e===W.backslash&&G.pos++,G.pos++}}function vx(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);if(wb[e])G.pos++;else if(e===W.backslash){if(G.pos+=2,K.charCodeAt(G.pos)===W.leftCurlyBrace){for(;G.pos<K.length&&K.charCodeAt(G.pos)!==W.rightCurlyBrace;)G.pos++;G.pos++}}else break}}function yx(e,t=e.currentIndex()){let n=t+1;if(bx(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,bx(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function bx(e,t){let n=e.tokens[t];return n.type===U.braceR||n.type===U.comma}var xx=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`\'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\\xA0`],[`iexcl`,`\xA1`],[`cent`,`\xA2`],[`pound`,`\xA3`],[`curren`,`\xA4`],[`yen`,`\xA5`],[`brvbar`,`\xA6`],[`sect`,`\xA7`],[`uml`,`\xA8`],[`copy`,`\xA9`],[`ordf`,`\xAA`],[`laquo`,`\xAB`],[`not`,`\xAC`],[`shy`,`\xAD`],[`reg`,`\xAE`],[`macr`,`\xAF`],[`deg`,`\xB0`],[`plusmn`,`\xB1`],[`sup2`,`\xB2`],[`sup3`,`\xB3`],[`acute`,`\xB4`],[`micro`,`\xB5`],[`para`,`\xB6`],[`middot`,`\xB7`],[`cedil`,`\xB8`],[`sup1`,`\xB9`],[`ordm`,`\xBA`],[`raquo`,`\xBB`],[`frac14`,`\xBC`],[`frac12`,`\xBD`],[`frac34`,`\xBE`],[`iquest`,`\xBF`],[`Agrave`,`\xC0`],[`Aacute`,`\xC1`],[`Acirc`,`\xC2`],[`Atilde`,`\xC3`],[`Auml`,`\xC4`],[`Aring`,`\xC5`],[`AElig`,`\xC6`],[`Ccedil`,`\xC7`],[`Egrave`,`\xC8`],[`Eacute`,`\xC9`],[`Ecirc`,`\xCA`],[`Euml`,`\xCB`],[`Igrave`,`\xCC`],[`Iacute`,`\xCD`],[`Icirc`,`\xCE`],[`Iuml`,`\xCF`],[`ETH`,`\xD0`],[`Ntilde`,`\xD1`],[`Ograve`,`\xD2`],[`Oacute`,`\xD3`],[`Ocirc`,`\xD4`],[`Otilde`,`\xD5`],[`Ouml`,`\xD6`],[`times`,`\xD7`],[`Oslash`,`\xD8`],[`Ugrave`,`\xD9`],[`Uacute`,`\xDA`],[`Ucirc`,`\xDB`],[`Uuml`,`\xDC`],[`Yacute`,`\xDD`],[`THORN`,`\xDE`],[`szlig`,`\xDF`],[`agrave`,`\xE0`],[`aacute`,`\xE1`],[`acirc`,`\xE2`],[`atilde`,`\xE3`],[`auml`,`\xE4`],[`aring`,`\xE5`],[`aelig`,`\xE6`],[`ccedil`,`\xE7`],[`egrave`,`\xE8`],[`eacute`,`\xE9`],[`ecirc`,`\xEA`],[`euml`,`\xEB`],[`igrave`,`\xEC`],[`iacute`,`\xED`],[`icirc`,`\xEE`],[`iuml`,`\xEF`],[`eth`,`\xF0`],[`ntilde`,`\xF1`],[`ograve`,`\xF2`],[`oacute`,`\xF3`],[`ocirc`,`\xF4`],[`otilde`,`\xF5`],[`ouml`,`\xF6`],[`divide`,`\xF7`],[`oslash`,`\xF8`],[`ugrave`,`\xF9`],[`uacute`,`\xFA`],[`ucirc`,`\xFB`],[`uuml`,`\xFC`],[`yacute`,`\xFD`],[`thorn`,`\xFE`],[`yuml`,`\xFF`],[`OElig`,`\u0152`],[`oelig`,`\u0153`],[`Scaron`,`\u0160`],[`scaron`,`\u0161`],[`Yuml`,`\u0178`],[`fnof`,`\u0192`],[`circ`,`\u02C6`],[`tilde`,`\u02DC`],[`Alpha`,`\u0391`],[`Beta`,`\u0392`],[`Gamma`,`\u0393`],[`Delta`,`\u0394`],[`Epsilon`,`\u0395`],[`Zeta`,`\u0396`],[`Eta`,`\u0397`],[`Theta`,`\u0398`],[`Iota`,`\u0399`],[`Kappa`,`\u039A`],[`Lambda`,`\u039B`],[`Mu`,`\u039C`],[`Nu`,`\u039D`],[`Xi`,`\u039E`],[`Omicron`,`\u039F`],[`Pi`,`\u03A0`],[`Rho`,`\u03A1`],[`Sigma`,`\u03A3`],[`Tau`,`\u03A4`],[`Upsilon`,`\u03A5`],[`Phi`,`\u03A6`],[`Chi`,`\u03A7`],[`Psi`,`\u03A8`],[`Omega`,`\u03A9`],[`alpha`,`\u03B1`],[`beta`,`\u03B2`],[`gamma`,`\u03B3`],[`delta`,`\u03B4`],[`epsilon`,`\u03B5`],[`zeta`,`\u03B6`],[`eta`,`\u03B7`],[`theta`,`\u03B8`],[`iota`,`\u03B9`],[`kappa`,`\u03BA`],[`lambda`,`\u03BB`],[`mu`,`\u03BC`],[`nu`,`\u03BD`],[`xi`,`\u03BE`],[`omicron`,`\u03BF`],[`pi`,`\u03C0`],[`rho`,`\u03C1`],[`sigmaf`,`\u03C2`],[`sigma`,`\u03C3`],[`tau`,`\u03C4`],[`upsilon`,`\u03C5`],[`phi`,`\u03C6`],[`chi`,`\u03C7`],[`psi`,`\u03C8`],[`omega`,`\u03C9`],[`thetasym`,`\u03D1`],[`upsih`,`\u03D2`],[`piv`,`\u03D6`],[`ensp`,`\u2002`],[`emsp`,`\u2003`],[`thinsp`,`\u2009`],[`zwnj`,`\u200C`],[`zwj`,`\u200D`],[`lrm`,`\u200E`],[`rlm`,`\u200F`],[`ndash`,`\u2013`],[`mdash`,`\u2014`],[`lsquo`,`\u2018`],[`rsquo`,`\u2019`],[`sbquo`,`\u201A`],[`ldquo`,`\u201C`],[`rdquo`,`\u201D`],[`bdquo`,`\u201E`],[`dagger`,`\u2020`],[`Dagger`,`\u2021`],[`bull`,`\u2022`],[`hellip`,`\u2026`],[`permil`,`\u2030`],[`prime`,`\u2032`],[`Prime`,`\u2033`],[`lsaquo`,`\u2039`],[`rsaquo`,`\u203A`],[`oline`,`\u203E`],[`frasl`,`\u2044`],[`euro`,`\u20AC`],[`image`,`\u2111`],[`weierp`,`\u2118`],[`real`,`\u211C`],[`trade`,`\u2122`],[`alefsym`,`\u2135`],[`larr`,`\u2190`],[`uarr`,`\u2191`],[`rarr`,`\u2192`],[`darr`,`\u2193`],[`harr`,`\u2194`],[`crarr`,`\u21B5`],[`lArr`,`\u21D0`],[`uArr`,`\u21D1`],[`rArr`,`\u21D2`],[`dArr`,`\u21D3`],[`hArr`,`\u21D4`],[`forall`,`\u2200`],[`part`,`\u2202`],[`exist`,`\u2203`],[`empty`,`\u2205`],[`nabla`,`\u2207`],[`isin`,`\u2208`],[`notin`,`\u2209`],[`ni`,`\u220B`],[`prod`,`\u220F`],[`sum`,`\u2211`],[`minus`,`\u2212`],[`lowast`,`\u2217`],[`radic`,`\u221A`],[`prop`,`\u221D`],[`infin`,`\u221E`],[`ang`,`\u2220`],[`and`,`\u2227`],[`or`,`\u2228`],[`cap`,`\u2229`],[`cup`,`\u222A`],[`int`,`\u222B`],[`there4`,`\u2234`],[`sim`,`\u223C`],[`cong`,`\u2245`],[`asymp`,`\u2248`],[`ne`,`\u2260`],[`equiv`,`\u2261`],[`le`,`\u2264`],[`ge`,`\u2265`],[`sub`,`\u2282`],[`sup`,`\u2283`],[`nsub`,`\u2284`],[`sube`,`\u2286`],[`supe`,`\u2287`],[`oplus`,`\u2295`],[`otimes`,`\u2297`],[`perp`,`\u22A5`],[`sdot`,`\u22C5`],[`lceil`,`\u2308`],[`rceil`,`\u2309`],[`lfloor`,`\u230A`],[`rfloor`,`\u230B`],[`lang`,`\u2329`],[`rang`,`\u232A`],[`loz`,`\u25CA`],[`spades`,`\u2660`],[`clubs`,`\u2663`],[`hearts`,`\u2665`],[`diams`,`\u2666`]]);function Sx(e){let[t,n]=Cx(e.jsxPragma||`React.createElement`),[r,i]=Cx(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function Cx(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var wx=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Tx=class e extends wx{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Sx(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(U.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Ob.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`\n`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===Ob.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(U.slash,U.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(U.slash,U.jsxTagEnd))if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`);for(this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,U.jsxName,U.jsxName)&&!this.tokens.matches2AtIndex(e-1,U.greaterThan,U.jsxName)&&!this.tokens.matches1AtIndex(e,U.braceL)&&!this.tokens.matches1AtIndex(e,U.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,U.slash,U.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Ex(e)&&this.tokens.replaceToken(`\'${e}\'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(U.jsxName)&&!this.tokens.matches1(U.braceL)){t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`);return}this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`)}processProps(e){let t=null;for(;;){if(this.tokens.matches2(U.jsxName,U.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}else this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(U.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(U.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`\'${e}\'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(U.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(U.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Ox(t),r=kx(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===Ob.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===Ob.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(U.jsxTagStart,U.slash))return;let e=!1;if(this.tokens.matches1(U.braceL))this.tokens.matches2(U.braceL,U.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(U.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(U.jsxText)||this.tokens.matches1(U.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Ox(n),i=Dx(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Ex(e){let t=e.charCodeAt(0);return t>=W.lowercaseA&&t<=W.lowercaseZ}function Dx(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\\r`)r||(n+=o);else if(o===`\n`)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=Ax(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Ox(e){let t=0,n=0;for(let r of e)r===`\n`?(t++,n=0):r===` `&&n++;return`\n`.repeat(t)+` `.repeat(n)}function kx(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`\n`)if(/\\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\\s/.test(e[n+1]);)n++;else t+=`\n`;else if(r===`&`){let{entity:r,newI:i}=Ax(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function Ax(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&Mx(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&jx(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=xx.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function jx(e){return e>=W.digit0&&e<=W.digit9}function Mx(e){return e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF}function Nx(e,t){let n=Sx(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===U.name&&!i.isType&&(i.identifierRole===Y.Access||i.identifierRole===Y.ObjectShorthand||i.identifierRole===Y.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===U.jsxTagStart&&r.add(n.base),i.type===U.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===U.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===U.jsxName&&i.identifierRole===Y.Access&&(!Ex(e.identifierNameForToken(i))||e.tokens[t+1].type===U.dot)&&r.add(e.identifierNameForToken(i))}return r}var Px=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,U._import)&&!this.tokens.matches3AtIndex(e,U._import,U.name,U.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,U._export)&&!this.tokens.matches2AtIndex(e,U._export,U.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Nx(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require(\'${e}\');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require(\'${e}\');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, \'${t}\', \'${e}\');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,H._type)||this.tokens.matches1AtIndex(e,U._typeof))&&!this.tokens.matches1AtIndex(e+1,U.comma)&&!this.tokens.matchesContextualAtIndex(e+1,H._from)||this.tokens.matches1AtIndex(e,U.parenL))return;if(this.tokens.matches1AtIndex(e,U.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,U.comma)&&e++),this.tokens.matches1AtIndex(e,U.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,U.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,H._from)&&e++,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,U._export,U._var)||this.tokens.matches2AtIndex(e,U._export,U._let)||this.tokens.matches2AtIndex(e,U._export,U._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,U._export,U._function)||this.tokens.matches2AtIndex(e,U._export,U._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,U._export,U.name,U._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,U._export,U.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,U._export,U.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,U.braceL)||this.tokens.matches1AtIndex(n,U.dollarBraceL)||this.tokens.matches1AtIndex(n,U.bracketL))t++;else if(this.tokens.matches1AtIndex(n,U.braceR)||this.tokens.matches1AtIndex(n,U.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,U.name))break;else if(this.tokens.matches1AtIndex(1,U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(kb(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,H._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,U._export,U.star,U._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}let n=yx(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,U.comma,U.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,U.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},Fx=44,Ix=59,Lx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Rx=new Uint8Array(64),zx=new Uint8Array(128);for(let e=0;e<Lx.length;e++){let t=Lx.charCodeAt(e);Rx[e]=t,zx[t]=e}function Bx(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(Rx[n])}while(t>0)}function Vx(e){return e<0?-e<<1|1:e<<1}var Hx=1024*16,Ux=typeof TextDecoder<`u`?new TextDecoder:typeof Buffer<`u`?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Wx=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(Hx)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Hx&&(this.out+=Ux.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+Ux.decode(e.subarray(0,n)):t}};function Gx(e){let t=new Wx,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(Ix),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(Fx),Bx(t,Vx(o[0]-c)),c=o[0],o.length!==1&&(Bx(t,Vx(o[1]-n)),Bx(t,Vx(o[2]-r)),Bx(t,Vx(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(Bx(t,Vx(o[4]-a)),a=o[4]))}}return t.flush()}o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\\w+.-]+:\\/\\//,t=/^([\\w+.-]+:)\\/\\/([^@/#?]*@)?(\\[[^\\]]+\\]|[^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/,n=/^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var Kx=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function qx(e){return e}function Jx(e,t){return qx(e)._indexes[t]}function Yx(e,t){let n=Jx(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=qx(e);return i[t]=r.push(t)-1}var Xx=0,Zx=1,Qx=2,$x=3,eS=4,tS=-1,nS=class{constructor({file:e,sourceRoot:t}={}){this._names=new Kx,this._sources=new Kx,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new Kx}};function rS(e){return e}var iS=(e,t,n,r,i,a,o,s)=>sS(!0,e,t,n,r,i,a,o,s);function aS(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=rS(e);return dS(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function oS(e){let t=aS(e);return Object.assign({},t,{mappings:Gx(t.mappings)})}function sS(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=rS(t),p=cS(l,n),m=lS(p,r);if(!i)return e&&fS(p,m)?void 0:uS(p,m,[r]);let h=Yx(u,i),g=s?Yx(f,s):tS;if(h===d.length&&(d[h]=c??null),!(e&&pS(p,m,h,a,o,g)))return uS(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function cS(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function lS(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][Xx]);n=r--);return n}function uS(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function dS(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function fS(e,t){return t===0||e[t-1].length===1}function pS(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[Zx]&&r===o[Qx]&&i===o[$x]&&a===(o.length===5?o[eS]:tS)}function mS({code:e,mappings:t},n,r,i,a){let o=hS(i,a),s=new nS({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&iS(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(iS(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===W.lineFeed&&(u++,d=r+1,l!==d&&iS(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=oS(s);return m}function hS(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===W.lineFeed&&(a=o+1);return n}var gS={require:`\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n `,interopRequireWildcard:`\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n `,interopRequireDefault:`\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n `,createNamedExportFrom:`\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n `,createStarExport:`\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n `,nullishCoalesce:`\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n `,asyncNullishCoalesce:`\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n `,optionalChain:`\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,asyncOptionalChain:`\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,optionalChainDelete:`\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `,asyncOptionalChainDelete:`\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `},_S=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(gS)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\\s+/g,` `).trim())}return e}};function vS(e,t,n){yS(e,n)&&bS(e,t,n)}function yS(e,t){for(let n of e.tokens)if(n.type===U.name&&!n.isType&&Ab(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function bS(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===U.name&&n.has(s)){if(Mb(o))xS(r[r.length-1],e,s);else if(Nb(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);xS(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function xS(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===U.name||e.type===U.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function SS(e,t){let n=[];for(let r of t)r.type===U.name&&n.push(e.slice(r.start,r.end));return n}var CS=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(SS(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},wS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),TS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=wS(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof b||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function ee(e,t){return new te(e,t)}e.enumlit=ee;var te=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=te;function ne(e){return Object.keys(e).map(function(t){return re(t,e[t])})}function re(e,t){return t instanceof se?new ce(e,t.ttype,!0):new ce(e,i(t),!1)}function ie(e,t){return new ae(e,ne(t))}e.iface=ie;var ae=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=ae;function oe(e){return new se(i(e))}e.opt=oe;var se=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=se;var ce=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=ce;function le(e){return new ue(new pe([...arguments].slice(1)),i(e))}e.func=le;var ue=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=ue;function de(e,t,n){return new fe(e,i(t),!!n)}e.param=de;var fe=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=fe;var pe=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=pe;var b=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=b,e.basicTypes={any:new b(function(e){return!0},`is invalid`),number:new b(function(e){return typeof e==`number`},`is not a number`),object:new b(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new b(function(e){return typeof e==`boolean`},`is not a boolean`),string:new b(function(e){return typeof e==`string`},`is not a string`),symbol:new b(function(e){return typeof e==`symbol`},`is not a symbol`),void:new b(function(e){return e==null},`is not void`),undefined:new b(function(e){return e===void 0},`is not undefined`),null:new b(function(e){return e===null},`is not null`),never:new b(function(e){return!1},`is unexpected`),Date:new b(he(`[object Date]`),`is not a Date`),RegExp:new b(he(`[object RegExp]`),`is not a RegExp`)};var me=Object.prototype.toString;function he(e){return function(t){return typeof t==`object`&&t&&me.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new b(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ge=function(t){e.basicTypes[t.name]=new b(function(e){return e instanceof t},`is not a `+t.name)},_e=0,ve=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_e<ve.length;_e++){var ye=ve[_e];ge(ye)}})),ES=c(o((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=TS(),r=wS(),i=TS();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=wS();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),DS={Transform:ES.union(ES.lit(`jsx`),ES.lit(`typescript`),ES.lit(`flow`),ES.lit(`imports`),ES.lit(`react-hot-loader`),ES.lit(`jest`)),SourceMapOptions:ES.iface([],{compiledFilename:`string`}),Options:ES.iface([],{transforms:ES.array(`Transform`),disableESTransforms:ES.opt(`boolean`),jsxRuntime:ES.opt(ES.union(ES.lit(`classic`),ES.lit(`automatic`),ES.lit(`preserve`))),production:ES.opt(`boolean`),jsxImportSource:ES.opt(`string`),jsxPragma:ES.opt(`string`),jsxFragmentPragma:ES.opt(`string`),keepUnusedImports:ES.opt(`boolean`),preserveDynamicImport:ES.opt(`boolean`),injectCreateRequireForImportRequire:ES.opt(`boolean`),enableLegacyTypeScriptModuleInterop:ES.opt(`boolean`),enableLegacyBabel5ModuleInterop:ES.opt(`boolean`),sourceMapOptions:ES.opt(`SourceMapOptions`),filePath:ES.opt(`string`)})},{Options:OS}=(0,ES.createCheckers)(DS);function kS(e){OS.strictCheck(e)}function AS(){X(),Jw(!1)}function jS(e){X(),FS(e)}function MS(e){$(),PS(e)}function NS(){$(),G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration}function PS(e){let t;t=G.scopeDepth===0?Y.TopLevelDeclaration:e?Y.BlockScopedDeclaration:Y.FunctionScopedDeclaration,G.tokens[G.tokens.length-1].identifierRole=t}function FS(e){switch(G.type){case U._this:{let e=Rb(0);X(),zb(e);return}case U._yield:case U.name:G.type=U.name,MS(e);return;case U.bracketL:X(),IS(U.bracketR,e,!0);return;case U.braceL:wT(!0,e);return;default:yb()}}function IS(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=G.tokens.length;for(;!Z(e)&&!G.error;)if(a?a=!1:(J(U.comma),G.tokens[G.tokens.length-1].contextId=i,!o&&G.tokens[s].isType&&(G.tokens[G.tokens.length-1].isType=!0,o=!0)),!(n&&Q(U.comma))){if(Z(e))break;if(Q(U.ellipsis)){jS(t),RS(),Z(U.comma),J(e);break}else LS(r,t)}}function LS(e,t){e&&US([H._public,H._protected,H._private,H._readonly,H._override]),zS(t),RS(),zS(t,!0)}function RS(){ib?KE():rb&&Ow()}function zS(e,t=!1){if(t||FS(e),!Z(U.eq))return;let n=G.tokens.length-1;Jw(),G.tokens[n].rhsEndIndex=G.tokens.length}function BS(){return Q(U.name)}function VS(){return Q(U.name)||!!(G.type&U.IS_KEYWORD)||Q(U.string)||Q(U.num)||Q(U.bigint)||Q(U.decimal)}function HS(){let e=G.snapshot();return X(),(Q(U.bracketL)||Q(U.braceL)||Q(U.star)||Q(U.ellipsis)||Q(U.hash)||VS())&&!hb()?!0:(G.restoreFromSnapshot(e),!1)}function US(e){for(;WS(e)!==null;);}function WS(e){if(!Q(U.name))return null;let t=G.contextualKeyword;if(e.indexOf(t)!==-1&&HS()){switch(t){case H._readonly:G.tokens[G.tokens.length-1].type=U._readonly;break;case H._abstract:G.tokens[G.tokens.length-1].type=U._abstract;break;case H._static:G.tokens[G.tokens.length-1].type=U._static;break;case H._public:G.tokens[G.tokens.length-1].type=U._public;break;case H._private:G.tokens[G.tokens.length-1].type=U._private;break;case H._protected:G.tokens[G.tokens.length-1].type=U._protected;break;case H._override:G.tokens[G.tokens.length-1].type=U._override;break;case H._declare:G.tokens[G.tokens.length-1].type=U._declare;break;default:break}return t}return null}function GS(){for($();Z(U.dot);)$()}function KS(){GS(),!hb()&&Q(U.lessThan)&&sw()}function qS(){X(),FC()}function JS(){X()}function YS(){J(U._typeof),Q(U._import)?XS():GS(),!hb()&&Q(U.lessThan)&&sw()}function XS(){J(U._import),J(U.parenL),J(U.string),J(U.parenR),Z(U.dot)&&GS(),Q(U.lessThan)&&sw()}function ZS(){Z(U._const);let e=Z(U._in),t=fb(H._out);Z(U._const),(e||t)&&!Q(U.name)?G.tokens[G.tokens.length-1].type=U.name:$(),Z(U._extends)&&IC(),Z(U.eq)&&IC()}function QS(){Q(U.lessThan)&&$S()}function $S(){let e=Rb(0);for(Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();!Z(U.greaterThan)&&!G.error;)ZS(),Z(U.comma);zb(e)}function eC(e){let t=e===U.arrow;QS(),J(U.parenL),G.scopeDepth++,tC(!1),G.scopeDepth--,(t||Q(e))&&AC(e)}function tC(e){IS(U.parenR,e)}function nC(){Z(U.comma)||vb()}function rC(){eC(U.colon),nC()}function iC(){let e=G.snapshot();X();let t=Z(U.name)&&Q(U.colon);return G.restoreFromSnapshot(e),t}function aC(){if(!(Q(U.bracketL)&&iC()))return!1;let e=Rb(0);return J(U.bracketL),$(),FC(),J(U.bracketR),MC(),nC(),zb(e),!0}function oC(e){Z(U.question),!e&&(Q(U.parenL)||Q(U.lessThan))?(eC(U.colon),nC()):(MC(),nC())}function sC(){if(Q(U.parenL)||Q(U.lessThan)){rC();return}if(Q(U._new)){X(),Q(U.parenL)||Q(U.lessThan)?rC():oC(!1);return}let e=!!WS([H._readonly]);aC()||((q(H._get)||q(H._set))&&HS(),kT(-1),oC(e))}function cC(){lC()}function lC(){for(J(U.braceL);!Z(U.braceR)&&!G.error;)sC()}function uC(){let e=G.snapshot(),t=dC();return G.restoreFromSnapshot(e),t}function dC(){return X(),Z(U.plus)||Z(U.minus)?q(H._readonly):(q(H._readonly)&&X(),!Q(U.bracketL)||(X(),!BS())?!1:(X(),Q(U._in)))}function fC(){$(),J(U._in),IC()}function pC(){J(U.braceL),Q(U.plus)||Q(U.minus)?(X(),pb(H._readonly)):fb(H._readonly),J(U.bracketL),fC(),fb(H._as)&&IC(),J(U.bracketR),Q(U.plus)||Q(U.minus)?(X(),J(U.question)):Z(U.question),NC(),vb(),J(U.braceR)}function mC(){for(J(U.bracketL);!Z(U.bracketR)&&!G.error;)hC(),Z(U.comma)}function hC(){Z(U.ellipsis)?IC():(IC(),Z(U.question)),Z(U.colon)&&IC()}function gC(){J(U.parenL),IC(),J(U.parenR)}function _C(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),IC(),Ib(),Ib();X()}var vC;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(vC||={});function yC(e){e===vC.TSAbstractConstructorType&&pb(H._abstract),(e===vC.TSConstructorType||e===vC.TSAbstractConstructorType)&&J(U._new);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,eC(U.arrow),G.inDisallowConditionalTypesContext=t}function bC(){switch(G.type){case U.name:KS();return;case U._void:case U._null:X();return;case U.string:case U.num:case U.bigint:case U.decimal:case U._true:case U._false:hT();return;case U.minus:X(),hT();return;case U._this:JS(),q(H._is)&&!hb()&&qS();return;case U._typeof:YS();return;case U._import:XS();return;case U.braceL:uC()?pC():cC();return;case U.bracketL:mC();return;case U.parenL:gC();return;case U.backQuote:_C();return;default:if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}break}yb()}function xC(){for(bC();!hb()&&Z(U.bracketL);)Z(U.bracketR)||(IC(),J(U.bracketR))}function SC(){if(pb(H._infer),$(),Q(U._extends)){let e=G.snapshot();J(U._extends);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,IC(),G.inDisallowConditionalTypesContext=t,(G.error||!G.inDisallowConditionalTypesContext&&Q(U.question))&&G.restoreFromSnapshot(e)}}function CC(){if(q(H._keyof)||q(H._unique)||q(H._readonly))X(),CC();else if(q(H._infer))SC();else{let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,xC(),G.inDisallowConditionalTypesContext=e}}function wC(){if(Z(U.bitwiseAND),CC(),Q(U.bitwiseAND))for(;Z(U.bitwiseAND);)CC()}function TC(){if(Z(U.bitwiseOR),wC(),Q(U.bitwiseOR))for(;Z(U.bitwiseOR);)wC()}function EC(){return Q(U.lessThan)?!0:Q(U.parenL)&&OC()}function DC(){if(Q(U.name)||Q(U._this))return X(),!0;if(Q(U.braceL)||Q(U.bracketL)){let e=1;for(X();e>0&&!G.error;)Q(U.braceL)||Q(U.bracketL)?e++:(Q(U.braceR)||Q(U.bracketR))&&e--,X();return!0}return!1}function OC(){let e=G.snapshot(),t=kC();return G.restoreFromSnapshot(e),t}function kC(){return X(),!!(Q(U.parenR)||Q(U.ellipsis)||DC()&&(Q(U.colon)||Q(U.comma)||Q(U.question)||Q(U.eq)||Q(U.parenR)&&(X(),Q(U.arrow))))}function AC(e){let t=Rb(0);J(e),PC()||IC(),zb(t)}function jC(){Q(U.colon)&&AC(U.colon)}function MC(){Q(U.colon)&&FC()}function NC(){Z(U.colon)&&IC()}function PC(){let e=G.snapshot();return q(H._asserts)?(X(),fb(H._is)?(IC(),!0):BS()||Q(U._this)?(X(),fb(H._is)&&IC(),!0):(G.restoreFromSnapshot(e),!1)):BS()||Q(U._this)?(X(),q(H._is)&&!hb()?(X(),IC(),!0):(G.restoreFromSnapshot(e),!1)):!1}function FC(){let e=Rb(0);J(U.colon),IC(),zb(e)}function IC(){if(RC(),G.inDisallowConditionalTypesContext||hb()||!Z(U._extends))return;let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,RC(),G.inDisallowConditionalTypesContext=e,J(U.question),IC(),J(U.colon),IC()}function LC(){return q(H._abstract)&&Vb()===U._new}function RC(){if(EC()){yC(vC.TSFunctionType);return}if(Q(U._new)){yC(vC.TSConstructorType);return}else if(LC()){yC(vC.TSAbstractConstructorType);return}TC()}function zC(){let e=Rb(1);IC(),J(U.greaterThan),zb(e),tT()}function BC(){if(Z(U.jsxTagStart)){G.tokens[G.tokens.length-1].type=U.typeParameterStart;let e=Rb(1);for(;!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);Hw(),zb(e)}}function VC(){for(;!Q(U.braceL)&&!G.error;)HC(),Z(U.comma)}function HC(){GS(),Q(U.lessThan)&&sw()}function UC(){MS(!1),QS(),Z(U._extends)&&VC(),lC()}function WC(){MS(!1),QS(),J(U.eq),IC(),vb()}function GC(){if(Q(U.string)?hT():$(),Z(U.eq)){let e=G.tokens.length-1;Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}}function KC(){for(MS(!1),J(U.braceL);!Z(U.braceR)&&!G.error;)GC(),Z(U.comma)}function qC(){J(U.braceL),ND(U.braceR)}function JC(){MS(!1),Z(U.dot)?JC():qC()}function YC(){q(H._global)?$():Q(U.string)?fT():yb(),Q(U.braceL)?qC():vb()}function XC(){NS(),J(U.eq),QC(),vb()}function ZC(){return q(H._require)&&Vb()===U.parenL}function QC(){ZC()?$C():GS()}function $C(){pb(H._require),J(U.parenL),Q(U.string)||yb(),hT(),J(U.parenR)}function ew(){if(_b())return!1;switch(G.type){case U._function:{let e=Rb(1);X();let t=G.start;return RD(t,!0),zb(e),!0}case U._class:{let e=Rb(1);return BD(!0,!1),zb(e),!0}case U._const:if(Q(U._const)&&db(H._enum)){let e=Rb(1);return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),zb(e),!0}case U._var:case U._let:{let e=Rb(1);return DD(G.type!==U._var),zb(e),!0}case U.name:{let e=Rb(1),t=G.contextualKeyword,n=!1;return t===H._global?(YC(),n=!0):n=rw(t,!0),zb(e),n}default:return!1}}function tw(){return rw(G.contextualKeyword,!0)}function nw(e){switch(e){case H._declare:{let e=G.tokens.length-1;if(ew())return G.tokens[e].type=U._declare,!0;break}case H._global:if(Q(U.braceL))return qC(),!0;break;default:return rw(e,!1)}return!1}function rw(e,t){switch(e){case H._abstract:if(iw(t)&&Q(U._class))return G.tokens[G.tokens.length-1].type=U._abstract,BD(!0,!1),!0;break;case H._enum:if(iw(t)&&Q(U.name))return G.tokens[G.tokens.length-1].type=U._enum,KC(),!0;break;case H._interface:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return UC(),zb(e),!0}break;case H._module:if(iw(t)){if(Q(U.string)){let e=Rb(t?2:1);return YC(),zb(e),!0}else if(Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}}break;case H._namespace:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}break;case H._type:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return WC(),zb(e),!0}break;default:break}return!1}function iw(e){return e?(X(),!0):!_b()}function aw(){let e=G.snapshot();return $S(),zD(),jC(),J(U.arrow),G.error?(G.restoreFromSnapshot(e),!1):(NT(!0),!0)}function ow(){G.type===U.bitShiftL&&(--G.pos,Qb(U.lessThan)),sw()}function sw(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);e?(J(U.greaterThan),zb(e)):(zb(e),sx(),J(U.greaterThan),G.tokens[G.tokens.length-1].isType=!0)}function cw(){if(Q(U.name))switch(G.contextualKeyword){case H._abstract:case H._declare:case H._enum:case H._interface:case H._module:case H._namespace:case H._type:return!0;default:break}return!1}function lw(e,t){if(Q(U.colon)&&AC(U.colon),!Q(U.braceL)&&_b()){let t=G.tokens.length-1;for(;t>=0&&(G.tokens[t].start>=e||G.tokens[t].type===U._default||G.tokens[t].type===U._export);)G.tokens[t].isType=!0,t--;return}NT(!1,t)}function uw(e,t,n){if(!hb()&&Z(U.bang)){G.tokens[G.tokens.length-1].type=U.nonNullAssertion;return}if(Q(U.lessThan)||Q(U.bitShiftL)){let n=G.snapshot();if(!t&&sT()&&aw())return;if(ow(),!t&&Z(U.parenL)?(G.tokens[G.tokens.length-1].subscriptStartIndex=e,cT()):Q(U.backQuote)?CT():(G.type===U.greaterThan||G.type!==U.parenL&&G.type&U.IS_EXPRESSION_START&&!hb())&&yb(),G.error)G.restoreFromSnapshot(n);else return}else!t&&Q(U.questionDot)&&Vb()===U.lessThan&&(X(),G.tokens[e].isOptionalChainStart=!0,G.tokens[G.tokens.length-1].subscriptStartIndex=e,sw(),J(U.parenL),cT());oT(e,t,n)}function dw(){if(Z(U._import))return q(H._type)&&Vb()!==U.eq&&pb(H._type),XC(),!0;if(Z(U.eq))return qw(),vb(),!0;if(fb(H._as))return pb(H._namespace),$(),vb(),!0;if(q(H._type)){let e=Vb();(e===U.braceL||e===U.star)&&X()}return!1}function fw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function pw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function mw(){if(q(H._abstract)&&Vb()===U._class)return G.type=U._abstract,X(),BD(!0,!0),!0;if(q(H._interface)){let e=Rb(2);return rw(H._interface,!0),zb(e),!0}return!1}function hw(){if(G.type===U._const){let e=Ub();if(e.type===U.name&&e.contextualKeyword===H._enum)return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),!0}return!1}function gw(e){let t=G.tokens.length;US([H._abstract,H._readonly,H._declare,H._static,H._override]);let n=G.tokens.length;if(aC()){let r=e?t-1:t;for(let e=r;e<n;e++)G.tokens[e].isType=!0;return!0}return!1}function _w(e){nw(e)||vb()}function vw(){let e=fb(H._declare);e&&(G.tokens[G.tokens.length-1].type=U._declare);let t=!1;if(Q(U.name))if(e){let e=Rb(2);t=tw(),zb(e)}else t=tw();if(!t)if(e){let e=Rb(2);sD(!0),zb(e)}else sD(!0)}function yw(e){if(e&&(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),fb(H._implements)){G.tokens[G.tokens.length-1].type=U._implements;let e=Rb(1);VC(),zb(e)}}function bw(){QS()}function xw(){QS()}function Sw(){let e=Rb(0);hb()||Z(U.bang),MC(),zb(e)}function Cw(){Q(U.colon)&&FC()}function ww(e,t){return nb?Tw(e,t):Ew(e,t)}function Tw(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n);else return r;return G.type=U.typeParameterStart,$S(),r=Yw(e,t),r||yb(),r}function Ew(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot();$S();let r=Yw(e,t);if(r||yb(),G.error)G.restoreFromSnapshot(n);else return r;return Yw(e,t)}function Dw(){if(Q(U.colon)){let e=G.snapshot();AC(U.colon),mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(e)}return Z(U.arrow)}function Ow(){let e=Rb(0);Z(U.question),MC(),zb(e)}function kw(){(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),pD()}function Aw(){let e=!1,t=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated JSX contents`);return}let n=K.charCodeAt(G.pos);if(n===W.lessThan||n===W.leftCurlyBrace){if(G.pos===G.start){if(n===W.lessThan){G.pos++,Qb(U.jsxTagStart);return}ux(n);return}Qb(e&&!t?U.jsxEmptyText:U.jsxText);return}n===W.lineFeed?e=!0:n!==W.space&&n!==W.carriageReturn&&n!==W.tab&&(t=!0),G.pos++}}function jw(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}if(K.charCodeAt(G.pos)===e){G.pos++;break}G.pos++}Qb(U.string)}function Mw(){let e;do{if(G.pos>K.length){yb(`Unexpectedly reached the end of input.`);return}e=K.charCodeAt(++G.pos)}while(wb[e]||e===W.dash);Qb(U.jsxName)}function Nw(){Hw()}function Pw(e){if(Nw(),!Z(U.colon)){G.tokens[G.tokens.length-1].identifierRole=e;return}Nw()}function Fw(){let e=G.tokens.length;Pw(Y.Access);let t=!1;for(;Q(U.dot);)t=!0,Hw(),Nw();if(!t){let t=G.tokens[e],n=K.charCodeAt(t.start);n>=W.lowercaseA&&n<=W.lowercaseZ&&(t.identifierRole=null)}}function Iw(){switch(G.type){case U.braceL:X(),qw(),Hw();return;case U.jsxTagStart:Vw(),Hw();return;case U.string:Hw();return;default:yb(`JSX value should be either an expression or a quoted JSX text`)}}function Lw(){J(U.ellipsis),qw()}function Rw(e){if(Q(U.jsxTagEnd))return!1;Fw(),rb&&BC();let t=!1;for(;!Q(U.slash)&&!Q(U.jsxTagEnd)&&!G.error;){if(Z(U.braceL)){t=!0,J(U.ellipsis),Jw(),Hw();continue}t&&G.end-G.start===3&&K.charCodeAt(G.start)===W.lowercaseK&&K.charCodeAt(G.start+1)===W.lowercaseE&&K.charCodeAt(G.start+2)===W.lowercaseY&&(G.tokens[e].jsxRole=Ob.KeyAfterPropSpread),Pw(Y.ObjectKey),Q(U.eq)&&(Hw(),Iw())}let n=Q(U.slash);return n&&Hw(),n}function zw(){Q(U.jsxTagEnd)||Fw()}function Bw(){let e=G.tokens.length-1;G.tokens[e].jsxRole=Ob.NoChildren;let t=0;if(!Rw(e))for(Uw();;)switch(G.type){case U.jsxTagStart:if(Hw(),Q(U.slash)){Hw(),zw(),G.tokens[e].jsxRole!==Ob.KeyAfterPropSpread&&(t===1?G.tokens[e].jsxRole=Ob.OneChild:t>1&&(G.tokens[e].jsxRole=Ob.StaticChildren));return}t++,Bw(),Uw();break;case U.jsxText:t++,Uw();break;case U.jsxEmptyText:Uw();break;case U.braceL:X(),Q(U.ellipsis)?(Lw(),Uw(),t+=2):(Q(U.braceR)||(t++,qw()),Uw());break;default:yb();return}}function Vw(){Hw(),Bw()}function Hw(){G.tokens.push(new Fb),Zb(),G.start=G.pos;let e=K.charCodeAt(G.pos);if(Tb[e])Mw();else if(e===W.quotationMark||e===W.apostrophe)jw(e);else switch(++G.pos,e){case W.greaterThan:Qb(U.jsxTagEnd);break;case W.lessThan:Qb(U.jsxTagStart);break;case W.slash:Qb(U.slash);break;case W.equalsTo:Qb(U.eq);break;case W.leftCurlyBrace:Qb(U.braceL);break;case W.dot:Qb(U.dot);break;case W.colon:Qb(U.colon);break;default:yb()}}function Uw(){G.tokens.push(new Fb),G.start=G.pos,Aw()}function Ww(e){if(Q(U.question)){let e=Vb();if(e===U.colon||e===U.comma||e===U.parenR)return}Qw(e)}function Gw(){Bb(U.question),Q(U.colon)&&(rb?FC():ib&&AE())}var Kw=class{constructor(e){this.stop=e}};function qw(e=!1){if(Jw(e),Q(U.comma))for(;Z(U.comma);)Jw(e)}function Jw(e=!1,t=!1){return rb?ww(e,t):ib?QE(e,t):Yw(e,t)}function Yw(e,t){if(Q(U._yield))return LT(),!1;(Q(U.parenL)||Q(U.name)||Q(U._yield))&&(G.potentialArrowAt=G.start);let n=Xw(e);return t&&bT(),G.type&U.IS_ASSIGN?(X(),Jw(e),!1):n}function Xw(e){return $w(e)?!0:(Zw(e),!1)}function Zw(e){rb||ib?Ww(e):Qw(e)}function Qw(e){Z(U.question)&&(Jw(),J(U.colon),Jw(e))}function $w(e){let t=G.tokens.length;return tT()?!0:(eT(t,-1,e),!1)}function eT(e,t,n){if(rb&&(U._in&U.PRECEDENCE_MASK)>t&&!hb()&&(fb(H._as)||fb(H._satisfies))){let r=Rb(1);IC(),zb(r),sx(),eT(e,t,n);return}let r=G.type&U.PRECEDENCE_MASK;if(r>0&&(!n||!Q(U._in))&&r>t){let i=G.type;X(),i===U.nullishCoalescing&&(G.tokens[G.tokens.length-1].nullishStartIndex=e);let a=G.tokens.length;tT(),eT(a,i&U.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===U.nullishCoalescing&&(G.tokens[e].numNullishCoalesceStarts++,G.tokens[G.tokens.length-1].numNullishCoalesceEnds++),eT(e,t,n)}}function tT(){if(rb&&!nb&&Z(U.lessThan))return zC(),!1;if(q(H._module)&&Kb()===W.leftCurlyBrace&&!gb())return RT(),!1;if(G.type&U.IS_PREFIX)return X(),tT(),!1;if(nT())return!0;for(;G.type&U.IS_POSTFIX&&!mb();)G.type===U.preIncDec&&(G.type=U.postIncDec),X();return!1}function nT(){let e=G.tokens.length;return fT()?!0:(rT(e),G.tokens.length>e&&G.tokens[e].isOptionalChainStart&&(G.tokens[G.tokens.length-1].isOptionalChainEnd=!0),!1)}function rT(e,t=!1){ib?eD(e,t):iT(e,t)}function iT(e,t=!1){let n=new Kw(!1);do aT(e,t,n);while(!n.stop&&!G.error)}function aT(e,t,n){rb?uw(e,t,n):ib?PE(e,t,n):oT(e,t,n)}function oT(e,t,n){if(!t&&Z(U.doubleColon))dT(),n.stop=!0,rT(e,t);else if(Q(U.questionDot)){if(G.tokens[e].isOptionalChainStart=!0,t&&Vb()===U.parenL){n.stop=!0;return}X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e,Z(U.bracketL)?(qw(),J(U.bracketR)):Z(U.parenL)?cT():pT()}else if(Z(U.dot))G.tokens[G.tokens.length-1].subscriptStartIndex=e,pT();else if(Z(U.bracketL))G.tokens[G.tokens.length-1].subscriptStartIndex=e,qw(),J(U.bracketR);else if(!t&&Q(U.parenL))if(sT()){let t=G.snapshot(),r=G.tokens.length;X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let i=ob();G.tokens[G.tokens.length-1].contextId=i,cT(),G.tokens[G.tokens.length-1].contextId=i,lT()&&(G.restoreFromSnapshot(t),n.stop=!0,G.scopeDepth++,zD(),uT(r))}else{X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let t=ob();G.tokens[G.tokens.length-1].contextId=t,cT(),G.tokens[G.tokens.length-1].contextId=t}else Q(U.backQuote)?CT():n.stop=!0}function sT(){return G.tokens[G.tokens.length-1].contextualKeyword===H._async&&!mb()}function cT(){let e=!0;for(;!Z(U.parenR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.parenR))break;FT(!1)}}function lT(){return Q(U.colon)||Q(U.arrow)}function uT(e){rb?Cw():ib&&ZE(),J(U.arrow),jT(e)}function dT(){let e=G.tokens.length;fT(),rT(e,!0)}function fT(){if(Z(U.modulo))return $(),!1;if(Q(U.jsxText)||Q(U.jsxEmptyText))return hT(),!1;if(Q(U.lessThan)&&nb)return G.type=U.jsxTagStart,Vw(),X(),!1;let e=G.potentialArrowAt===G.start;switch(G.type){case U.slash:case U.assign:Lb();case U._super:case U._this:case U.regexp:case U.num:case U.bigint:case U.decimal:case U.string:case U._null:case U._true:case U._false:return X(),!1;case U._import:return X(),Q(U.dot)&&(G.tokens[G.tokens.length-1].type=U.name,X(),$()),!1;case U.name:{let t=G.tokens.length,n=G.start,r=G.contextualKeyword;return $(),r===H._await?(IT(),!1):r===H._async&&Q(U._function)&&!mb()?(X(),RD(n,!1),!1):e&&r===H._async&&!mb()&&Q(U.name)?(G.scopeDepth++,MS(!1),J(U.arrow),jT(t),!0):Q(U._do)&&!mb()?(X(),MD(),!1):e&&!mb()&&Q(U.arrow)?(G.scopeDepth++,PS(!1),J(U.arrow),jT(t),!0):(G.tokens[G.tokens.length-1].identifierRole=Y.Access,!1)}case U._do:return X(),MD(),!1;case U.parenL:return _T(e);case U.bracketL:return X(),PT(U.bracketR,!0),!1;case U.braceL:return wT(!1,!1),!1;case U._function:return mT(),!1;case U.at:uD();case U._class:return BD(!1),!1;case U._new:return xT(),!1;case U.backQuote:return CT(),!1;case U.doubleColon:return X(),dT(),!1;case U.hash:{let e=Kb();return Tb[e]||e===W.backslash?pT():X(),!1}default:return yb(),!1}}function pT(){Z(U.hash),$()}function mT(){let e=G.start;$(),Z(U.dot)&&$(),RD(e,!1)}function hT(){X()}function gT(){J(U.parenL),qw(),J(U.parenR)}function _T(e){let t=G.snapshot(),n=G.tokens.length;J(U.parenL);let r=!0;for(;!Q(U.parenR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Q(U.parenR))break;if(Q(U.ellipsis)){jS(!1),bT();break}else Jw(!1,!0)}return J(U.parenR),e&&vT()&&yT()?(G.restoreFromSnapshot(t),G.scopeDepth++,zD(),yT(),jT(n),G.error?(G.restoreFromSnapshot(t),_T(!1),!1):!0):!1}function vT(){return Q(U.colon)||!mb()}function yT(){return rb?Dw():ib?$E():Z(U.arrow)}function bT(){(rb||ib)&&Gw()}function xT(){if(J(U._new),Z(U.dot)){$();return}ST(),ib&&FE(),Z(U.parenL)&&PT(U.parenR)}function ST(){dT(),Z(U.questionDot)}function CT(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),qw(),Ib(),Ib();X()}function wT(e,t){let n=ob(),r=!0;for(X(),G.tokens[G.tokens.length-1].contextId=n;!Z(U.braceR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Z(U.braceR))break;let i=!1;if(Q(U.ellipsis)){let n=G.tokens.length;if(AS(),e&&(G.tokens.length===n+2&&PS(t),Z(U.braceR)))break;continue}e||(i=Z(U.star)),!e&&q(H._async)?(i&&yb(),$(),Q(U.colon)||Q(U.parenL)||Q(U.braceR)||Q(U.eq)||Q(U.comma)||(Q(U.star)&&(X(),i=!0),kT(n))):kT(n),OT(e,t,n)}G.tokens[G.tokens.length-1].contextId=n}function TT(e){return!e&&(Q(U.string)||Q(U.num)||Q(U.bracketL)||Q(U.name)||!!(G.type&U.IS_KEYWORD))}function ET(e,t){let n=G.start;return Q(U.parenL)?(e&&yb(),AT(n,!1),!0):TT(e)?(kT(t),AT(n,!1),!0):!1}function DT(e,t){if(Z(U.colon)){e?zS(t):Jw(!1);return}let n;n=e?G.scopeDepth===0?Y.ObjectShorthandTopLevelDeclaration:t?Y.ObjectShorthandBlockScopedDeclaration:Y.ObjectShorthandFunctionScopedDeclaration:Y.ObjectShorthand,G.tokens[G.tokens.length-1].identifierRole=n,zS(t,!0)}function OT(e,t,n){rb?bw():ib&&GE(),ET(e,n)||DT(e,t)}function kT(e){ib&&ME(),Z(U.bracketL)?(G.tokens[G.tokens.length-1].contextId=e,Jw(),J(U.bracketR),G.tokens[G.tokens.length-1].contextId=e):(Q(U.num)||Q(U.string)||Q(U.bigint)||Q(U.decimal)?fT():pT(),G.tokens[G.tokens.length-1].identifierRole=Y.ObjectKey,G.tokens[G.tokens.length-1].contextId=e)}function AT(e,t){let n=ob();G.scopeDepth++;let r=G.tokens.length;zD(t,n),MT(e,n);let i=G.tokens.length;G.scopes.push(new $y(r,i,!0)),G.scopeDepth--}function jT(e){NT(!0);let t=G.tokens.length;G.scopes.push(new $y(e,t,!0)),G.scopeDepth--}function MT(e,t=0){rb?lw(e,t):ib?NE(t):NT(!1,t)}function NT(e,t=0){e&&!Q(U.braceL)?Jw():MD(!0,t)}function PT(e,t=!1){let n=!0;for(;!Z(e)&&!G.error;){if(n)n=!1;else if(J(U.comma),Z(e))break;FT(t)}}function FT(e){e&&Q(U.comma)||(Q(U.ellipsis)?(AS(),bT()):Q(U.question)?X():Jw(!1,!0))}function $(){X(),G.tokens[G.tokens.length-1].type=U.name}function IT(){tT()}function LT(){X(),!Q(U.semi)&&!mb()&&(Z(U.star),Jw())}function RT(){pb(H._module),J(U.braceL),ND(U.braceR)}function zT(e){return(e.type===U.name||!!(e.type&U.IS_KEYWORD))&&e.contextualKeyword!==H._from}function BT(e){let t=Rb(0);J(e||U.colon),kE(),zb(t)}function VT(){J(U.modulo),pb(H._checks),Z(U.parenL)&&(qw(),J(U.parenR))}function HT(){let e=Rb(0);J(U.colon),Q(U.modulo)?VT():(kE(),Q(U.modulo)&&VT()),zb(e)}function UT(){X(),$T(!0)}function WT(){X(),$(),Q(U.lessThan)&&oE(),J(U.parenL),SE(),J(U.parenR),HT(),vb()}function GT(){Q(U._class)?UT():Q(U._function)?WT():Q(U._var)?KT():fb(H._module)?Z(U.dot)?YT():qT():q(H._type)?XT():q(H._opaque)?ZT():q(H._interface)?QT():Q(U._export)?JT():yb()}function KT(){X(),jE(),vb()}function qT(){for(Q(U.string)?fT():$(),J(U.braceL);!Q(U.braceR)&&!G.error;)Q(U._import)?(X(),pO()):yb();J(U.braceR)}function JT(){J(U._export),Z(U._default)?Q(U._function)||Q(U._class)?GT():(kE(),vb()):Q(U._var)||Q(U._function)||Q(U._class)||q(H._opaque)?GT():Q(U.star)||Q(U.braceL)||q(H._interface)||q(H._type)||q(H._opaque)?QD():yb()}function YT(){pb(H._exports),AE(),vb()}function XT(){X(),rE()}function ZT(){X(),iE(!0)}function QT(){X(),$T()}function $T(e=!1){if(nE(),Q(U.lessThan)&&oE(),Z(U._extends))do eE();while(!e&&Z(U.comma));if(q(H._mixins)){X();do eE();while(Z(U.comma))}if(q(H._implements)){X();do eE();while(Z(U.comma))}mE(e,!1,e)}function eE(){_E(!1),Q(U.lessThan)&&sE()}function tE(){$T()}function nE(){$()}function rE(){nE(),Q(U.lessThan)&&oE(),BT(U.eq),vb()}function iE(e){pb(H._type),nE(),Q(U.lessThan)&&oE(),Q(U.colon)&&BT(U.colon),e||BT(U.eq),vb()}function aE(){ME(),jE(),Z(U.eq)&&kE()}function oE(){let e=Rb(0);Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();do aE(),Q(U.greaterThan)||J(U.comma);while(!Q(U.greaterThan)&&!G.error);J(U.greaterThan),zb(e)}function sE(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)kE(),Q(U.greaterThan)||J(U.comma);J(U.greaterThan),zb(e)}function cE(){if(pb(H._interface),Z(U._extends))do eE();while(Z(U.comma));mE(!1,!1,!1)}function lE(){Q(U.num)||Q(U.string)?fT():$()}function uE(){Vb()===U.colon?(lE(),BT()):kE(),J(U.bracketR),BT()}function dE(){lE(),J(U.bracketR),J(U.bracketR),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function fE(){for(Q(U.lessThan)&&oE(),J(U.parenL);!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE(),J(U.parenR),BT()}function pE(){fE()}function mE(e,t,n){let r;for(t&&Q(U.braceBarL)?(J(U.braceBarL),r=U.braceBarR):(J(U.braceL),r=U.braceR);!Q(r)&&!G.error;){if(n&&q(H._proto)){let t=Vb();t!==U.colon&&t!==U.question&&(X(),e=!1)}if(e&&q(H._static)){let e=Vb();e!==U.colon&&e!==U.question&&X()}if(ME(),Z(U.bracketL))Z(U.bracketL)?dE():uE();else if(Q(U.parenL)||Q(U.lessThan))pE();else{if(q(H._get)||q(H._set)){let e=Vb();(e===U.name||e===U.string||e===U.num)&&X()}hE()}gE()}J(r)}function hE(){if(Q(U.ellipsis)){if(J(U.ellipsis),Z(U.comma)||Z(U.semi),Q(U.braceR))return;kE()}else lE(),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function gE(){!Z(U.semi)&&!Z(U.comma)&&!Q(U.braceR)&&!Q(U.braceBarR)&&yb()}function _E(e){for(e||$();Z(U.dot);)$()}function vE(){_E(!0),Q(U.lessThan)&&sE()}function yE(){J(U._typeof),CE()}function bE(){for(J(U.bracketL);G.pos<K.length&&!Q(U.bracketR)&&(kE(),!Q(U.bracketR));)J(U.comma);J(U.bracketR)}function xE(){let e=Vb();e===U.colon||e===U.question?($(),Z(U.question),BT()):kE()}function SE(){for(;!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE()}function CE(){let e=!1,t=G.noAnonFunctionType;switch(G.type){case U.name:if(q(H._interface)){cE();return}$(),vE();return;case U.braceL:mE(!1,!1,!1);return;case U.braceBarL:mE(!1,!0,!1);return;case U.bracketL:bE();return;case U.lessThan:oE(),J(U.parenL),SE(),J(U.parenR),J(U.arrow),kE();return;case U.parenL:if(X(),!Q(U.parenR)&&!Q(U.ellipsis))if(Q(U.name)){let t=Vb();e=t!==U.question&&t!==U.colon}else e=!0;if(e)if(G.noAnonFunctionType=!1,kE(),G.noAnonFunctionType=t,G.noAnonFunctionType||!(Q(U.comma)||Q(U.parenR)&&Vb()===U.arrow)){J(U.parenR);return}else Z(U.comma);SE(),J(U.parenR),J(U.arrow),kE();return;case U.minus:X(),hT();return;case U.string:case U.num:case U._true:case U._false:case U._null:case U._this:case U._void:case U.star:X();return;default:if(G.type===U._typeof){yE();return}else if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}}yb()}function wE(){for(CE();!mb()&&(Q(U.bracketL)||Q(U.questionDot));)Z(U.questionDot),J(U.bracketL),Z(U.bracketR)||(kE(),J(U.bracketR))}function TE(){Z(U.question)?TE():wE()}function EE(){TE(),!G.noAnonFunctionType&&Z(U.arrow)&&kE()}function DE(){for(Z(U.bitwiseAND),EE();Z(U.bitwiseAND);)EE()}function OE(){for(Z(U.bitwiseOR),DE();Z(U.bitwiseOR);)DE()}function kE(){OE()}function AE(){BT()}function jE(){$(),Q(U.colon)&&AE()}function ME(){(Q(U.plus)||Q(U.minus))&&(X(),G.tokens[G.tokens.length-1].isType=!0)}function NE(e){Q(U.colon)&&HT(),NT(!1,e)}function PE(e,t,n){if(Q(U.questionDot)&&Vb()===U.lessThan){if(t){n.stop=!0;return}X(),sE(),J(U.parenL),cT();return}else if(!t&&Q(U.lessThan)){let e=G.snapshot();if(sE(),J(U.parenL),cT(),G.error)G.restoreFromSnapshot(e);else return}oT(e,t,n)}function FE(){if(Q(U.lessThan)){let e=G.snapshot();sE(),G.error&&G.restoreFromSnapshot(e)}}function IE(){if(Q(U.name)&&G.contextualKeyword===H._interface){let e=Rb(0);return X(),tE(),zb(e),!0}else if(q(H._enum))return nD(),!0;return!1}function LE(){return q(H._enum)?(nD(),!0):!1}function RE(e){if(e===H._declare){if(Q(U._class)||Q(U.name)||Q(U._function)||Q(U._var)||Q(U._export)){let e=Rb(1);GT(),zb(e)}}else if(Q(U.name)){if(e===H._interface){let e=Rb(1);tE(),zb(e)}else if(e===H._type){let e=Rb(1);rE(),zb(e)}else if(e===H._opaque){let e=Rb(1);iE(!1),zb(e)}}vb()}function zE(){return q(H._type)||q(H._interface)||q(H._opaque)||q(H._enum)}function BE(){return Q(U.name)&&(G.contextualKeyword===H._type||G.contextualKeyword===H._interface||G.contextualKeyword===H._opaque||G.contextualKeyword===H._enum)}function VE(){if(q(H._type)){let e=Rb(1);X(),Q(U.braceL)?(lO(),rO()):rE(),zb(e)}else if(q(H._opaque)){let e=Rb(1);X(),iE(!1),zb(e)}else if(q(H._interface)){let e=Rb(1);X(),tE(),zb(e)}else sD(!0)}function HE(){return Q(U.star)||q(H._type)&&Vb()===U.star}function UE(){if(fb(H._type)){let e=Rb(2);oO(),zb(e)}else oO()}function WE(e){if(e&&Q(U.lessThan)&&sE(),q(H._implements)){let e=Rb(0);X(),G.tokens[G.tokens.length-1].type=U._implements;do nE(),Q(U.lessThan)&&sE();while(Z(U.comma));zb(e)}}function GE(){Q(U.lessThan)&&(oE(),Q(U.parenL)||yb())}function KE(){let e=Rb(0);Z(U.question),Q(U.colon)&&AE(),zb(e)}function qE(){if(Q(U._typeof)||q(H._type)){let e=Ub();(zT(e)||e.type===U.braceL||e.type===U.star)&&X()}}function JE(){let e=G.contextualKeyword===H._type||G.type===U._typeof;e?X():$(),q(H._as)&&!db(H._as)?($(),e&&!Q(U.name)&&!(G.type&U.IS_KEYWORD)||$()):(e&&(Q(U.name)||G.type&U.IS_KEYWORD)&&$(),fb(H._as)&&$())}function YE(){if(Q(U.lessThan)){let e=Rb(0);oE(),zb(e)}}function XE(){Q(U.colon)&&AE()}function ZE(){if(Q(U.colon)){let e=G.noAnonFunctionType;G.noAnonFunctionType=!0,AE(),G.noAnonFunctionType=e}}function QE(e,t){if(Q(U.lessThan)){let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n),G.type=U.typeParameterStart;else return r;let i=Rb(0);if(oE(),zb(i),r=Yw(e,t),r)return!0;yb()}return Yw(e,t)}function $E(){if(Q(U.colon)){let e=Rb(0),t=G.snapshot(),n=G.noAnonFunctionType;G.noAnonFunctionType=!0,HT(),G.noAnonFunctionType=n,mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(t),zb(e)}return Z(U.arrow)}function eD(e,t=!1){if(G.tokens[G.tokens.length-1].contextualKeyword===H._async&&Q(U.lessThan)){let e=G.snapshot();if(tD()&&!G.error)return;G.restoreFromSnapshot(e)}iT(e,t)}function tD(){G.scopeDepth++;let e=G.tokens.length;return zD(),yT()?(jT(e),!0):!1}function nD(){pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,$(),rD()}function rD(){fb(H._of)&&X(),J(U.braceL),iD(),J(U.braceR)}function iD(){for(;!Q(U.braceR)&&!G.error&&!Z(U.ellipsis);)aD(),Q(U.braceR)||J(U.comma)}function aD(){$(),Z(U.eq)&&X()}function oD(){if(ND(U.eof),G.scopes.push(new $y(0,G.tokens.length,!0)),G.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${G.scopeDepth}`);return new bO(G.tokens,G.scopes)}function sD(e){ib&&IE()||(Q(U.at)&&uD(),cD(e))}function cD(e){if(rb&&hw())return;let t=G.type;switch(t){case U._break:case U._continue:mD();return;case U._debugger:hD();return;case U._do:gD();return;case U._for:_D();return;case U._function:if(Vb()===U.dot)break;e||yb(),bD();return;case U._class:e||yb(),BD(!0);return;case U._if:xD();return;case U._return:SD();return;case U._switch:CD();return;case U._throw:wD();return;case U._try:ED();return;case U._let:case U._const:e||yb();case U._var:DD(t!==U._var);return;case U._while:OD();return;case U.braceL:MD();return;case U.semi:kD();return;case U._export:case U._import:{let e=Vb();if(e===U.parenL||e===U.dot)break;X(),t===U._import?pO():QD();return}case U.name:if(G.contextualKeyword===H._async){let e=G.start,t=G.snapshot();if(X(),Q(U._function)&&!mb()){J(U._function),RD(e,!0);return}else G.restoreFromSnapshot(t)}else if(G.contextualKeyword===H._using&&!gb()&&Vb()===U.name){DD(!0);return}else if(lD()){pb(H._await),DD(!0);return}default:break}let n=G.tokens.length;qw();let r=null;if(G.tokens.length===n+1){let e=G.tokens[G.tokens.length-1];e.type===U.name&&(r=e.contextualKeyword)}if(r==null){vb();return}Z(U.colon)?AD():jD(r)}function lD(){if(!q(H._await))return!1;let e=G.snapshot();return X(),!q(H._using)||hb()||(X(),!Q(U.name)||hb())?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function uD(){for(;Q(U.at);)dD()}function dD(){if(X(),Z(U.parenL))qw(),J(U.parenR);else{for($();Z(U.dot);)$();fD()}}function fD(){rb?kw():pD()}function pD(){Z(U.parenL)&&cT()}function mD(){X(),_b()||($(),vb())}function hD(){X(),vb()}function gD(){X(),sD(!1),J(U._while),gT(),Z(U.semi)}function _D(){G.scopeDepth++;let e=G.tokens.length;yD();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function vD(){return!(!q(H._using)||db(H._of))}function yD(){X();let e=!1;if(q(H._await)&&(e=!0,X()),J(U.parenL),Q(U.semi)){e&&yb(),PD();return}let t=lD();if(t||Q(U._var)||Q(U._let)||Q(U._const)||vD()){if(t&&pb(H._await),X(),ID(!0,G.type!==U._var),Q(U._in)||q(H._of)){FD(e);return}PD();return}if(qw(!0),Q(U._in)||q(H._of)){FD(e);return}e&&yb(),PD()}function bD(){let e=G.start;X(),RD(e,!0)}function xD(){X(),gT(),sD(!1),Z(U._else)&&sD(!1)}function SD(){X(),_b()||(qw(),vb())}function CD(){X(),gT(),G.scopeDepth++;let e=G.tokens.length;for(J(U.braceL);!Q(U.braceR)&&!G.error;)if(Q(U._case)||Q(U._default)){let e=Q(U._case);X(),e&&qw(),J(U.colon)}else sD(!0);X();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function wD(){X(),qw(),vb()}function TD(){FS(!0),rb&&MC()}function ED(){if(X(),MD(),Q(U._catch)){X();let e=null;if(Q(U.parenL)&&(G.scopeDepth++,e=G.tokens.length,J(U.parenL),TD(),J(U.parenR)),MD(),e!=null){let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}}Z(U._finally)&&MD()}function DD(e){X(),ID(!1,e),vb()}function OD(){X(),gT(),sD(!1)}function kD(){X()}function AD(){sD(!0)}function jD(e){rb?_w(e):ib?RE(e):vb()}function MD(e=!1,t=0){let n=G.tokens.length;G.scopeDepth++,J(U.braceL),t&&(G.tokens[G.tokens.length-1].contextId=t),ND(U.braceR),t&&(G.tokens[G.tokens.length-1].contextId=t);let r=G.tokens.length;G.scopes.push(new $y(n,r,e)),G.scopeDepth--}function ND(e){for(;!Z(e)&&!G.error;)sD(!0)}function PD(){J(U.semi),Q(U.semi)||qw(),J(U.semi),Q(U.parenR)||qw(),J(U.parenR),sD(!1)}function FD(e){e?fb(H._of):X(),qw(),J(U.parenR),sD(!1)}function ID(e,t){for(;;){if(LD(t),Z(U.eq)){let t=G.tokens.length-1;Jw(e),G.tokens[t].rhsEndIndex=G.tokens.length}if(!Z(U.comma))break}}function LD(e){FS(e),rb?Sw():ib&&XE()}function RD(e,t,n=!1){Q(U.star)&&X(),t&&!n&&!Q(U.name)&&!Q(U._yield)&&yb();let r=null;Q(U.name)&&(t||(r=G.tokens.length,G.scopeDepth++),MS(!1));let i=G.tokens.length;G.scopeDepth++,zD(),MT(e);let a=G.tokens.length;G.scopes.push(new $y(i,a,!0)),G.scopeDepth--,r!==null&&(G.scopes.push(new $y(r,a,!0)),G.scopeDepth--)}function zD(e=!1,t=0){rb?xw():ib&&YE(),J(U.parenL),t&&(G.tokens[G.tokens.length-1].contextId=t),IS(U.parenR,!1,!1,e,t),t&&(G.tokens[G.tokens.length-1].contextId=t)}function BD(e,t=!1){let n=ob();X(),G.tokens[G.tokens.length-1].contextId=n,G.tokens[G.tokens.length-1].isExpression=!e;let r=null;e||(r=G.tokens.length,G.scopeDepth++),XD(e,t),ZD();let i=G.tokens.length;if(UD(n),!G.error&&(G.tokens[i].contextId=n,G.tokens[G.tokens.length-1].contextId=n,r!==null)){let e=G.tokens.length;G.scopes.push(new $y(r,e,!1)),G.scopeDepth--}}function VD(){return Q(U.eq)||Q(U.semi)||Q(U.braceR)||Q(U.bang)||Q(U.colon)}function HD(){return Q(U.parenL)||Q(U.lessThan)}function UD(e){for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(Z(U.semi))continue;if(Q(U.at)){dD();continue}let t=G.start;WD(t,e)}}function WD(e,t){rb&&US([H._declare,H._public,H._protected,H._private,H._override]);let n=!1;if(Q(U.name)&&G.contextualKeyword===H._static){if($(),HD()){KD(e,!1);return}else if(VD()){YD();return}if(G.tokens[G.tokens.length-1].type=U._static,n=!0,Q(U.braceL)){G.tokens[G.tokens.length-1].contextId=t,MD();return}}GD(e,n,t)}function GD(e,t,n){if(rb&&gw(t))return;if(Z(U.star)){qD(n),KD(e,!1);return}qD(n);let r=!1,i=G.tokens[G.tokens.length-1];i.contextualKeyword===H._constructor&&(r=!0),JD(),HD()?KD(e,r):VD()?YD():i.contextualKeyword===H._async&&!_b()?(G.tokens[G.tokens.length-1].type=U._async,Q(U.star)&&X(),qD(n),JD(),KD(e,!1)):(i.contextualKeyword===H._get||i.contextualKeyword===H._set)&&!(_b()&&Q(U.star))?(i.contextualKeyword===H._get?G.tokens[G.tokens.length-1].type=U._get:G.tokens[G.tokens.length-1].type=U._set,qD(n),KD(e,!1)):i.contextualKeyword===H._accessor&&!_b()?(qD(n),YD()):_b()?YD():yb()}function KD(e,t){rb?QS():ib&&Q(U.lessThan)&&oE(),AT(e,t)}function qD(e){kT(e)}function JD(){if(rb){let e=Rb(0);Z(U.question),zb(e)}}function YD(){if(rb?(Bb(U.bang),MC()):ib&&Q(U.colon)&&AE(),Q(U.eq)){let e=G.tokens.length;X(),Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}vb()}function XD(e,t=!1){rb&&(!e||t)&&q(H._implements)||(Q(U.name)&&MS(!0),rb?QS():ib&&Q(U.lessThan)&&oE())}function ZD(){let e=!1;Z(U._extends)?(nT(),e=!0):e=!1,rb?yw(e):ib&&WE(e)}function QD(){let e=G.tokens.length-1;rb&&dw()||(iO()?aO():tO()?($(),Q(U.comma)&&Vb()===U.star?(J(U.comma),J(U.star),pb(H._as),$()):nO(),rO()):Z(U._default)?$D():cO()?eO():(lO(),rO()),G.tokens[e].rhsEndIndex=G.tokens.length)}function $D(){if(rb&&mw()||ib&&LE())return;let e=G.start;Z(U._function)?RD(e,!0,!0):q(H._async)&&Vb()===U._function?(fb(H._async),Z(U._function),RD(e,!0,!0)):Q(U._class)?BD(!0,!0):Q(U.at)?(uD(),BD(!0,!0)):(Jw(),vb())}function eO(){rb?vw():ib?VE():sD(!0)}function tO(){if(rb&&cw()||ib&&BE())return!1;if(Q(U.name))return G.contextualKeyword!==H._async;if(!Q(U._default))return!1;let e=Wb(),t=Ub(),n=t.type===U.name&&t.contextualKeyword===H._from;if(t.type===U.comma)return!0;if(n){let t=K.charCodeAt(Gb(e+4));return t===W.quotationMark||t===W.apostrophe}return!1}function nO(){Z(U.comma)&&lO()}function rO(){fb(H._from)&&(fT(),vO()),vb()}function iO(){return ib?HE():Q(U.star)}function aO(){ib?UE():oO()}function oO(){J(U.star),q(H._as)?sO():rO()}function sO(){X(),G.tokens[G.tokens.length-1].type=U._as,$(),nO(),rO()}function cO(){return rb&&cw()||ib&&zE()||G.type===U._var||G.type===U._const||G.type===U._let||G.type===U._function||G.type===U._class||q(H._async)||Q(U.at)}function lO(){let e=!0;for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.braceR))break;uO()}}function uO(){if(rb){pw();return}$(),G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,fb(H._as)&&$()}function dO(){let e=G.snapshot();return pb(H._module),fb(H._from)?q(H._from)?(G.restoreFromSnapshot(e),!0):(G.restoreFromSnapshot(e),!1):Q(U.comma)?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function fO(){q(H._module)&&dO()&&X()}function pO(){if(rb&&Q(U.name)&&Vb()===U.eq){XC();return}if(rb&&q(H._type)){let e=Ub();if(e.type===U.name&&e.contextualKeyword!==H._from){if(pb(H._type),Vb()===U.eq){XC();return}}else(e.type===U.star||e.type===U.braceL)&&pb(H._type)}Q(U.string)?fT():(fO(),gO(),pb(H._from),fT()),vO(),vb()}function mO(){return Q(U.name)}function hO(){NS()}function gO(){ib&&qE();let e=!0;if(!(mO()&&(hO(),!Z(U.comma)))){if(Q(U.star)){X(),pb(H._as),hO();return}for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(Z(U.colon)&&yb(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),J(U.comma),Z(U.braceR))break;_O()}}}function _O(){if(rb){fw();return}if(ib){JE();return}NS(),q(H._as)&&(G.tokens[G.tokens.length-1].identifierRole=Y.ImportAccess,X(),NS())}function vO(){(Q(U._with)||q(H._assert)&&!hb())&&(X(),wT(!1,!1))}function yO(){return G.pos===0&&K.charCodeAt(0)===W.numberSign&&K.charCodeAt(1)===W.exclamationMark&&Xb(2),qb(),oD()}var bO=class{constructor(e,t){this.tokens=e,this.scopes=t}};function xO(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);ub(e,t,n,r);let i=yO();if(G.error)throw sb(G.error);return i}function SO(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===H._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var CO=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,U.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(U.braceL))e++;else if(this.matches1(U.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=SO(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===U._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function wO(e,t,n,r){let i=t.snapshot(),a=EO(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(U.braceR,f);)if(t.matchesContextual(H._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));else if(t.matches1(U.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;OO(t.currentToken());)t.matches1(U._static)&&(a=!0),t.matches1(U.hash)&&(p=!0),(t.matches1(U._declare)||t.matches1(U._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(U.braceL)){TO(t,f);continue}if(p){TO(t,f);continue}if(t.matchesContextual(H._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));continue}let h=t.currentIndex();if(kO(t),t.matches1(U.lessThan)||t.matches1(U.parenL)){TO(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(U.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function TO(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;OO(e.tokenAtRelativeIndex(-1));)e.previousToken()}function EO(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(U.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(U.braceL,n);)e.matches1(U._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function DO(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(U.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),OO(e.currentToken())){for(e.nextToken();OO(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==U.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(U.braceR,n);){if(!i&&e.matches2(U._super,U.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(U.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function OO(e){return[U._async,U._get,U._set,U.plus,U.minus,U._readonly,U._static,U._public,U._private,U._protected,U._override,U._abstract,U.star,U._declare,U.hash].includes(e.type)}function kO(e){if(e.matches1(U.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(U.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function AO(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(U.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(U.dot);)e.removeToken(),e.removeToken()}var jO={typeDeclarations:new Set,valueDeclarations:new Set};function MO(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===U.name&&jb(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function NO(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,U.braceR);)t++;return e.matchesContextualAtIndex(t+1,H._from)&&e.matches1AtIndex(t+2,U.string)}function PO(e){(e.matches2(U._with,U.braceL)||e.matches2(U.name,U.braceL)&&e.matchesContextual(H._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function FO(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,U.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==U.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var IO=class e extends wx{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?MO(n):jO}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`\nmodule.exports = exports.default;\n`:``}process(){return this.tokens.matches3(U._import,U.name,U.eq)?this.processImportEquals():this.tokens.matches1(U._import)?(this.processImport(),!0):this.tokens.matches2(U._export,U.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(U._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(U.name,U.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(U.name)||this.tokens.matches1(U.jsxName)?this.processIdentifier():this.tokens.matches1(U.eq)?this.processAssignment():this.tokens.matches1(U.assign)?this.processComplexAssignment():this.tokens.matches1(U.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(U.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`);return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(U.name)||this.tokens.matches1(U.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(U.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(U.string);)(!e&&this.tokens.matches1(U.braceL)||this.tokens.matches1(U.comma))&&(this.tokens.removeToken(),this.tokens.matches1(U.braceR)||(t=!0),(this.tokens.matches2(U.name,U.comma)||this.tokens.matches2(U.name,U.braceR)||this.tokens.matches4(U.name,U.name,U.name,U.comma)||this.tokens.matches4(U.name,U.name,U.name,U.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(U.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===Y.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==Y.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===U.parenR;)n++;return this.tokens.tokens[n].type===U.parenL?this.tokens.tokenAtRelativeIndex(1).type===U.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==U._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(U._export,U._default))return this.tokens.matches3(U._export,U._default,U._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(U._export,U.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(U._export,U._var)||this.tokens.matches2(U._export,U._let)||this.tokens.matches2(U._export,U._const))return this.processExportVar(),!0;if(this.tokens.matches2(U._export,U._function)||this.tokens.matches3(U._export,U.name,U._function))return this.processExportFunction(),!0;if(this.tokens.matches2(U._export,U._class)||this.tokens.matches3(U._export,U._abstract,U._class)||this.tokens.matches2(U._export,U.at))return this.processExportClass(),!0;if(this.tokens.matches2(U._export,U.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot)||e>=2&&[U._var,U._let,U._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,U.dot)||this.tokens.matches1AtIndex(e+2,U.bracketL)||this.tokens.matches1AtIndex(e+2,U.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,U.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name)||this.tokens.matches3(U._export,U._default,U.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(U.at);)if(this.tokens.copyToken(),this.tokens.matches1(U.parenL))this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR);else{for(this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.dot);)this.tokens.copyExpectedToken(U.dot),this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.parenL)&&(this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,U.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,U.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(U.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(U.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL)||this.tokens.matches1(U.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(U.braceR)||this.tokens.matches1(U.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(U.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(kb(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \\`export var\\` syntax.`);Pb(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(U._function))this.tokens.copyToken();else if(this.tokens.matches2(U.name,U._function)){if(!this.tokens.matchesContextual(H._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(U.star)&&this.tokens.copyToken(),!this.tokens.matches1(U.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(U.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=NO(this.tokens),t=[];for(;;){if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}let n=yx(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(U.comma,U.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(U.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(H._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(U.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(U.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},LO=class extends wx{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?Nx(e,s):new Set,this.declarationInfo=i&&!o?MO(e):jO,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(U._import,U.name,U.eq))return this.processImportEquals();if(this.tokens.matches4(U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(U._export,U.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(U._export,U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(U._import))return this.processImport();if(this.tokens.matches2(U._export,U._default))return this.processExportDefault();if(this.tokens.matches2(U._export,U.braceL))return this.processNamedExports();if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(U.string);)this.tokens.removeToken();this.tokens.removeToken(),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(U._import),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return!0;if(this.tokens.matches1(U.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(H._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(U.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(U.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(U.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(U.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(U.star),this.tokens.copyExpectedToken(U.name),this.tokens.copyExpectedToken(U.name));else if(this.tokens.matches1(U.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(U.braceR);){t=!0;let n=yx(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(U.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)||this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(U._export),this.tokens.copyExpectedToken(U.braceL);let e=NO(this.tokens),t=!1;for(;!this.tokens.matches1(U.braceR);){let n=yx(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(U.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},RO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(U._export,U._default,U._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(U.name);let e=!1;this.tokens.matchesContextual(H._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(H._symbol),this.tokens.removeToken());let t=this.tokens.matches3(U.braceL,U.name,U.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(U.braceR);){if(this.tokens.matches1(U.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(U.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function zO(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var BO=`jest`,VO=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],HO=class e extends wx{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(U.name,U.dot,U.name,U.parenL)&&this.tokens.identifierName()===BO?!zO([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(BO)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(U.dot,U.name,U.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(VO.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),e=!0}return!0}},UO=class extends wx{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(U.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},WO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(U._catch,U.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},GO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(U.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(U._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==U._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,U._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(U.questionDot,U.parenL)||this.tokens.matches2(U.questionDot,U.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalCall\', ${n}`);else if(this.tokens.matches2(U.questionDot,U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}`);else if(this.tokens.matches1(U.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}.`);else if(this.tokens.matches1(U.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}.`);else if(this.tokens.matches1(U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}[`);else if(this.tokens.matches1(U.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'call\', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===U._super;t--}}},KO=class extends wx{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(U.name,U.dot,U.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(U.parenL),this.tokens.copyExpectedToken(U.braceL),this.tokens.appendCode(`displayName: \'${t}\',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),this.tokens.copyExpectedToken(U.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,U.name,U.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===Y.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,U._export,U._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(U.parenL,U.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===U.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===Y.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,U.parenR)||this.tokens.matches2AtIndex(e,U.comma,U.parenR)}},qO=class e extends wx{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`\n (function () {\n var enterModule = require(\'react-hot-loader\').enterModule;\n enterModule && enterModule(module);\n })();`.replace(/\\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&jb(t)&&t.identifierRole!==Y.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`\n;(function () {\n var reactHotLoader = require(\'react-hot-loader\').default;\n var leaveModule = require(\'react-hot-loader\').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`\n`)}\n leaveModule(module);\n})();`}process(){return!1}},JO=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function YO(e){if(e.length===0||!Tb[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!wb[e.charCodeAt(t)])return!1;return!JO.has(e)}var XO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._public)||this.tokens.matches1(U._protected)||this.tokens.matches1(U._private)||this.tokens.matches1(U._abstract)||this.tokens.matches1(U._readonly)||this.tokens.matches1(U._override)||this.tokens.matches1(U.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(U._enum)||this.tokens.matches2(U._const,U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(U._const)||this.tokens.matches1(U._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(U.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(U.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(U.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(U.eq,U.string,U.comma)||this.tokens.matches3(U.eq,U.string,U.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(U.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(U.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===U.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:YO(t)?t:null}}else if(e.type===U.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:YO(t)?t:null}}else throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},ZO=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new GO(a,this.nameManager)),this.transformers.push(new UO(a)),this.transformers.push(new WO(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Tx(this,a,o,this.nameManager,i)),this.transformers.push(new KO(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new qO(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new IO(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new LO(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new RO(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new XO(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new HO(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`\n`);return i===-1&&(i=r.length,r+=`\n`),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}else return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL))e++;else if(this.tokens.matches1(U.braceR)){if(e===0)return;e--}if(this.tokens.matches1(U.parenL))t++;else if(this.tokens.matches1(U.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(U._class)){this.processClass();return}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(U._class,U.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=wO(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(U._class);!this.tokens.matchesContextIdAndLabel(U.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(U.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(U.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(U.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(U.string)||this.tokens.matches1(U.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(U.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(U.parenR,U.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,U.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(H._async)&&!this.tokens.matches1(U._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==U.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,U.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};o((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`\n`,n=`\\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++;break}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function QO(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,U._import)&&!e.matches3AtIndex(n,U._import,U.name,U.eq)&&$O(e,n,t);return t}function $O(e,t,n){t++,!e.matches1AtIndex(t,U.parenL)&&(e.matches1AtIndex(t,U.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,U.comma)&&t++),e.matches1AtIndex(t,U.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,U.braceL)&&(t++,ek(e,t,n)))}function ek(e,t,n){for(;;){if(e.matches1AtIndex(t,U.braceR))return;let r=yx(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,U.comma,U.braceR)||e.matches1AtIndex(t,U.braceR))return;if(e.matches1AtIndex(t,U.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function tk(e,t){kS(t);try{let n=nk(e,t),r=new ZO(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:mS(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function nk(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=xO(e,n,r,i),s=o.tokens,c=o.scopes,l=new CS(e,s),u=new _S(l),d=new CO(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new Px(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),vS(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&vS(d,c,QO(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var rk={react:d,"react/jsx-runtime":V};function ik(e){if(e in rk)return rk[e];throw Error(`\'${e}\' cannot be imported here. Only \'react\' can.`)}function ak(e){let{code:t}=tk(e,{transforms:[`typescript`,`jsx`,`imports`],jsxRuntime:`automatic`,production:!0}),n={require:ik,module:{exports:{}},ran:!1};window.__componentCode=n;let r=document.createElement(`script`);if(r.textContent=`(function (require, module, exports) {\ntry {\n${t}\n} catch (error) { __componentCode.error = error; }\n__componentCode.ran = true;\n})(__componentCode.require, __componentCode.module, __componentCode.module.exports);`,document.head.append(r),r.remove(),delete window.__componentCode,n.error)throw n.error;if(!n.ran)throw Error(`The host did not let the component run.`);let{default:i,...a}=n.module.exports;return typeof i==`function`&&i.name&&i.name!=="default"?{[i.name]:i,...a}:a}function ok({error:e}){throw e}function sk({source:e,code:t,file:n=`Code`,controls:r,note:i,onChange:a}){let o=(0,d.useMemo)(()=>{try{return{scope:ak(e)}}catch(e){return{error:e}}},[e]);return o.scope?(0,V.jsx)(_y,{interactive:!0,scope:o.scope,code:t,file:n,controls:r,note:i,onChange:({prop:e,value:t,code:r})=>a({prop:e,value:t,file:n,files:{[n]:r}})}):(0,V.jsx)(_y,{code:t,file:n,children:(0,V.jsx)(ok,{error:o.error})})}var ck=new Cv({name:`Component Code`,version:Ky}),lk=(0,Gy.createRoot)(document.getElementById(`root`)),uk=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,dk,fk={},pk=!1,mk,hk=e=>{ck.getHostCapabilities()?.updateModelContext&&(clearTimeout(mk),mk=setTimeout(()=>{let t=document.querySelector(`.cc-problem`)?.textContent||void 0;pk=!0,ck.updateModelContext({content:[{type:`text`,text:Zy({...e,problem:t})}]}).catch(()=>{})},400))},gk=()=>ck.getHostCapabilities()?.updateModelContext?`The chat sees this state`:void 0,_k=()=>{clearTimeout(mk),pk&&(pk=!1,ck.updateModelContext({content:[]}).catch(()=>{}))},vk=()=>{if(document.documentElement.style.colorScheme=uk,dk===void 0)return;let e=Jy.safeParse(dk),t=qy.safeParse(dk);lk.render(e.success?(0,V.jsx)(zy,{...e.data,theme:uk,note:gk(),onChange:({file:e,prop:t,value:n,code:r})=>{fk={...fk,[e]:r},hk({prop:t,value:n,file:e,files:fk})}}):t.success?(0,V.jsx)(sk,{...t.data,note:gk(),onChange:hk}):(0,V.jsx)(`p`,{children:t.error.message}))};ck.addEventListener(`toolinput`,e=>{dk=e.arguments;let t=Jy.safeParse(dk);fk=t.success?{...t.data.files}:{},_k(),vk()}),ck.addEventListener(`hostcontextchanged`,e=>{e.theme&&(uk=e.theme),vk()}),await ck.connect(),uk=ck.getHostContext()?.theme??uk,vk();var yk={host:ck.getHostVersion(),capabilities:ck.getHostCapabilities()};console.info(`Component Code host`,yk),yk.capabilities?.logging&&ck.sendLog({level:`info`,logger:`Component Code`,data:yk}).catch(()=>{});</script>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var d0=Re.object({source:Re.string().describe("The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:Re.string().describe("How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."),file:Re.string().optional().describe("The file named in the code's tab, such as `Card.tsx`."),controls:Re.record(Re.string(),Re.union([Re.literal(!1),Re.array(Re.union([Re.string(),Re.number()])),Re.object({min:Re.number().optional(),max:Re.number().optional(),step:Re.number().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),p0=Re.object({files:Re.record(Re.string(),Re.string()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:Re.record(Re.string(),Re.union([Re.literal(!0),Re.array(Re.union([Re.string(),Re.number()])),Re.object({min:Re.number().optional(),max:Re.number().optional(),step:Re.number().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")});var yv="ui://mcp-ui-tools/component-code.html",m0=e=>{Od(e,"show_in_component_code",{title:"Show in Component Code",description:"Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.",inputSchema:d0,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:yv}}},({file:t,code:r})=>({content:[{type:"text",text:`Showing ${t??"the component"} in Component Code:
|
|
81
|
+
`)}writeFrame(e){if(!(this._sse===void 0||this._sse.closed))try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(t){this.onerror?.(new Error(`Failed to write to the response stream: ${t}`))}}};function oE(e){return e instanceof Wk?Kk(e):void 0}function iE(e){return typeof e=="object"&&e!==null&&"setScopeChallengeResolver"in e&&typeof e.setScopeChallengeResolver=="function"}var aE=8,sE=6e5;function cE(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??aE,roundTimeoutMs:e?.roundTimeoutMs??sE,legacyShim:e?.legacyShim??!0}}function Qk(e,t,r){if(r===null||typeof r!="object"||typeof r.method!="string")throw new de(ee.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=r,n=LS(i);if(n===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:n}}function lE(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=[...t].map(i=>i.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function pv(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(ee.InternalError,t)}var uE=class{constructor(e){this._host=e}async fulfill(e,t,r,i,n){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=n,l=0;for(;;){if(l+=1,l>o)return pv(e,uk(e,o));let u=c.inputRequests,d=u!=null&&Object.keys(u).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!d&&f===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let h;if(d){let S=this._host.resolvedClientCapabilities(i),y=[];for(let[k,z]of Object.entries(u)){let{embedded:O,required:x}=Qk(e,k,z);if(O.method!=="roots/list"&&O.params===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${k}' of kind '${O.method}' without params`);if(md(x,S)!==void 0)return pv(e,`Cannot request input '${k}' (${O.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);y.push([k,O])}let T=pk(s);try{let k={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:T.signal},z=await Promise.all(y.map(async([O,x])=>{try{return[O,await this._dispatchLeg(x,k)]}catch(_){throw T.abort(_),_}}));h=Object.fromEntries(z)}catch(k){if(s.aborted)throw k;return pv(e,`Fulfilling input required by '${e}' failed: ${k instanceof Error?k.message:String(k)}`)}finally{T.dispose()}}else await dk(lk,s);let g={...i,mcpReq:{...i.mcpReq,inputResponses:h,droppedInputResponseKeys:void 0,requestState:Ha(f)}};if(f!==void 0){let S=await this._host.verifyRequestState(f,g,e);S!==void 0&&(g=X1(g,S))}let b=await t(r,g);if(!cn(b))return b;c=b}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return r.mode==="url"&&r.elicitationId===void 0&&(r={...r,elicitationId:lE()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},dE=new Set(["tools/call","prompts/get","resources/read"]),pE,Xk,Yk;function gv(e,t){Xk(e,t)}function vv(e){return Yk(e)}var e0=class extends ev{_clientCapabilities;_clientVersion;static{pE=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},Xk=(e,t)=>{let r=t.filter(i=>!e._supportedProtocolVersions.includes(i));r.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...r]),e.setRequestHandler("server/discover",()=>e._ondiscover())},Yk=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uE({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new Rd,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=cE(t?.inputRequired),t?.cacheHints!==void 0){for(let[r,i]of Object.entries(t.cacheHints))i!==void 0&&V1(i,`cacheHints['${r}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",r=>this._oninitialize(r)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),fd(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(this.transport!==void 0)throw new ve(ke.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=oE(e)?.revision;t!==void 0&&!this._servedModernEra()&&Zt.includes(t)&&fd(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,n=Sd(An,i);return n.success&&this._loggingLevels.set(r,n.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(i,n,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[En],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:n,logger:o}})},elicitInput:(i,n)=>this.elicitInput(i,n),requestSampling:(i,n)=>this.createMessage(i,n)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(An.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return r?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(r):!1};registerCapabilities(e){if(this.transport)throw new ve(ke.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=tv(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let r=this._cacheHints?.[e],i=dE.has(e);return r===void 0&&!i?async(n,o)=>{let a=await t(n,o);if(cn(a))throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(n,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,n,o):await t(n,o);if(cn(a)){if(!i)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return r===void 0?a:hd(a,r)}}return async(r,i)=>{let n=sn(this._negotiatedProtocolVersion),o=n.validateRequest("tools/call",r);if(!o.ok)throw new de(o.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,r,i);if(cn(a))return a;let s=q1(a),c=n.validateResult("tools/call",s);if(!c.ok)throw new de(c.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Ao(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,r,i){let n=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let d=await this._verifyRequestState(o,i,e);d!==void 0&&(a=X1(i,d))}let s;try{s=await t(r,a)}catch(d){throw d instanceof de&&d.code===ee.UrlElicitationRequired&&n?new de(ee.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):d}if(!cn(s))return s;if(!n){if(!this._inputRequiredServing.legacyShim)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??fr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,u=typeof s.requestState=="string";if(!l&&!u)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let d=this._inputRequestCapabilityView(i);for(let[f,h]of Object.entries(c)){let{embedded:g,required:b}=Qk(e,f,h),S=md(b,d);if(S!==void 0)throw new vd({requiredCapabilities:S},`Cannot request input '${f}' (${g.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,r){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${r}: ${i instanceof Error?i.message:String(i)}`)),new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[on]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ke.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ke.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ke.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ke.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ke.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ke.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ke.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ke.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=VS(this._supportedProtocolVersions),i=r.includes(t)?t:r[0]??fr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:fd(this._supportedProtocolVersions),capabilities:mE(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ke.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],u=l.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new de(ee.InvalidParams,"The last message must contain only tool_result content if any is present");if(!u)throw new de(ee.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(a.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new de(ee.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),n=this._wireCodec().samplingResultVariant(r,i);if(!n.ok)throw new ve(ke.InvalidResult,`Invalid sampling/createMessage result: ${n.reason==="invalid"?n.message:n.reason}`);return n.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ke.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",n=r?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(n&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(ee.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function mE(e){return{...e}}function fE(e,t){let r=0,i=[e];for(;i.length>0;){let n=i.pop();if(!(n===null||typeof n!="object"))if(Array.isArray(n))for(let o of n){if(++r>t)return r;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;if(++r>t)return r;let a=n[o];a!==null&&typeof a=="object"&&i.push(a)}}return r}function hE(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var Ba=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return Fk;try{let r=kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new e0(e,t),this._maxToolInputElements=hE(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return iE(e)&&e.setScopeChallengeResolver(t=>this.resolveScopeChallenge(t)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredTools[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}case"resources/read":{let t=e.request.params?.uri;if(typeof t!="string")return;let r;try{r=new URL(t)}catch{return}let i=this._registeredResources[r.toString()];if(i!==void 0)return i.enabled?i.scopeChallenge?.(e):void 0;for(let n of Object.values(this._registeredResourceTemplates))if(n.resourceTemplate.uriTemplate.match(r.toString()))return n.enabled?n.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredPrompts[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?gE(e,t.inputSchema):Fk,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=kr(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new de(ee.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),n=await this.executeToolHandler(r,i,t);return await this.validateToolOutput(r,n,e.params.name),cn(n)?n:this.server.projectCallToolResult(n,r.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===ee.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(this._maxToolInputElements!==void 0&&fE(t,this._maxToolInputElements)>this._maxToolInputElements)throw new de(ee.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await yr(e.inputSchema,t??{});if(!i.success)throw new de(ee.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||cn(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(ee.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await yr(e.outputSchema,t.structuredContent);if(!i.success)throw new de(ee.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return Z1(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return J1(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(ee.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return Ja;let i=Jk(Zk(r.argsSchema)?.[e.params.argument.name]);if(!mv(i))return Ja;let n=nE(i);return n?Hk(await n(e.params.argument.value,e.params.context)):Ja}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(n=>n.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return Ja;throw new de(ee.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?Hk(await i(e.params.argument.value,e.params.context)):Ja}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([n,o])=>o.enabled).map(([n,o])=>({uri:n,name:o.name,...o.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let o=await n.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...n.metadata,...a})}return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new de(ee.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new de(ee.InvalidParams,`Resource ${r} disabled`);return hd(await i.readCallback(r,t),i.cacheHint)}for(let n of Object.values(this._registeredResourceTemplates)){let o=n.resourceTemplate.uriTemplate.match(r.toString());if(o){if(!n.enabled)throw new de(ee.InvalidParams,`Resource template ${n.resourceTemplate.uriTemplate} disabled`);return hd(await n.readCallback(r,o,t),n.cacheHint)}}throw new gd(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?ck(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:n,scopeChallenge:o,...a}=r,s=a;if(n!==void 0&&V1(n,`resource ${e}`),typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let c=this._createRegisteredResource(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let c=this._createRegisteredResourceTemplate(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}}_createRegisteredResource(e,t,r,i,n,o){let a={name:e,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==r&&(delete this._registeredResources[r],s.uri&&(this._registeredResources[s.uri]=a)),s.name!==void 0&&(a.name=s.name),s.metadata!==void 0&&(a.metadata=s.metadata),s.title!==void 0&&(a.title=s.title,a.metadata={...a.metadata,title:s.title}),s.callback!==void 0&&(a.readCallback=s.callback),s.scopeChallenge!==void 0&&(a.scopeChallenge=s.scopeChallenge===null?void 0:s.scopeChallenge),s.enabled!==void 0&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,n,o){let a={resourceTemplate:r,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:c=>{c.name!==void 0&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=a)),c.template!==void 0&&(a.resourceTemplate=c.template),c.metadata!==void 0&&(a.metadata=c.metadata),c.title!==void 0&&(a.title=c.title,a.metadata={...a.metadata,title:c.title}),c.callback!==void 0&&(a.readCallback=c.callback),c.scopeChallenge!==void 0&&(a.scopeChallenge=c.scopeChallenge===null?void 0:c.scopeChallenge),c.enabled!==void 0&&(a.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,n,o,a,s){let c=i,l=n,u={title:t,description:r,argsSchema:i,icons:o,scopeChallenge:a,_meta:s,handler:Gk(e,i,n),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d.scopeChallenge!==void 0&&(u.scopeChallenge=d.scopeChallenge===null?void 0:d.scopeChallenge),d._meta!==void 0&&(u._meta=d._meta);let f=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,c=d.argsSchema,f=!0),d.callback!==void 0&&(l=d.callback,f=!0),f&&(u.handler=Gk(e,c,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=Zk(i);d&&Object.values(d).some(f=>mv(Jk(f)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,r,i,n,o,a,s,c,l,u){ov(e);let d=u,f,h={title:t,description:r,inputSchema:i,outputSchema:n,get outputSchemaJson(){return f??=Vk(h.outputSchema)},set outputSchemaJson(g){f=g},annotations:o,icons:a,execution:s,scopeChallenge:c,_meta:l,handler:u,executor:Lk(i,u),enabled:!0,disable:()=>h.update({enabled:!1}),enable:()=>h.update({enabled:!0}),remove:()=>h.update({name:null}),update:g=>{g.name!==void 0&&g.name!==e&&(typeof g.name=="string"&&ov(g.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],g.name&&(delete this._toolInputSchemaJson[g.name],this._registeredTools[g.name]=h,e=g.name)),g.title!==void 0&&(h.title=g.title),g.description!==void 0&&(h.description=g.description);let b=!1;g.paramsSchema!==void 0&&(h.inputSchema=g.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),g.callback!==void 0&&(h.handler=g.callback,d=g.callback,b=!0),b&&(h.executor=Lk(h.inputSchema,d)),g.outputSchema!==void 0&&(h.outputSchema=g.outputSchema,h.outputSchemaJson=Vk(g.outputSchema)),g.annotations!==void 0&&(h.annotations=g.annotations),g.icons!==void 0&&(h.icons=g.icons),g.scopeChallenge!==void 0&&(h.scopeChallenge=g.scopeChallenge===null?void 0:g.scopeChallenge),g._meta!==void 0&&(h._meta=g._meta),g.enabled!==void 0&&(h.enabled=g.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=h,this.setToolRequestHandlers(),this.sendToolListChanged(),h}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:n,inputSchema:o,outputSchema:a,annotations:s,icons:c,scopeChallenge:l,_meta:u}=t;return this._createRegisteredTool(e,i,n,kd(o),kd(a),s,c,void 0,l,u,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:n,argsSchema:o,icons:a,scopeChallenge:s,_meta:c}=t,l=this._createRegisteredPrompt(e,i,n,kd(o),r,a,s,c);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function Lk(e,t){if(e){let i=t;return async(n,o)=>i(n,o)}let r=t;return async(i,n)=>r(n)}var Fk={type:"object",properties:{}};function gE(e,t){let r=kr(t,"input"),i=B1(r);return i.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${i.reason}`),r}function Vk(e){if(e!==void 0)try{return kr(e,"output")}catch{return}}function Gk(e,t,r){if(t){let i=r;return async(n,o)=>{let a=await yr(t,n??{});if(!a.success)throw new de(ee.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=r;return async(n,o)=>i(o)}}function Hk(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Ja={completion:{values:[],hasMore:!1}};function Zk(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function vE(e){return e?.type==="optional"}function Jk(e){return vE(e)?e.def?.innerType??e:e}function yE(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function bE(e,t){let r={},i=n=>t===void 0||n===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(r.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(r.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(r.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(r.resourceSubscriptions=[...e.resourceSubscriptions]),r}var Ed=1024;function t0(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[hr]:t}}}}function _E(e){let t=sn(Ga).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var SE=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),n0=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Ed,t,r){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=r}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t)}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=_E(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let r=bE(t,this._serverCapabilities);return this._subs.set(e.id,r),t0({method:"notifications/subscriptions/acknowledged",params:{notifications:r}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!SE.has(e.method))return"passthrough";let t=e.params?.uri,r=typeof t=="string"?t:void 0,i=kE(e.method,r),n=[];for(let[o,a]of this._subs)yE(a,i)&&n.push(t0({method:e.method,params:e.params??{}},o));return n}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[hr]:t,...this._serverInfo!==void 0&&{[Ht]:this._serverInfo}}}});return this._subs.clear(),e}};function kE(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var EA=4*1024*1024;var r0="https://cdn.jsdelivr.net";function o0(e,...t){let r=new Ba(e);for(let i of t)i(r);return r}function i0(e,t){Sv(e,t.name,t.uri,{description:t.description},()=>({contents:[{uri:t.uri,mimeType:Pd,text:t.html,_meta:{ui:{csp:{resourceDomains:[r0]}}}}]}))}var a0=Symbol("swallowsErrorsAfterClose"),$E=class{_readBuffer;_started=!1;_closed=!1;constructor(e=dv.stdin,t=dv.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new nv({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0;for(let e of this._stdout.listeners("error"))e[a0]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[a0]=!0,this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=rv(e),n=!1,o=s=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),r(s))},a=()=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(n)return;n=!0,this._stdout.off("error",o),t()}else n||this._stdout.once("drain",a)})}},s0=3e3,wE=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,r){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=r}async start(){}async send(e,t){if(br(e)||Sr(e)){let{id:r}=e;r!==void 0&&this._settle(r)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(_t(e))this._pendingRequests.add(e.id);else if(Mn(e)&&e.method==="notifications/cancelled"){let r=e.params?.requestId;r!==void 0&&this._settle(r)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let r=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(n=>n!==r),t(!1)},e);this._drainWaiters.push(r)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function TE(e){let t=e.params;if(e.method==="initialize"&&!K1(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!yd(t))return{kind:"legacy",reason:"no-claim"};let r=_r(t),i=(r===void 0?[]:_d(r))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let n=bd(t);return n===void 0||!Zt.includes(n)?{kind:"unsupported-revision",requested:n??"unknown"}:{kind:"modern",revision:n,classification:{era:"modern",revision:n}}}function c0(e,t={}){let r=t.legacy??"serve",i=t.transport??new $E,n={phase:"opening"},o,a=!1,s=()=>a||n.phase==="closed",c=I=>{try{t.onerror?.(I)}catch{}},l=(I,A,F,q)=>i.send({jsonrpc:"2.0",id:I,error:{code:A,message:F,...q!==void 0&&{data:q}}}).catch(V=>c(Mt(V))),u=new n0(t.maxSubscriptions??Ed),d=I=>{if(!Mn(I))return;let A=u.routeOutbound(I);if(A!=="passthrough"){for(let F of A)i.send({jsonrpc:"2.0",...F}).catch(q=>c(Mt(q)));return"handled"}},f=async I=>{if(_t(I)&&I.method==="subscriptions/listen"){let A=_r(I.params),F=yd(I.params)?(A===void 0?[]:_d(A))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},q=bd(I.params),V;if(F!==void 0)V={jsonrpc:"2.0",id:I.id,error:{code:-32602,message:`Invalid _meta envelope: ${F.key}: ${F.problem}`}};else if(q===void 0||!Zt.includes(q)){let te=new jo({supported:[...Zt],requested:q??"unknown"});V={jsonrpc:"2.0",id:I.id,error:{code:te.code,message:te.message,data:te.data}}}else V=u.serve(I);return await i.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(te=>c(Mt(te))),!0}if(Mn(I)&&I.method==="notifications/cancelled"){let A=I.params?.requestId;if(A!==void 0&&u.cancel(A))return!0}return!1},h=(I,A,F)=>{let q=W1({kind:"legacy",reason:A,...F!==void 0&&{requestedVersion:F}},Zt);return q===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${q.cell}): ${q.message}`)),l(I.id,q.code,q.message,q.data))},g=I=>{a||I===o||x()},b=async(I,A)=>{let F=await e({era:I}),q=F instanceof Ba?F.server:F;I==="modern"&&(Y1(q,A),gv(q,Zt),u.setServerCapabilities(q.getCapabilities(),vv(q)));let V=new wE(i,()=>g(V),I==="modern"?d:void 0);return await F.connect(V),{product:F,channel:V}},S=I=>I.product.close().catch(A=>c(Mt(A))),y=async I=>{o=I.channel;try{await I.channel.whenRequestsAnswered(s0)||c(new Error(`Discarded the probe instance with requests still unanswered after ${s0}ms; continuing with the fallback`)),await I.product.close()}catch(A){c(Mt(A))}finally{o=void 0}},T=async I=>{if(n.phase==="closed")return;if(n.phase==="pinned"){if(n.era==="modern"&&_t(I)&&I.method==="initialize"&&!K1(I.params)){await h(I,"initialize",I.params!==null&&typeof I.params=="object"&&typeof I.params.protocolVersion=="string"?I.params.protocolVersion:void 0);return}if(n.era==="modern"&&await f(I)||s())return;n.instance.channel.deliver(I);return}if(!_t(I)&&!Mn(I)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let A=TE(I);switch(A.kind){case"invalid-envelope":{let F=`Invalid _meta envelope for protocol revision 2026-07-28: ${A.issue.key}: ${A.issue.problem}`;_t(I)?await l(I.id,ee.InvalidParams,F,{envelope:A.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${F}`));return}case"unsupported-revision":if(_t(I)){let F=new jo({supported:[...Zt],requested:A.requested});c(F),await l(I.id,F.code,F.message,F.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${A.requested}`));return;case"modern":if(_t(I)&&I.method==="server/discover"){if(n.phase==="probe"){n.instance.channel.deliver(I,{classification:A.classification});return}let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"probe",instance:F},F.channel.deliver(I,{classification:A.classification});return}if(n.phase==="probe"){if(Mn(I)){n.instance.channel.deliver(I,{classification:A.classification});return}n={phase:"pinned",era:"modern",instance:n.instance}}else{let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"pinned",era:"modern",instance:F}}if(await f(I)||s())return;n.instance.channel.deliver(I,{classification:A.classification});return;case"legacy":{if(r==="reject"){_t(I)&&await h(I,A.reason,A.requestedVersion);return}if(n.phase==="probe"){if(await y(n.instance),s())return;n={phase:"opening"}}let F=await b("legacy");if(s()){await S(F);return}n={phase:"pinned",era:"legacy",instance:F},n.instance.channel.deliver(I);return}}},k=[],z=!1,O=async()=>{if(!z){z=!0;try{for(;k.length>0;){let I=k.shift();try{await T(I)}catch(A){_t(I)&&await l(I.id,ee.InternalError,"Internal server error"),c(Mt(A))}}}finally{z=!1}}},x=async()=>{if(a||n.phase==="closed")return;a=!0;let I=n;n={phase:"closed"};for(let A of u.teardownAll())await i.send(A).catch(F=>c(Mt(F)));(I.phase==="probe"||I.phase==="pinned")&&await I.instance.product.close().catch(A=>c(Mt(A))),await i.close().catch(A=>c(Mt(A)))};i.onmessage=I=>{k.push(I),O()},i.onerror=I=>{c(I),(n.phase==="probe"||n.phase==="pinned")&&n.instance.channel.onerror?.(I)},i.onclose=()=>{if(a||n.phase==="closed")return;a=!0;let I=n;n={phase:"closed"},(I.phase==="probe"||I.phase==="pinned")&&I.instance.product.close().catch(A=>c(Mt(A)))};let _=i.start().catch(I=>{throw c(Mt(I)),I});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await x()}}}function Mt(e){return e instanceof Error?e:new Error(String(e))}var l0="0.5.0";var u0='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Component Code</title>\n <style>\n @font-face {\n font-family: Geist;\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-sans/Geist-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n body {\n margin: 0;\n padding: 1px;\n font-family: Geist, ui-sans-serif, system-ui, sans-serif;\n }\n </style>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=ee.prototype=new y;te.constructor=ee,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var ie={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function oe(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return oe(e.type,t,e.props)}function ce(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function le(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?le(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function pe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,pe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),pe(o,r,i,``,function(e){return e})):o!=null&&(ce(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+de(a,u),c+=pe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+de(a,u++),c+=pe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return pe(fe(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function b(e,t,n){if(e==null)return e;var r=[],i=0;return pe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function me(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var he=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ge={map:b,forEach:function(e,t,n){b(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!ce(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ie.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return oe(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return oe(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ce,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:me}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ie.T,n={};ie.T=n;try{var r=e(),i=ie.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,he)}catch(e){he(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),ie.T=t}},e.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},e.use=function(e){return ie.H.use(e)},e.useActionState=function(e,t,n){return ie.H.useActionState(e,t,n)},e.useCallback=function(e,t){return ie.H.useCallback(e,t)},e.useContext=function(e){return ie.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return ie.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return ie.H.useEffect(e,t)},e.useEffectEvent=function(e){return ie.H.useEffectEvent(e)},e.useId=function(){return ie.H.useId()},e.useImperativeHandle=function(e,t,n){return ie.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ie.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ie.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ie.H.useMemo(e,t)},e.useOptimistic=function(e,t){return ie.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return ie.H.useReducer(e,t,n)},e.useRef=function(e){return ie.H.useRef(e)},e.useState=function(e){return ie.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return ie.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ie.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=Object.defineProperty,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),m=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t&&f(n,Symbol.toStringTag,{value:`Module`}),n},h=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),g=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),_=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),v=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function y(e){return typeof e==`string`&&g.has(e.replace(/#$/,``))}function ee(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(h.has(n))return`2020-12`;if(g.has(n))return`2019-09`;if(_.has(n)||v.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function te(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ne(e,t=`|`){return e.map(e=>Oe(e)).join(t)}function re(e,t){return typeof t==`bigint`?t.toString():t}var ie=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ae(e){return new ie(e)}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pe(e){return fe(e._zod.def)??e._zod.def.shape}function b(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return de(this,t,e),e},enumerable:!0,configurable:!0})}function me(e,t,n){t in e?de(e,t,n):e[t]=n}function he(e,t,n,r){let i=pe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?b(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):me(e,a,r?r(n.value,a):n.value))}}function ge(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?b(e,n,()=>t[n]):me(e,n,r.value))}}function _e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ae(()=>{if(vt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xe(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Te=new Set([`string`,`number`,`symbol`]);function Ee(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function De(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 Oe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ke(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},je={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return he(i,e,Ne(e,t)),De(e,_e(n,{shape:i,checks:[]}))}function Ne(e,t){let n=pe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function S(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ne(e,t)),a={};return he(a,e,Reflect.ownKeys(pe(e)).filter(e=>!i.has(e))),De(e,_e(n,{shape:a,checks:[]}))}function Pe(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Fe(e,t){let n={};return he(n,e,Reflect.ownKeys(pe(e))),ge(n,t),n}function Ie(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Le(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return he(n,e,Reflect.ownKeys(pe(e))),he(n,t,Reflect.ownKeys(pe(t))),De(e,_e(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ne(t,n)):void 0,o={};return he(o,t,Reflect.ownKeys(pe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),De(t,_e(t._zod.def,{shape:o,checks:[]}))}function ze(e,t,n){let r=n?new Set(Ne(t,n)):void 0,i={};return he(i,t,Reflect.ownKeys(pe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),De(t,_e(t._zod.def,{shape:i}))}function Be(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 Ve(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 He(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ue(e){return typeof e==`string`?e:e?.message}function We(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 Ge(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ke(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:Ue(e.inst?._zod.def?.error?.(e))??Ue(a?.(e))??Ue(t?.error?.(e))??Ue(n.customError?.(e))??Ue(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 qe=/[\\uD800-\\uDBFF]/;function Je(e){let t=e.length;if(!qe.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 Ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Xe(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 Ze(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Qe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nt(e,n,r.value)}}function $e(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function et(e,t,n){return $e(e,t,n,!1)}function tt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $e(this,n,r(this))},set(e){$e(this,n,e)}})}return t}function nt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$e(this,t,n.bind(this))},set(e){$e(this,t,e)}})}function rt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var it,at=!1,ot={configurable:!0,get(){at=!0}};function st(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&it!==e._zod){it=void 0;return}it=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=at;at=!1;try{let r=n(this);return at?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),at||=e,r}catch(n){throw delete this[t],at||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ct(e,t,n,r){let i=rt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var lt=`~constantCatch`;function ut(e){let t=()=>e;return t[lt]=!0,t}var dt,ft=Object.freeze({status:`aborted`}),pt={value:void 0,enumerable:!1},mt=`captureStackTrace`in Error?Error:null;function ht(e){let t=mt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(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){pt.value=new a(r);try{Object.defineProperty(n,"_zod",pt)}finally{pt.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),Qe(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?ht(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 gt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});var vt=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(vt,e),vt}function bt(){let e=this._zod;return e.message??=JSON.stringify(e.def,re,2),e.message}function xt(e){this._zod.message=e}var St={get:bt,set:xt,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},wt=new WeakSet([Object.prototype,Error.prototype]),Tt=(e,t)=>{e.name=`$ZodError`,Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",St);let n=Object.getPrototypeOf(e);wt.has(n)||(wt.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})}}))},Et=C(`$ZodError`,Tt);C(`$ZodError`,Tt,void 0,{Parent:Error});function Dt(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 Ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kt(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 At(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jt=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 gt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Mt=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=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Nt=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 gt;return a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}};function Pt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ke(e,n,yt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ft=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?Pt(e,a.issues,i):{success:!0,data:a.value}},It=Symbol.for(`zod.compile.invalid`),Lt=Symbol.for(`zod.compile.fallback`),Rt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==It)return!0;if(r.definite===!0&&n===void 0)return!1}return zt(e,t,n)});function zt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gt;return a.issues.length===0}var Bt=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},Vt=e=>{let t=jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,At(n,a))};return n},Ht=e=>{let t=jt(e),n=(e,r,i,a)=>t(e,r,i,At(n,a));return n},Ut=e=>{let t=Mt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,At(n,a))};return n},Wt=e=>{let t=Mt(e),n=async(e,r,i,a)=>await t(e,r,i,At(n,a));return n},Gt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Kt=e=>(t,n,r)=>Nt(e)(t,n,r),qt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Jt=e=>async(t,n,r)=>Ft(e)(t,n,r),Yt=/^[cC][0-9a-z]{6,}$/,Xt=/^[0-9a-z]+$/,Zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qt=/^[0-9a-vA-V]{20}$/,$t=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/;function tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,rn=/^([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})$/,an=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)$/,on=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,sn=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function cn(){return new RegExp(sn,`u`)}var ln=/^(?:(?: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])$/,un=/^(([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}|:))$/,dn=/^((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])$/,fn=/^(([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])$/,pn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hn=/^https?$/,gn=/^\\+[1-9]\\d{6,14}$/,_n=`(?:(?:\\\\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 vn(e){return RegExp(`^${e}$`)}var yn=vn(_n);function bn(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 xn(e){return RegExp(`^${bn(e)}$`)}function Sn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${bn({precision:e.precision})}`:n;return RegExp(`^${_n}T(?:${r})$`)}var Cn=/^[\\s\\S]{0,}$/,wn=/^-?\\d+$/,Tn=/^-?\\d+(?:\\.\\d+)?$/,En=/^(?:true|false)$/i,Dn=/^null$/i,On=/^undefined$/i,kn=/^[^A-Z]*$/,An=/^[^a-z]*$/,jn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn=e=>{let t=e.value;return!oe(t)&&t.length!==void 0},Nn={number:`number`,bigint:`bigint`,object:`date`},Pn=C(`$ZodCheckLessThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=C(`$ZodCheckGreaterThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),In=C(`$ZodCheckMultipleOf`,(e,t)=>{jn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ln=C(`$ZodCheckNumberFormat`,(e,t)=>{jn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ae[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Je(r):i)<=t.maximum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=C(`$ZodCheckMinLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Je(r):i)>=t.minimum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Je(r):i;if(a===t.length)return;let o=Ye(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})}}),Vn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;jn.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=()=>{})}),Hn=C(`$ZodCheckRegex`,(e,t)=>{Vn.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})}}),Un=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kn,Vn.init(e,t)}),Wn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=An,Vn.init(e,t)}),Gn=C(`$ZodCheckIncludes`,(e,t)=>{jn.init(e,t);let n=Ee(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})}}),Kn=C(`$ZodCheckStartsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`^${Ee(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})}}),qn=C(`$ZodCheckEndsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`.*${Ee(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})}}),Jn=C(`$ZodCheckOverwrite`,(e,t)=>{jn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Yn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Xn={major:4,minor:6,patch:7},Zn=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xn;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=Be(t),a;for(let o of n){if(o._zod.def.when){if(Ve(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 gt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ge(t.issues,n,e),i||=Be(t,n))});else{if(t.issues.length===n)continue;Ge(t.issues,n,e),i||=Be(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Be(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gt;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 gt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return et(this,`~standard`,er(this))},set"~standard"(e){$e(this,`~standard`,e)}}),Qn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ke(e,t,yt()))}:{value:e.value};async function $n(e,t){let n={async:!0};return Qn(await e._zod.run({value:t,issues:[]},n),n)}function er(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Qn(r,n)}catch{}return $n(e,t)},vendor:`zod`,version:1}}var tr=C(`$ZodString`,(e,t)=>{Zn.init(e,t),e._zod.pattern=t.pattern??Cn,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}}),nr=C(`$ZodStringFormat`,(e,t)=>{Vn.init(e,t),tr.init(e,t)}),rr=C(`$ZodGUID`,(e,t)=>{t.pattern??=rn,nr.init(e,t)}),ir=C(`$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??=an(e)}else t.pattern??=an();nr.init(e,t)}),ar=C(`$ZodEmail`,(e,t)=>{t.pattern??=on,nr.init(e,t)});function or(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function sr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?or(e)||2:cr(e,t)}function cr(e,t){if(!t.normalize&&t.protocol?.source===hn.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 lr=/[\\t\\n\\r]/g;function ur(e){return e.replace(lr,``)}function dr(e,t){return t.lastIndex=0,t.test(e.hostname)}function fr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var pr=C(`$ZodURL`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sr(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=ur(r);return}t.hostname&&!dr(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&&!fr(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:ur(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=cn(),nr.init(e,t)}),hr=C(`$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?en:tn(t.length),nr.init(e,t)}),gr=C(`$ZodCUID`,(e,t)=>{t.pattern??=Yt,nr.init(e,t)}),_r=C(`$ZodCUID2`,(e,t)=>{t.pattern??=Xt,nr.init(e,t)}),vr=C(`$ZodULID`,(e,t)=>{t.pattern??=Zt,nr.init(e,t)}),yr=C(`$ZodXID`,(e,t)=>{t.pattern??=Qt,nr.init(e,t)}),br=C(`$ZodKSUID`,(e,t)=>{t.pattern??=$t,nr.init(e,t)}),xr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sn(t),nr.init(e,t)}),Sr=C(`$ZodISODate`,(e,t)=>{t.pattern??=yn,nr.init(e,t)}),Cr=C(`$ZodISOTime`,(e,t)=>{t.pattern??=xn(t),nr.init(e,t)}),wr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=nn,nr.init(e,t)}),Tr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=ln,nr.init(e,t)}),Er=/^[0-9a-fA-F:.]+$/;function Dr(e){return Er.test(e)?or(`http://[${e}]`):!1}var Or=C(`$ZodIPv6`,(e,t)=>{t.pattern??=un,nr.init(e,t),e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),kr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=dn,nr.init(e,t)});function Ar(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:Dr(n)}var jr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=fn,nr.init(e,t),e._zod.check=n=>{Ar(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,Pr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Nr,nr.init(e,t),e._zod.check=n=>{Mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Fr=/^[A-Za-z0-9_-]*$/;function Ir(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Lr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,nr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Rr=C(`$ZodE164`,(e,t)=>{t.pattern??=gn,nr.init(e,t)});function zr(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 Br=C(`$ZodJWT`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{zr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Vr=C(`$ZodNumber`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Tn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Hr=C(`$ZodNumberFormat`,(e,t)=>{Ln.init(e,t),Vr.init(e,t)}),Ur=C(`$ZodBoolean`,(e,t)=>{Zn.init(e,t),e._zod.pattern=En,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Wr=C(`$ZodUndefined`,(e,t)=>{Zn.init(e,t),e._zod.pattern=On,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Gr=C(`$ZodNull`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Kr=C(`$ZodAny`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),qr=C(`$ZodUnknown`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),Jr=C(`$ZodNever`,(e,t)=>{Zn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yr(e,t){let n=We(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 We(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,Ge(n.issues,t,e),n}}return i(n,a)}}var Xr=e=>Array.isArray(e)?e.length:-1;function Zr(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}var Qr=C(`$ZodArray`,(e,t)=>{Zn.init(e,t);let n=vt.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=>Zr(t,r,e)));else if(Zr(c,r,e),s&&c.issues.length!==0&&Be(c))break}return o.length?Promise.all(o).then(()=>r):r},Yr(e,Xr)});function $r(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...He(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ei=[];function ti(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ei,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ke(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ni(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Be(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$r(e,n,i,t,d,f))):$r(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ri=C(`$ZodObject`,(e,t)=>{Zn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ae(()=>ti(t));st(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||de(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=vt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Be(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>$r(n,t,e,r,a,o))):$r(s,t,e,r,a,o)}return o?ni(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ii=C(`$ZodObjectJIT`,(e,t)=>{ri.init(e,t);let n=e._zod.parse,r=ae(()=>ti(t)),i=vt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ve(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xe,c=!vt.jitless,l=c&&Se.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ni([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ai(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=>!Be(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=>Ke(e,r,yt())))}),t)}var oi=C(`$ZodUnion`,(e,t)=>{Zn.init(e,t),st(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),st(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),st(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)))}),st(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=>se(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=>ai(t,r,e,i)):ai(o,r,e,i)}});function si(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ci=C(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,oi.init(e,t);let n=e._zod.parse;st(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||de(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ae(()=>si(t));e._zod.parse=(i,a)=>{let o=i.value;if(!xe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),li=C(`$ZodIntersection`,(e,t)=>{Zn.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])=>di(e,t,n)):di(e,i,a)}});function ui(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(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=ui(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=ui(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 di(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=ui(t.value,n.value);if(!c.valid){if(Be(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fi=C(`$ZodRecord`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ce(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...He(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Tn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...He(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),pi=C(`$ZodEnum`,(e,t)=>{Zn.init(e,t);let n=te(t.entries),r=new Set(n);e._zod.values=r,st(e,`pattern`,e=>{let t=te(e.def.entries).filter(e=>Te.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ee(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=C(`$ZodLiteral`,(e,t)=>{Zn.init(e,t);let n=new Set(t.values);e._zod.values=n,st(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ee(e):e?Ee(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=C(`$ZodTransform`,(e,t)=>{Zn.init(e,t),e._zod.optin=`optional`,vt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(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 gt;return n.value=i,n}});function gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var _i=C(`$ZodOptional`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(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=>gi(e,t)):gi(e,r)}return t.innerType._zod.run(e,n)}}),vi=C(`$ZodExactOptional`,(e,t)=>{_i.init(e,t),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yi=C(`$ZodNullable`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)}|null)$`):void 0}),st(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)}),bi=C(`$ZodDefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(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=>xi(e,t)):xi(r,t)}});function xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Si=C(`$ZodPrefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(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))}),Ci=C(`$ZodNonOptional`,(e,t)=>{Zn.init(e,t),st(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=>wi(t,e)):wi(i,e)}});function wi(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 Ti(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ke(e,r,yt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ei=C(`$ZodCatch`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),st(e,`optout`,e=>e.def.innerType._zod.optout),st(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=>Ti(e,r,t,n)):Ti(e,r,t,n)}}),Di=C(`$ZodPipe`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>e.def.in._zod.values),st(e,`optin`,e=>e.def.in._zod.optin),st(e,`optout`,e=>e.def.out._zod.optout),st(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=>Oi(e,t.in,n)):Oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.out,n)):Oi(r,t.out,n)}});function Oi(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 ki=C(`$ZodPreprocess`,(e,t)=>{Di.init(e,t)}),Ai=C(`$ZodReadonly`,(e,t)=>{Zn.init(e,t),st(e,`propValues`,e=>e.def.innerType._zod.propValues),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`optin`,e=>e.def.innerType?._zod?.optin),st(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(ji):ji(r)}});function ji(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Mi=C(`$ZodLazy`,(e,t)=>{Zn.init(e,t),ue(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),st(e,`pattern`,e=>e.innerType?._zod?.pattern),st(e,`propValues`,e=>e.innerType?._zod?.propValues),st(e,`optin`,e=>e.innerType?._zod?.optin??void 0),st(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ni=C(`$ZodCustom`,(e,t)=>{jn.init(e,t),Zn.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=>Pi(t,n,r,e));Pi(i,n,r,e)}});function Pi(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(Ze(e))}}var Fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ii=`~memo`,Li=[];function Ri(e){return typeof e==`object`&&!!e}function zi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bi=new WeakMap,Vi=0,Hi=1,Ui=2;function Wi(e,t,n){let r=Bi.get(e);if(r!==void 0)return r?Ui:Vi;if(t.has(e))return Ui;t.add(e);let i=Vi,a=e=>{if(i!==Ui&&e?._zod){let r=Wi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hi:o.value?._zod?Wi(o.value,t,n):Vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fe(c);s(e?o(e,!0):Hi),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?Wi(r,t,!1):Hi);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),Gi(e,i)}function Gi(e,t){return t!==Hi&&Bi.set(e,t===Ui),t}function Ki(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qi,Ji=[],Yi={alloc(e,t,n){let r=qi;if(!r)return n;qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ji.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`&&Zi(n,e.value))throw new Fi;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=Wi(e,new Set,!1);if(i===Vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ui||r?n=!0:r=!0}let l=s.value;if(!Ri(l))return t(s,c);let u=c[Ii];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ii]=u);let d;i===c?d=a:(d=Ki(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(...zi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;qi=d;let p=Ji.length,m=t(s,c);qi=void 0;let h=Ji.length>p?Ji.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zi(e.issues):Li),e)):(h&&(h.issues=m.issues.length?zi(m.issues):Li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xi(){return Yi}function Zi(e,t){let n=e[Ii]?.backEdges;return n!==void 0&&Ri(t)&&n.has(t)}var Qi=()=>{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(Xe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Oe(e.values[0])}`:`Invalid option: expected one of ${ne(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`:``}: ${ne(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 $i(){return{localeError:Qi()}}var ea,ta=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 na(){return new ta}(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=na());var ra=globalThis.__zod_globalRegistry;function ia(e){return e.checks&&=[...e.checks],e}function aa(e,t){return new e(ia({type:`string`,...x(t)}))}function oa(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function sa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function la(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function pa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function ma(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function ha(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function ga(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function _a(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function ba(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function xa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Sa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ca(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function wa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Ta(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ea(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Da(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ka(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Aa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ja(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function Ma(e,t){return new e(ia({type:`number`,checks:[],...x(t)}))}function Na(e,t){return new e(ia({type:`number`,coerce:!0,checks:[],...x(t)}))}function Pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Fa(e,t){return new e({type:`boolean`,...x(t)})}function Ia(e,t){return new e({type:`undefined`,...x(t)})}function La(e,t){return new e({type:`null`,...x(t)})}function Ra(e){return new e({type:`any`})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...x(t)})}function Va(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!1})}function Ha(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ua(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Wa(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ga(e,t){return new In({check:`multiple_of`,...x(t),value:e})}function Ka(e,t){return new Rn({check:`max_length`,...x(t),maximum:e})}function qa(e,t){return new zn({check:`min_length`,...x(t),minimum:e})}function Ja(e,t){return new Bn({check:`length_equals`,...x(t),length:e})}function Ya(e,t){return new Hn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Xa(e){return new Un({check:`string_format`,format:`lowercase`,...x(e)})}function Za(e){return new Wn({check:`string_format`,format:`uppercase`,...x(e)})}function Qa(e,t){return new Gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function $a(e,t){return new Kn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function eo(e,t){return new qn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function to(e){return new Jn({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ye(e))}function so(e,t,n){return new e({type:`array`,element:t,...x(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ze(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(Ze(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new jn({check:`custom`,...x(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&de(e,t,n[t]);return e}function po(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??ra,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 mo(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 ho(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,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(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 go(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function _o(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}/${go(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+go(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>\n\nSet 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);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(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;vo(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 yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.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]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}de(n,r,e.length===1?e[0]:So(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=xo(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 Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.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=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(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)):fo(i,s),fo(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())vo(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)??[])Co(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)}fo(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,de(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:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(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 To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(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 To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},w=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ko=(e,t)=>{w(e,`minimum`,t),Oo(e,`maximum`,t)},Ao=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},jo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},No=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Po=(e,t)=>w(e,`minimum`,t.minimum),Fo=(e,t)=>Oo(e,`maximum`,t.maximum),Io=e=>(t,n)=>{No(t,n.format);let[r,i]=e[n.format];w(t,`minimum`,r),Oo(t,`maximum`,i)},Lo={greater_than:(e,t)=>w(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ao(e,t.value),number_format:Io(Ae),bigint_format:Io(je),min_length:Po,max_length:Fo,length_equals:(e,t)=>ko(e,t.length),min_size:Po,max_size:Fo,size_equals:(e,t)=>ko(e,t.size),string_format:(e,t)=>{No(e,t.format),t.pattern&&jo(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)=>Mo(e,t.mime)};function Ro(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ao(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Mo(t,i.mime);for(let e of i.patterns??[])jo(t,e);return t}var zo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Bo=new Map([[Nr,pn],[Fr,mn]]),Vo=e=>Bo.get(e)??e,Ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ro(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zo[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(Vo);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}))])}},Uo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ro(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Wo=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{mo(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{mo(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{mo(e,t,n,r,`Void cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{n.not={}},Zo=(e,t,n,r)=>{},Qo=(e,t,n,r)=>{},$o=(e,t,n,r)=>{mo(e,t,n,r,`Date cannot be represented in JSON Schema`)},es=(e,t,n,r)=>{let i=e._zod.def,a=te(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ts=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(mo(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(mo(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ns=(e,t,n,r)=>{mo(e,t,n,r,`NaN cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},is=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Ro(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},as=(e,t,n,r)=>{n.type=`boolean`},os=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ss=(e,t,n,r)=>{mo(e,t,n,r,`Function types cannot be represented in JSON Schema`)},cs=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ls=(e,t,n,r)=>{mo(e,t,n,r,`Map cannot be represented in JSON Schema`)},us=(e,t,n,r)=>{mo(e,t,n,r,`Set cannot be represented in JSON Schema`)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ro(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function fs(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fs(t.out):t.type===`catch`?fs(t.innerType):e._zod.optin}var ps=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)de(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fs(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ms=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},hs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(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)},gs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ho(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ho(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?fs(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Ro(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function _s(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_s(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_s(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Tn:wn).source),p):p}var vs=new WeakMap;function ys(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of vs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_s(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var bs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ro(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ho(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)de(i.patternProperties,Vo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ho(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=vs.get(t);n||(n=[],vs.set(t,n),t.deferred.push(()=>ys(t))),n.push(e)}i.additionalProperties=ho(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fs(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},xs=(e,t,n,r)=>{let i=e._zod.def,a=ho(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`}]},Ss=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cs=Symbol();function ws(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Cs):JSON.parse(o)}var Ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n.default=o)},Es=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n._prefault=o)},Ds=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Os=(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;ho(o,t,r);let s=t.seen.get(e);s.ref=o},ks=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},As=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},js=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ms=(e,t,n,r)=>{let i=e._zod.innerType;ho(i,t,r);let a=t.seen.get(e);a.ref=i},Ns={string:Ho,number:Uo,boolean:Wo,bigint:Go,symbol:Ko,null:qo,undefined:Jo,void:Yo,never:Xo,any:Zo,unknown:Qo,date:$o,enum:es,literal:ts,nan:ns,template_literal:rs,file:is,success:as,custom:os,function:ss,transform:cs,map:ls,set:us,array:ds,object:ps,union:ms,intersection:hs,tuple:gs,record:bs,nullable:xs,nonoptional:Ss,default:Ts,prefault:Es,catch:Ds,pipe:Os,readonly:ks,promise:As,optional:js,lazy:Ms};function Ps(e,t){if(`_idmap`in e){let n=e,r=po({...t,processors:Ns}),i={};for(let e of n._idmap.entries()){let[t,n]=e;ho(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;_o(r,n),de(a,t,wo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=po({...t,processors:Ns});return ho(e,n),_o(n,e),wo(n,e)}var Fs=new WeakSet([Object.prototype,Error.prototype]);function Is(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 Ls=C(`ZodError`,(e,t)=>{Et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Fs.has(n)||(Fs.add(n),Is(n,`format`,e=>t=>kt(e,t)),Is(n,`flatten`,e=>t=>Ot(e,t)),Is(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,re,2)}),Is(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,re,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Rs=jt(Ls),zs=Mt(Ls),Bs=Nt(Ls),Vs=Ft(Ls),Hs=Vt(Ls),Us=Ht(Ls),Ws=Ut(Ls),Gs=Wt(Ls),Ks=Gt(Ls),qs=Kt(Ls),Js=qt(Ls),Ys=Jt(Ls);function Xs(){vt.localeError||yt($i())}function Zs(){vt.memoizer||yt({memoizer:Xi()})}var Qs=C(`ZodType`,(e,t)=>(Xs(),Zn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_e(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 De(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yl(e,t))},superRefine(e,t){return this.check(bl(e,t))},overwrite(e){return this.check(to(e))},optional(){return I(this)},exactOptional(){return el(this)},nullable(){return nl(this)},nullish(){return I(nl(this))},nonoptional(e){return cl(this,e)},array(){return k(this)},or(e){return M([this,e])},and(e){return Kc(this,e)},transform(e){return fl(this,Zc(e))},default(e){return il(this,e)},prefault(e){return ol(this,e)},catch(e){return ul(this,e)},pipe(e){return fl(this,e)},readonly(){return hl(this)},describe(e){let t=this.clone();return ra.add(t,{description:e}),t},meta(...e){if(e.length===0)return ra.get(this);let t=this.clone();return ra.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 et(this,`~standard`,{...er(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){$e(this,`~standard`,e)},parse:function e(t,n){return Rs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},safeParse(e,t){return Bs(this,e,t)},async safeParseAsync(e,t){return Vs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$e(this,`spa`,e)},validate(e,t){return Rt(this,e,t)},validateAsync(e,t){return Bt(this,e,t)},encode:function e(t,n){return Hs(this,t,n,{callee:e})},decode:function e(t,n){return Us(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Gs(this,t,n,{callee:e})},safeEncode(e,t){return Ks(this,e,t)},safeDecode(e,t){return qs(this,e,t)},async safeEncodeAsync(e,t){return Js(this,e,t)},async safeDecodeAsync(e,t){return Ys(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return ra.get(this)?.description},get _def(){return this._zod.def}}),$s=C(`_ZodString`,(e,t)=>{tr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)},tt({format:e=>Ro(e).format??null,minLength:e=>Ro(e).minimum??null,maxLength:e=>Ro(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ec=C(`ZodString`,(e,t)=>{tr.init(e,t),$s.init(e,t)},{email(e){return this.check(oa(oc,e))},url(e){return this.check(fa(uc,e))},jwt(e){return this.check(Da(Ec,e))},emoji(e){return this.check(pa(fc,e))},guid(e){return this.check(sa(cc,e))},uuid(e){return this.check(ca(lc,e))},uuidv4(e){return this.check(la(lc,e))},uuidv6(e){return this.check(ua(lc,e))},uuidv7(e){return this.check(da(lc,e))},nanoid(e){return this.check(ma(pc,e))},cuid(e){return this.check(ha(mc,e))},cuid2(e){return this.check(ga(hc,e))},ulid(e){return this.check(_a(gc,e))},base64(e){return this.check(wa(Cc,e))},base64url(e){return this.check(Ta(wc,e))},xid(e){return this.check(va(_c,e))},ksuid(e){return this.check(ya(vc,e))},ipv4(e){return this.check(ba(yc,e))},ipv6(e){return this.check(xa(bc,e))},cidrv4(e){return this.check(Sa(xc,e))},cidrv6(e){return this.check(Ca(Sc,e))},e164(e){return this.check(Ea(Tc,e))},datetime(e){return this.check(Oa(nc,e))},date(e){return this.check(ka(rc,e))},time(e){return this.check(Aa(ic,e))},duration(e){return this.check(ja(ac,e))}});function T(e){return aa(ec,e)}var tc=C(`ZodStringFormat`,(e,t)=>{nr.init(e,t),$s.init(e,t)}),nc=C(`ZodISODateTime`,(e,t)=>{xr.init(e,t),tc.init(e,t)}),rc=C(`ZodISODate`,(e,t)=>{Sr.init(e,t),tc.init(e,t)}),ic=C(`ZodISOTime`,(e,t)=>{Cr.init(e,t),tc.init(e,t)}),ac=C(`ZodISODuration`,(e,t)=>{wr.init(e,t),tc.init(e,t)}),oc=C(`ZodEmail`,(e,t)=>{ar.init(e,t),tc.init(e,t)});function sc(e){return oa(oc,e)}var cc=C(`ZodGUID`,(e,t)=>{rr.init(e,t),tc.init(e,t)}),lc=C(`ZodUUID`,(e,t)=>{ir.init(e,t),tc.init(e,t)}),uc=C(`ZodURL`,(e,t)=>{pr.init(e,t),tc.init(e,t)});function dc(e){return fa(uc,e)}var fc=C(`ZodEmoji`,(e,t)=>{mr.init(e,t),tc.init(e,t)}),pc=C(`ZodNanoID`,(e,t)=>{hr.init(e,t),tc.init(e,t)}),mc=C(`ZodCUID`,(e,t)=>{gr.init(e,t),tc.init(e,t)}),hc=C(`ZodCUID2`,(e,t)=>{_r.init(e,t),tc.init(e,t)}),gc=C(`ZodULID`,(e,t)=>{vr.init(e,t),tc.init(e,t)}),_c=C(`ZodXID`,(e,t)=>{yr.init(e,t),tc.init(e,t)}),vc=C(`ZodKSUID`,(e,t)=>{br.init(e,t),tc.init(e,t)}),yc=C(`ZodIPv4`,(e,t)=>{Tr.init(e,t),tc.init(e,t)}),bc=C(`ZodIPv6`,(e,t)=>{Or.init(e,t),tc.init(e,t)}),xc=C(`ZodCIDRv4`,(e,t)=>{kr.init(e,t),tc.init(e,t)}),Sc=C(`ZodCIDRv6`,(e,t)=>{jr.init(e,t),tc.init(e,t)}),Cc=C(`ZodBase64`,(e,t)=>{Pr.init(e,t),tc.init(e,t)}),wc=C(`ZodBase64URL`,(e,t)=>{Lr.init(e,t),tc.init(e,t)}),Tc=C(`ZodE164`,(e,t)=>{Rr.init(e,t),tc.init(e,t)}),Ec=C(`ZodJWT`,(e,t)=>{Br.init(e,t),tc.init(e,t)}),Dc=C(`ZodNumber`,(e,t)=>{Vr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.isFinite=!0},tt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ro(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ro(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ro(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ro(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(kc(e))},safe(e){return this.check(kc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function E(e){return Ma(Dc,e)}var Oc=C(`ZodNumberFormat`,(e,t)=>{Hr.init(e,t),Dc.init(e,t)});function kc(e){return Pa(Oc,e)}var Ac=C(`ZodBoolean`,(e,t)=>{Ur.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function D(e){return Fa(Ac,e)}var jc=C(`ZodUndefined`,(e,t)=>{Wr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Mc(e){return Ia(jc,e)}var Nc=C(`ZodNull`,(e,t)=>{Gr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Pc(e){return La(Nc,e)}var Fc=C(`ZodAny`,(e,t)=>{Kr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ic(){return Ra(Fc)}var Lc=C(`ZodUnknown`,(e,t)=>{qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function O(){return za(Lc)}var Rc=C(`ZodNever`,(e,t)=>{Jr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r)});function zc(e){return Ba(Rc,e)}var Bc=C(`ZodArray`,(e,t)=>{Zs(),Qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function k(e,t){return so(Bc,e,t)}var Vc=C(`ZodObject`,(e,t)=>{Zs(),ii.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),ct(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return P(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_e(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_e(this._zod.def,{catchall:O()}))},loose(){return this.clone(_e(this._zod.def,{catchall:O()}))},strict(){return this.clone(_e(this._zod.def,{catchall:zc()}))},strip(){return this.clone(_e(this._zod.def,{catchall:void 0}))},extend(e){return Pe(this,e)},safeExtend(e){return Ie(this,e)},merge(e){return Le(this,e)},pick(e){return Me(this,e)},omit(e){return S(this,e)},partial(...e){return Re(Qc,this,e[0])},exactPartial(...e){return Re($c,this,e[0],`exactPartial`)},required(...e){return ze(sl,this,e[0])}});function A(e,t){return new Vc({type:`object`,shape:e??{},...x(t)})}function j(e,t){return new Vc({type:`object`,shape:e,catchall:O(),...x(t)})}var Hc=C(`ZodUnion`,(e,t)=>{oi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.options=t.options});function M(e,t){return new Hc({type:`union`,options:e,...x(t)})}var Uc=C(`ZodDiscriminatedUnion`,(e,t)=>{Hc.init(e,t),ci.init(e,t)});function Wc(e,t,n){return new Uc({type:`union`,options:t,discriminator:e,...x(n)})}var Gc=C(`ZodIntersection`,(e,t)=>{li.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function Kc(e,t){return new Gc({type:`intersection`,left:e,right:t})}var qc=C(`ZodRecord`,(e,t)=>{Zs(),fi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function N(e,t,n){return!t||!t._zod?new qc({type:`record`,keyType:T(),valueType:e,...x(t)}):new qc({type:`record`,keyType:e,valueType:t,...x(n)})}var Jc=C(`ZodEnum`,(e,t)=>{pi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})}});function P(e,t){return new Jc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Yc=C(`ZodLiteral`,(e,t)=>{mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Yc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Xc=C(`ZodTransform`,(e,t)=>{Zs(),hi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ze(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(Ze(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zc(e){return new Xc({type:`transform`,transform:e})}var Qc=C(`ZodOptional`,(e,t)=>{_i.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I(e){return new Qc({type:`optional`,innerType:e})}var $c=C(`ZodExactOptional`,(e,t)=>{vi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function el(e){return new $c({type:`optional`,innerType:e})}var tl=C(`ZodNullable`,(e,t)=>{yi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new tl({type:`nullable`,innerType:e})}var rl=C(`ZodDefault`,(e,t)=>{bi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function il(e,t){return new rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var al=C(`ZodPrefault`,(e,t)=>{Si.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ol(e,t){return new al({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var sl=C(`ZodNonOptional`,(e,t)=>{Ci.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cl(e,t){return new sl({type:`nonoptional`,innerType:e,...x(t)})}var ll=C(`ZodCatch`,(e,t)=>{Ei.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ul(e,t){return new ll({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ut(t)})}var dl=C(`ZodPipe`,(e,t)=>{Di.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r),e.in=t.in,e.out=t.out});function fl(e,t){return new dl({type:`pipe`,in:e,out:t})}var pl=C(`ZodPreprocess`,(e,t)=>{dl.init(e,t),ki.init(e,t)}),ml=C(`ZodReadonly`,(e,t)=>{Ai.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ks(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hl(e){return new ml({type:`readonly`,innerType:e})}var gl=C(`ZodLazy`,(e,t)=>{Mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _l(e){return new gl({type:`lazy`,getter:e})}var vl=C(`ZodCustom`,(e,t)=>{Ni.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r)});function yl(e,t={}){return co(vl,e,t)}function bl(e,t){return lo(e,t)}function xl(e,t){return new pl({type:`pipe`,in:Zc(e),out:t})}var Sl={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Cl;Cl||={};function wl(e){return Oa(nc,e)}function Tl(e){return ka(rc,e)}function El(e){return Na(Dc,e)}var Dl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Ol=`io.modelcontextprotocol/related-task`,kl=`io.modelcontextprotocol/protocolVersion`,Al=`io.modelcontextprotocol/clientInfo`,jl=`io.modelcontextprotocol/serverInfo`,Ml=`io.modelcontextprotocol/clientCapabilities`,Nl=`io.modelcontextprotocol/subscriptionId`,Pl=`io.modelcontextprotocol/logLevel`,Fl=_l(()=>M([T(),E(),D(),Pc(),N(T(),Fl),k(Fl)])),Il=N(T(),Fl),Ll=k(Fl),Rl=M([T(),E().int()]),zl=T(),Bl=A({ttl:E().optional()}),Vl=A({taskId:T()}),Hl=j({progressToken:Rl.optional(),[Ol]:Vl.optional()}),Ul=A({_meta:Hl.optional()}),Wl=Ul.extend({task:Bl.optional()}),Gl=A({method:T(),params:Ul.loose().optional()}),Kl=A({_meta:Hl.optional()}),ql=A({method:T(),params:Kl.loose().optional()}),Jl=j({get[jl](){return cu.optional().catch(void 0)}}),L=j({_meta:Jl.optional()}),Yl=M([T(),E().int()]),Xl=A({jsonrpc:F(`2.0`),id:Yl,...Gl.shape}).strict(),Zl=A({jsonrpc:F(`2.0`),...ql.shape}).strict(),Ql=A({jsonrpc:F(`2.0`),id:Yl,result:L}).strict(),$l=A({jsonrpc:F(`2.0`),id:Yl.optional(),error:A({code:E().int(),message:T(),data:O().optional()})}).strict(),eu=M([Xl,Zl,Ql,$l]),tu=M([Ql,$l]),nu=L.strict(),ru=Kl.extend({requestId:Yl.optional(),reason:T().optional()}),iu=ql.extend({method:F(`notifications/cancelled`),params:ru}),au=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),ou=A({icons:k(au).optional()}),su=A({name:T(),title:T().optional()}),cu=su.extend({...su.shape,...ou.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),lu=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),Il).optional(),url:Il.optional()}),Il.optional())),uu=j({list:Il.optional(),cancel:Il.optional(),requests:j({sampling:j({createMessage:Il.optional()}).optional(),elicitation:j({create:Il.optional()}).optional()}).optional()}),du=j({list:Il.optional(),cancel:Il.optional(),requests:j({tools:j({call:Il.optional()}).optional()}).optional()}),fu=A({experimental:N(T(),Il).optional(),sampling:A({context:Il.optional(),tools:Il.optional()}).optional(),elicitation:lu.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:uu.optional(),extensions:N(T(),Il).optional()}),pu=Ul.extend({protocolVersion:T(),capabilities:fu,clientInfo:cu}),mu=Gl.extend({method:F(`initialize`),params:pu}),hu=A({experimental:N(T(),Il).optional(),logging:Il.optional(),completions:Il.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:du.optional(),extensions:N(T(),Il).optional()}),gu=L.extend({protocolVersion:T(),capabilities:hu,serverInfo:cu,instructions:T().optional()}),_u=ql.extend({method:F(`notifications/initialized`),params:Kl.optional()}),vu=Gl.extend({method:F(`server/discover`),params:Ul.optional()}),yu=L.extend({supportedVersions:k(T()),capabilities:hu,instructions:T().optional()}),bu=Gl.extend({method:F(`ping`),params:Ul.optional()}),xu=A({progress:E(),total:I(E()),message:I(T())}),Su=A({...Kl.shape,...xu.shape,progressToken:Rl}),Cu=ql.extend({method:F(`notifications/progress`),params:Su}),wu=Ul.extend({cursor:zl.optional()}),Tu=Gl.extend({params:wu.optional()}),Eu=L.extend({nextCursor:zl.optional()}),Du=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),Ou=Du.extend({text:T()}),ku=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Au=Du.extend({blob:ku}),ju=P([`user`,`assistant`]),Mu=A({audience:k(ju).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Nu=A({...su.shape,...ou.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:Mu.optional(),_meta:I(j({}))}),Pu=A({...su.shape,...ou.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:Mu.optional(),_meta:I(j({}))}),Fu=Tu.extend({method:F(`resources/list`)}),Iu=Eu.extend({resources:k(Nu)}),Lu=Tu.extend({method:F(`resources/templates/list`)}),Ru=Eu.extend({resourceTemplates:k(Pu)}),zu=Ul.extend({uri:T()}),Bu=zu,Vu=Gl.extend({method:F(`resources/read`),params:Bu}),Hu=L.extend({contents:k(M([Ou,Au]))}),Uu=ql.extend({method:F(`notifications/resources/list_changed`),params:Kl.optional()}),Wu=zu,Gu=Gl.extend({method:F(`resources/subscribe`),params:Wu}),Ku=zu,qu=Gl.extend({method:F(`resources/unsubscribe`),params:Ku}),Ju=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yu=Ul.extend({notifications:Ju}),Xu=Gl.extend({method:F(`subscriptions/listen`),params:Yu}),Zu=Kl.extend({notifications:Ju}),Qu=ql.extend({method:F(`notifications/subscriptions/acknowledged`),params:Zu}),$u=Jl.extend({[Nl]:Yl}),ed=L.extend({_meta:$u}),td=Kl.extend({uri:T()}),nd=ql.extend({method:F(`notifications/resources/updated`),params:td}),rd=A({name:T(),description:I(T()),required:I(D())}),id=A({...su.shape,...ou.shape,description:I(T()),arguments:I(k(rd)),_meta:I(j({}))}),ad=Tu.extend({method:F(`prompts/list`)}),od=Eu.extend({prompts:k(id)}),sd=Ul.extend({name:T(),arguments:N(T(),T()).optional()}),cd=Gl.extend({method:F(`prompts/get`),params:sd}),ld=A({type:F(`text`),text:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),ud=A({type:F(`image`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),dd=A({type:F(`audio`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),fd=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),pd=A({type:F(`resource`),resource:M([Ou,Au]),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),md=Nu.extend({type:F(`resource_link`)}),hd=M([ld,ud,dd,md,pd]),gd=A({role:ju,content:hd}),_d=L.extend({description:T().optional(),messages:k(gd)}),vd=ql.extend({method:F(`notifications/prompts/list_changed`),params:Kl.optional()}),yd=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),bd=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),xd=A({...su.shape,...ou.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),Fl).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:j({$schema:T().optional()}).optional(),annotations:yd.optional(),execution:bd.optional(),_meta:N(T(),O()).optional()}),Sd=Tu.extend({method:F(`tools/list`)}),Cd=Eu.extend({tools:k(xd)}),wd=L.extend({content:k(hd).default([]),structuredContent:O().optional(),isError:D().optional()}),Td=wd.or(L.extend({toolResult:O()})),Ed=Wl.extend({name:T(),arguments:N(T(),O()).optional()}),Dd=Gl.extend({method:F(`tools/call`),params:Ed}),Od=ql.extend({method:F(`notifications/tools/list_changed`),params:Kl.optional()}),kd=A({autoRefresh:D().default(!0),debounceMs:E().int().nonnegative().default(300)}),Ad=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jd=Ul.extend({level:Ad}),Md=Gl.extend({method:F(`logging/setLevel`),params:jd}),Nd=Kl.extend({level:Ad,logger:T().optional(),data:O()}),Pd=ql.extend({method:F(`notifications/message`),params:Nd}),Fd=A({name:T().optional()}),Id=A({hints:k(Fd).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Ld=A({mode:P([`auto`,`required`,`none`]).optional()}),Rd=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(hd),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),zd=Wc(`type`,[ld,ud,dd]),Bd=Wc(`type`,[ld,ud,dd,fd,Rd]),Vd=A({role:ju,content:M([Bd,k(Bd)]),_meta:N(T(),O()).optional()}),Hd=Wl.extend({messages:k(Vd),modelPreferences:Id.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:Il.optional(),tools:k(xd).optional(),toolChoice:Ld.optional()}),Ud=Gl.extend({method:F(`sampling/createMessage`),params:Hd}),Wd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:ju,content:zd}),Gd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:ju,content:M([Bd,k(Bd)])}),Kd=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),qd=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Jd=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Yd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Xd=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Zd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Qd=M([Yd,Xd]),$d=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ef=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),tf=M([$d,ef]),nf=M([Zd,Qd,tf]),rf=M([nf,Kd,qd,Jd]),af=Wl.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),rf),required:k(T()).optional()}).catchall(O())}),of=Wl.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),sf=M([af,of]),cf=Gl.extend({method:F(`elicitation/create`),params:sf}),lf=Kl.extend({elicitationId:T()}),uf=ql.extend({method:F(`notifications/elicitation/complete`),params:lf}),df=L.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),ff=A({type:F(`ref/resource`),uri:T()}),pf=A({type:F(`ref/prompt`),name:T()}),mf=Ul.extend({ref:M([pf,ff]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),hf=Gl.extend({method:F(`completion/complete`),params:mf}),gf=L.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),_f=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),vf=Gl.extend({method:F(`roots/list`),params:Ul.optional()}),yf=L.extend({roots:k(_f)}),bf=ql.extend({method:F(`notifications/roots/list_changed`),params:Kl.optional()}),xf=j({ttl:E().optional(),pollInterval:E().optional()}),Sf=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Cf=A({taskId:T(),status:Sf,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),wf=L.extend({task:Cf}),Tf=Kl.merge(Cf),Ef=ql.extend({method:F(`notifications/tasks/status`),params:Tf}),Df=Gl.extend({method:F(`tasks/get`),params:Ul.extend({taskId:T()})}),Of=L.merge(Cf),kf=Gl.extend({method:F(`tasks/result`),params:Ul.extend({taskId:T()})}),Af=L.loose(),jf=Tu.extend({method:F(`tasks/list`)}),Mf=Eu.extend({tasks:k(Cf)}),Nf=Gl.extend({method:F(`tasks/cancel`),params:Ul.extend({taskId:T()})}),Pf=L.merge(Cf),Ff=M([bu,mu,vu,hf,Md,cd,ad,Fu,Lu,Vu,Gu,qu,Xu,Dd,Sd]),If=M([iu,Cu,_u,bf]),Lf=M([nu,Wd,Gd,df,yf]),Rf=M([bu,Ud,cf,vf]),zf=M([iu,Cu,Pd,nd,Uu,Od,vd,Qu,uf]),Bf=M([nu,gu,yu,gf,_d,od,Iu,Ru,Hu,wd,Cd,ed]),Vf=dc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Sl.custom,message:`URL must be parseable`,fatal:!0}),ft}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Hf=j({resource:T().url(),authorization_servers:k(Vf).optional(),jwks_uri:T().url().optional(),scopes_supported:k(T()).optional(),bearer_methods_supported:k(T()).optional(),resource_signing_alg_values_supported:k(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:D().optional(),authorization_details_types_supported:k(T()).optional(),dpop_signing_alg_values_supported:k(T()).optional(),dpop_bound_access_tokens_required:D().optional()}),Uf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),service_documentation:Vf.optional(),revocation_endpoint:Vf.optional(),revocation_endpoint_auth_methods_supported:k(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:k(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:k(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:k(T()).optional(),code_challenge_methods_supported:k(T()).optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0),dpop_signing_alg_values_supported:k(T()).optional()}),Wf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,userinfo_endpoint:Vf.optional(),jwks_uri:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),acr_values_supported:k(T()).optional(),subject_types_supported:k(T()),id_token_signing_alg_values_supported:k(T()),id_token_encryption_alg_values_supported:k(T()).optional(),id_token_encryption_enc_values_supported:k(T()).optional(),userinfo_signing_alg_values_supported:k(T()).optional(),userinfo_encryption_alg_values_supported:k(T()).optional(),userinfo_encryption_enc_values_supported:k(T()).optional(),request_object_signing_alg_values_supported:k(T()).optional(),request_object_encryption_alg_values_supported:k(T()).optional(),request_object_encryption_enc_values_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),display_values_supported:k(T()).optional(),claim_types_supported:k(T()).optional(),claims_supported:k(T()).optional(),service_documentation:T().optional(),claims_locales_supported:k(T()).optional(),ui_locales_supported:k(T()).optional(),claims_parameter_supported:D().optional(),request_parameter_supported:D().optional(),request_uri_parameter_supported:D().optional(),require_request_uri_registration:D().optional(),op_policy_uri:Vf.optional(),op_tos_uri:Vf.optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0)}),Gf=A({...Wf.shape,...Uf.pick({code_challenge_methods_supported:!0}).shape}),Kf=A({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:El().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),qf=A({issued_token_type:F(`urn:ietf:params:oauth:token-type:id-jag`),access_token:T(),token_type:T().optional(),expires_in:E().optional(),scope:T().optional()}).strip(),Jf=A({error:T(),error_description:T().optional(),error_uri:T().optional()}),Yf=Vf.optional().or(F(``).transform(()=>void 0)),Xf=A({redirect_uris:k(Vf),token_endpoint_auth_method:T().optional(),grant_types:k(T()).optional(),response_types:k(T()).optional(),application_type:T().optional(),client_name:T().optional(),client_uri:Vf.optional(),logo_uri:Yf,scope:T().optional(),contacts:k(T()).optional(),tos_uri:Yf,policy_uri:T().optional(),jwks_uri:Vf.optional(),jwks:Ic().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),Zf=A({client_id:T(),client_secret:T().optional(),client_id_issued_at:E().optional(),client_secret_expires_at:E().optional(),issuer:T().optional().catch(void 0)}).strip(),Qf=Xf.merge(Zf),$f=A({error:T(),error_description:T().optional()}).strip(),ep=A({token:T(),token_type_hint:T().optional()}).strip(),tp=Symbol.for(`mcp.sdk.errorBrands`);function np(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,tp,{value:n,enumerable:!1,configurable:!0})}function rp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,tp)){let n=t[tp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,np(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var R=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),z=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,np(this,new.target)}},ip=class extends z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},ap=`2026-07-28`,op=[ap];function sp(e){return e>=ap}function cp(e){return e.filter(e=>!sp(e))}function lp(e){return e.filter(e=>sp(e))}function up(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var dp=[`task`,`inputRequests`,`requestState`];function fp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||dp.some(t=>t in e)?e:{...e,content:[]}}function pp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=A({ttl:E().optional()}),a=A({taskId:T()}),o=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:T(),params:s.loose().optional()}),u=A({_meta:o.optional()}),d=A({method:T(),params:u.loose().optional()}),f=j({_meta:o.optional()}),p=M([T(),E().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:T().optional()}),g=d.extend({method:F(`notifications/cancelled`),params:h}),_=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),v=A({icons:k(_).optional()}),y=A({name:T(),title:T().optional()}),ee=y.extend({...y.shape,...v.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),te=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),re=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ie=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ne.optional(),extensions:N(T(),t).optional()}),ae=s.extend({protocolVersion:T(),capabilities:ie,clientInfo:ee}),oe=l.extend({method:F(`initialize`),params:ae}),se=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:re.optional(),extensions:N(T(),t).optional()}),ce=f.extend({protocolVersion:T(),capabilities:se,serverInfo:ee,instructions:T().optional()}),le=d.extend({method:F(`notifications/initialized`),params:u.optional()}),ue=l.extend({method:F(`ping`),params:s.optional()}),de=A({progress:E(),total:I(E()),message:I(T())}),fe=A({...u.shape,...de.shape,progressToken:n}),pe=d.extend({method:F(`notifications/progress`),params:fe}),b=s.extend({cursor:r.optional()}),me=l.extend({params:b.optional()}),he=f.extend({nextCursor:r.optional()}),ge=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),_e=ge.extend({text:T()}),ve=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=ge.extend({blob:ve}),be=P([`user`,`assistant`]),xe=A({audience:k(be).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Se=A({...y.shape,...v.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:xe.optional(),_meta:I(j({}))}),Ce=A({...y.shape,...v.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:xe.optional(),_meta:I(j({}))}),we=me.extend({method:F(`resources/list`)}),Te=he.extend({resources:k(Se)}),Ee=me.extend({method:F(`resources/templates/list`)}),De=he.extend({resourceTemplates:k(Ce)}),x=s.extend({uri:T()}),Oe=x,ke=l.extend({method:F(`resources/read`),params:Oe}),Ae=f.extend({contents:k(M([_e,ye]))}),je=d.extend({method:F(`notifications/resources/list_changed`),params:u.optional()}),Me=x,Ne=l.extend({method:F(`resources/subscribe`),params:Me}),S=x,Pe=l.extend({method:F(`resources/unsubscribe`),params:S}),Fe=u.extend({uri:T()}),Ie=d.extend({method:F(`notifications/resources/updated`),params:Fe}),Le=A({name:T(),description:I(T()),required:I(D())}),Re=A({...y.shape,...v.shape,description:I(T()),arguments:I(k(Le)),_meta:I(j({}))}),ze=me.extend({method:F(`prompts/list`)}),Be=he.extend({prompts:k(Re)}),Ve=s.extend({name:T(),arguments:N(T(),T()).optional()}),He=l.extend({method:F(`prompts/get`),params:Ve}),Ue=A({type:F(`text`),text:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),We=A({type:F(`image`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ge=A({type:F(`audio`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ke=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),qe=A({type:F(`resource`),resource:M([_e,ye]),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Je=Se.extend({type:F(`resource_link`)}),Ye=M([Ue,We,Ge,Je,qe]),Xe=A({role:be,content:Ye}),Ze=f.extend({description:T().optional(),messages:k(Xe)}),Qe=d.extend({method:F(`notifications/prompts/list_changed`),params:u.optional()}),$e=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),et=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),tt=A({...y.shape,...v.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:N(T(),O()).optional()}),nt=me.extend({method:F(`tools/list`)}),rt=he.extend({tools:k(tt)}),it=f.extend({content:k(Ye),structuredContent:N(T(),O()).optional(),isError:D().optional()}),at=c.extend({name:T(),arguments:N(T(),O()).optional()}),ot=l.extend({method:F(`tools/call`),params:at}),st=d.extend({method:F(`notifications/tools/list_changed`),params:u.optional()}),ct=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),lt=s.extend({level:ct}),ut=l.extend({method:F(`logging/setLevel`),params:lt}),dt=u.extend({level:ct,logger:T().optional(),data:O()}),ft=d.extend({method:F(`notifications/message`),params:dt}),pt=A({name:T().optional()}),mt=A({hints:k(pt).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),ht=A({mode:P([`auto`,`required`,`none`]).optional()}),C=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(Ye),structuredContent:A({}).loose().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),gt=Wc(`type`,[Ue,We,Ge]),_t=Wc(`type`,[Ue,We,Ge,Ke,C]),vt=A({role:be,content:M([_t,k(_t)]),_meta:N(T(),O()).optional()}),yt=c.extend({messages:k(vt),modelPreferences:mt.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(tt).optional(),toolChoice:ht.optional()}),bt=l.extend({method:F(`sampling/createMessage`),params:yt}),xt=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:be,content:gt}),St=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:be,content:M([_t,k(_t)])}),Ct=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),wt=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Tt=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Et=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Dt=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ot=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),kt=M([Et,Dt]),At=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),jt=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Mt=M([At,jt]),Nt=M([Ot,kt,Mt]),Pt=M([Nt,Ct,wt,Tt]),Ft=c.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),Pt),required:k(T()).optional()}).catchall(O())}),It=c.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),Lt=M([Ft,It]),Rt=l.extend({method:F(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:T()}),Bt=d.extend({method:F(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),Ht=A({type:F(`ref/resource`),uri:T()}),Ut=A({type:F(`ref/prompt`),name:T()}),Wt=s.extend({ref:M([Ut,Ht]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),Gt=l.extend({method:F(`completion/complete`),params:Wt}),Kt=f.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),qt=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),Jt=l.extend({method:F(`roots/list`),params:s.optional()}),Yt=f.extend({roots:k(qt)}),Xt=d.extend({method:F(`notifications/roots/list_changed`),params:u.optional()}),Zt=j({ttl:E().optional(),pollInterval:E().optional()}),Qt=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=A({taskId:T(),status:Qt,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:F(`notifications/tasks/status`),params:tn}),rn=l.extend({method:F(`tasks/get`),params:s.extend({taskId:T()})}),an=f.merge($t),on=l.extend({method:F(`tasks/result`),params:s.extend({taskId:T()})}),sn=f.loose(),cn=me.extend({method:F(`tasks/list`)}),ln=he.extend({tasks:k($t)}),un=l.extend({method:F(`tasks/cancel`),params:s.extend({taskId:T()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,InitializeRequestParamsSchema:ae,InitializeRequestSchema:oe,ServerCapabilitiesSchema:se,InitializeResultSchema:ce,InitializedNotificationSchema:le,PingRequestSchema:ue,ProgressSchema:de,ProgressNotificationParamsSchema:fe,ProgressNotificationSchema:pe,PaginatedRequestParamsSchema:b,PaginatedRequestSchema:me,PaginatedResultSchema:he,ResourceContentsSchema:ge,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:be,AnnotationsSchema:xe,ResourceSchema:Se,ResourceTemplateSchema:Ce,ListResourcesRequestSchema:we,ListResourcesResultSchema:Te,ListResourceTemplatesRequestSchema:Ee,ListResourceTemplatesResultSchema:De,ResourceRequestParamsSchema:x,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:ke,ReadResourceResultSchema:Ae,ResourceListChangedNotificationSchema:je,SubscribeRequestParamsSchema:Me,SubscribeRequestSchema:Ne,UnsubscribeRequestParamsSchema:S,UnsubscribeRequestSchema:Pe,ResourceUpdatedNotificationParamsSchema:Fe,ResourceUpdatedNotificationSchema:Ie,PromptArgumentSchema:Le,PromptSchema:Re,ListPromptsRequestSchema:ze,ListPromptsResultSchema:Be,GetPromptRequestParamsSchema:Ve,GetPromptRequestSchema:He,TextContentSchema:Ue,ImageContentSchema:We,AudioContentSchema:Ge,ToolUseContentSchema:Ke,EmbeddedResourceSchema:qe,ResourceLinkSchema:Je,ContentBlockSchema:Ye,PromptMessageSchema:Xe,GetPromptResultSchema:Ze,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:at,CallToolRequestSchema:ot,ToolListChangedNotificationSchema:st,LoggingLevelSchema:ct,SetLevelRequestParamsSchema:lt,SetLevelRequestSchema:ut,LoggingMessageNotificationParamsSchema:dt,LoggingMessageNotificationSchema:ft,ModelHintSchema:pt,ModelPreferencesSchema:mt,ToolChoiceSchema:ht,ToolResultContentSchema:C,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:M([ue,oe,Gt,ut,He,ze,we,Ee,ke,Ne,Pe,ot,nt,rn,on,cn,un]),ClientNotificationSchema:M([g,pe,le,Xt,nn]),ClientResultSchema:M([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:M([ue,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:M([g,pe,ft,Ie,je,st,Qe,nn,Bt]),ServerResultSchema:M([m,ce,Kt,Ze,Be,Te,De,Ae,it,rt,an,ln,en]),CallToolResultWireSchema:O().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of dp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(fp).pipe(it)}}var mp;function hp(){return mp??=pp()}function gp(e){return e.type!==`object`}var _p=new Set([`const`,`enum`,`default`,`examples`]),vp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function yp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function bp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(yp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=y(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&yp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:_p.has(o)?i[o]=s:vp.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var xp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Sp={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Cp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},wp;function Tp(){if(wp)return wp;let e=hp();return wp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},wp}function Ep(e){return Object.prototype.hasOwnProperty.call(xp,e)}function Dp(e){return Object.prototype.hasOwnProperty.call(Sp,e)}function Op(e){return Object.prototype.hasOwnProperty.call(Cp,e)}function kp(e){return Op(e)?Tp().resultSchemas[e]:void 0}function Ap(e){return Ep(e)?Tp().requestSchemas[e]:void 0}function jp(e){return Dp(e)?Tp().notificationSchemas[e]:void 0}Object.keys(xp),Object.keys(Sp);function Mp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Np(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Pp={ok:!1,reason:`not-in-era`};function Fp(e){return Mp(e)&&Mp(e.outputSchema)&&gp(e.outputSchema)}function Ip(e){return e}var Lp={era:`2025-11-25`,hasRequestMethod:Ep,hasNotificationMethod:Dp,validateRequest:(e,t)=>Np(Ap(e),t),validateResult:(e,t)=>Np(kp(e),t),validateNotification:(e,t)=>Np(jp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pp,validateInputResponse:()=>Pp,samplingResultVariant:((e,t)=>{let n=hp();return Np(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=up(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&gp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Mp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ip(e)}}return{kind:`complete`,result:Ip(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Fp(e))?t:{...t,tools:n.map(e=>Fp(e)?{...e,outputSchema:bp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Rp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=M([T(),E().int()]),a=P([`user`,`assistant`]),o=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:E().optional()}),l=A({taskId:T()}),u=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=A({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=A({_meta:u.optional()}),m=A({method:T(),params:p.loose().optional()}),h=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),g=A({icons:k(h).optional()}),_=A({name:T(),title:T().optional()}),v=_.extend({..._.shape,...g.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),y=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ee=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),te=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ne=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ee.optional(),extensions:N(T(),t).optional()}),re=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:te.optional(),extensions:N(T(),t).optional()}),ie=A({progress:E(),total:I(E()),message:I(T())}),ae=A({...p.shape,...ie.shape,progressToken:n}),oe=m.extend({method:F(`notifications/progress`),params:ae}),se=p.extend({level:o,logger:T().optional(),data:O()}),ce=m.extend({method:F(`notifications/message`),params:se}),le=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),ue=le.extend({text:T()}),de=le.extend({blob:s}),fe=A({audience:k(a).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),pe=A({..._.shape,...g.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:fe.optional(),_meta:I(j({}))}),b=A({..._.shape,...g.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:fe.optional(),_meta:I(j({}))}),me=m.extend({method:F(`notifications/resources/list_changed`),params:p.optional()}),he=p.extend({uri:T()}),ge=m.extend({method:F(`notifications/resources/updated`),params:he}),_e=A({name:T(),description:I(T()),required:I(D())}),ve=A({..._.shape,...g.shape,description:I(T()),arguments:I(k(_e)),_meta:I(j({}))}),ye=m.extend({method:F(`notifications/prompts/list_changed`),params:p.optional()}),be=A({type:F(`text`),text:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),xe=A({type:F(`image`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Se=A({type:F(`audio`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Ce=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),we=A({type:F(`resource`),resource:M([ue,de]),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Te=pe.extend({type:F(`resource_link`)}),Ee=M([be,xe,Se,Te,we]),De=A({role:a,content:Ee}),x=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),Oe=m.extend({method:F(`notifications/tools/list_changed`),params:p.optional()}),ke=A({name:T().optional()}),Ae=A({hints:k(ke).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),je=A({mode:P([`auto`,`required`,`none`]).optional()}),Me=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),Ne=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),S=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Pe=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Fe=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ie=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Le=M([Pe,Fe]),Re=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ze=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Be=M([Re,ze]),Ve=M([Ie,Le,Be]),He=M([Ve,Me,Ne,S]),Ue=f.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),He),required:k(T()).optional()}).catchall(O())}),We=A({type:F(`ref/resource`),uri:T()}),Ge=A({type:F(`ref/prompt`),name:T()}),Ke=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),qe=ne.shape,Je=A({experimental:qe.experimental,sampling:qe.sampling,elicitation:qe.elicitation,roots:qe.roots,extensions:qe.extensions}),Ye=re.shape,Xe=A({experimental:Ye.experimental,logging:Ye.logging,completions:Ye.completions,prompts:Ye.prompts,resources:Ye.resources,tools:Ye.tools,extensions:Ye.extensions}),Ze=j({progressToken:n.optional(),[kl]:T(),[Al]:v.optional(),[Ml]:Je,[Pl]:o.optional()}),Qe=A({..._.shape,...g.shape,description:T().optional(),inputSchema:j({$schema:T().optional(),type:F(`object`)}),outputSchema:j({$schema:T().optional()}).optional(),annotations:x.optional(),_meta:N(T(),O()).optional()}),$e=A({type:F(`tool_result`),toolUseId:T(),content:k(Ee),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),et=M([be,xe,Se,Ce,$e]),tt=A({role:a,content:M([et,k(et)]),_meta:N(T(),O()).optional()}),nt=T(),rt=j({[jl]:v.optional().catch(void 0)}),it=rt.optional();function at(e){return j({_meta:it,resultType:nt.default(`complete`),...e})}let ot=at({}),st=at({nextCursor:r.optional()}),ct=at({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),lt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),ut=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),dt=at({description:T().optional(),messages:k(De)}),ft=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),pt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),mt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),ht=at({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),C=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`])}),gt=at({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),_t=A({messages:k(tt),modelPreferences:Ae.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(Qe).optional(),toolChoice:je.optional()}),vt=A({method:F(`sampling/createMessage`),params:_t}),yt=A({method:F(`roots/list`),params:A({_meta:N(T(),O()).optional()}).optional()}),bt=A({...tt.shape,model:T(),stopReason:T().optional()}),xt=A({roots:k(Ke)}),St=A({action:P([`accept`,`decline`,`cancel`]),content:N(T(),M([T(),E(),D(),k(T())])).optional()}),Ct=A({mode:F(`url`),message:T(),url:T().url()}),wt=M([Ue,Ct]),Tt=A({method:F(`elicitation/create`),params:wt}),Et=M([vt,yt,Tt]),Dt=M([bt,xt,St]),Ot=N(T(),Et),kt=N(T(),Dt),At=at({inputRequests:Ot.optional(),requestState:T().optional()}),jt={inputResponses:kt.optional(),requestState:T().optional()},Mt=A({_meta:Ze,...jt}),Nt=j({progressToken:n.optional()});function Pt(e,t){return A({method:F(e),params:A({_meta:Ze,...t})})}function Ft(e,t){return A({method:F(e),params:A({_meta:Nt.optional(),...t}).optional()})}let It={name:T(),arguments:N(T(),O()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:T(),arguments:N(T(),T()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:T(),...jt}),Gt={ref:M([Ge,We]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=j({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:T(),arguments:N(T(),T()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:T()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return j({_meta:it,...e})}let tn={"tools/call":en({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),"tools/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),"prompts/get":en({description:T().optional(),messages:k(De)}),"prompts/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),"resources/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),"resources/read":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),"completion/complete":en({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),"server/discover":en({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),"subscriptions/listen":en({})},nn=j({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=A({method:F(`notifications/subscriptions/acknowledged`),params:A({_meta:nn.optional(),notifications:Jt})}),an=A({_meta:nn.optional(),requestId:i,reason:T().optional()}),on=A({method:F(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":oe,"notifications/message":ce,"notifications/resources/updated":ge,"notifications/resources/list_changed":me,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":rn},cn=e=>A({jsonrpc:F(`2.0`),id:M([T(),E().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:ee,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:re,ProgressSchema:ie,ProgressNotificationParamsSchema:ae,ProgressNotificationSchema:oe,LoggingMessageNotificationParamsSchema:se,LoggingMessageNotificationSchema:ce,ResourceContentsSchema:le,TextResourceContentsSchema:ue,BlobResourceContentsSchema:de,AnnotationsSchema:fe,ResourceSchema:pe,ResourceTemplateSchema:b,ResourceListChangedNotificationSchema:me,ResourceUpdatedNotificationParamsSchema:he,ResourceUpdatedNotificationSchema:ge,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:be,ImageContentSchema:xe,AudioContentSchema:Se,ToolUseContentSchema:Ce,EmbeddedResourceSchema:we,ResourceLinkSchema:Te,ContentBlockSchema:Ee,PromptMessageSchema:De,ToolAnnotationsSchema:x,ToolListChangedNotificationSchema:Oe,ModelHintSchema:ke,ModelPreferencesSchema:Ae,ToolChoiceSchema:je,BooleanSchemaSchema:Me,StringSchemaSchema:Ne,NumberSchemaSchema:S,UntitledSingleSelectEnumSchemaSchema:Pe,TitledSingleSelectEnumSchemaSchema:Fe,LegacyTitledEnumSchemaSchema:Ie,SingleSelectEnumSchemaSchema:Le,UntitledMultiSelectEnumSchemaSchema:Re,TitledMultiSelectEnumSchemaSchema:ze,MultiSelectEnumSchemaSchema:Be,EnumSchemaSchema:Ve,PrimitiveSchemaDefinitionSchema:He,ElicitRequestFormParamsSchema:Ue,ResourceTemplateReferenceSchema:We,PromptReferenceSchema:Ge,RootSchema:Ke,ClientCapabilities2026Schema:Je,ServerCapabilities2026Schema:Xe,RequestMetaEnvelopeSchema:Ze,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:ot,PaginatedResultSchema:st,CallToolResultSchema:ct,ListToolsResultSchema:lt,ListPromptsResultSchema:ut,GetPromptResultSchema:dt,ListResourcesResultSchema:ft,ListResourceTemplatesResultSchema:pt,ReadResourceResultSchema:mt,CompleteResultSchema:ht,CacheableResultSchema:C,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(ot),CallToolResultResponseSchema:cn(M([ct,At])),ListToolsResultResponseSchema:cn(lt),ListPromptsResultResponseSchema:cn(ut),GetPromptResultResponseSchema:cn(M([dt,At])),ListResourcesResultResponseSchema:cn(ft),ListResourceTemplatesResultResponseSchema:cn(pt),ReadResourceResultResponseSchema:cn(M([mt,At])),CompleteResultResponseSchema:cn(ht),DiscoverResultResponseSchema:cn(gt),SubscriptionsListenResultResponseSchema:cn(Qt)}}var zp;function Bp(){return zp??=Rp()}var Vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Hp(e){return Vp.includes(e)}var Up=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Wp(e){return e[Up]}function Gp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Kp(e){return e===`public`||e===`private`}var B=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),qp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,np(this,new.target)}static fromError(t,n,r){if(t===B.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yp(e.elicitations,n)}if(t===B.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xp({supported:e.supported,requested:e.requested},n)}if(t===B.InvalidParams||t===B.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===B.ResourceNotFound||Object.keys(e).length===1))return new Jp(e.uri,n)}if(t===B.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Jp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(B.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(B.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(B.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(B.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qp=0,$p=`private`,em=[`tools/call`,`prompts/get`,`resources/read`];function tm(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||em.includes(e))return t;throw new qp(B.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function nm(e,t){let n=Wp(t);if(t.resultType!==`complete`||!Hp(e))return n===void 0?t:sm(t);let r=t,i=Gp(r.ttlMs)?r.ttlMs:am(n),a=Kp(r.cacheScope)?r.cacheScope:om(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Up],o}function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function im(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[jl]:t}}:!rm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[jl]:t}}}function am(e){return e!==void 0&&Gp(e.ttlMs)?e.ttlMs:Qp}function om(e){return e!==void 0&&Kp(e.cacheScope)?e.cacheScope:$p}function sm(e){let t={...e};return delete t[Up],t}var cm=[`elicitation/create`,`sampling/createMessage`,`roots/list`],lm;function um(){if(lm)return lm;let e=Bp();return lm={request:{"elicitation/create":A({method:F(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:F(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:F(`roots/list`),params:j({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},lm}function dm(e){return cm.includes(e)}function fm(e){return dm(e)?um().request[e]:void 0}function pm(e){return dm(e)?um().response[e]:void 0}var mm={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},hm={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function gm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function _m(e){return Object.prototype.hasOwnProperty.call(hm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function ym(e){return gm(e)?Bp().dispatchRequestSchemas[e]:void 0}function bm(e){return vm(e)?Bp().dispatchResultSchemas[e]:void 0}function xm(e){return _m(e)?Bp().notificationSchemas2026[e]:void 0}Object.keys(mm),Object.keys(hm);function Sm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wm={ok:!1,reason:`not-in-era`},Tm=[kl,Ml];function Em(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sm(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sm(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sm(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Dm={era:`2026-07-28`,hasRequestMethod:gm,hasNotificationMethod:_m,hasInputRequestMethod:e=>fm(e)!==void 0,validateRequest:(e,t)=>Cm(ym(e),t),validateResult:(e,t)=>Cm(bm(e),t),validateNotification:(e,t)=>Cm(xm(e),t),validateInputRequest:(e,t)=>Cm(fm(e),t),validateInputResponse:(e,t)=>Cm(pm(e),t),samplingResultVariant:()=>wm,outboundEnvelope(e){return{[kl]:e.protocolVersion,[Al]:e.clientInfo,[Ml]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Tm)n in e||t.push({key:n,problem:`missing`});let n=Bp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>up(e),inputRequestSchema:fm,decodeResult(e,t){if(!Sm(t))return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sm(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Bp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new z(R.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=km(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return im(nm(e,tm(e,Em(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Bp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Om;function km(){if(Om)return Om;let e=Bp();return Om={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Om}var Am=`2026-07-28`;function jm(e){return e!==void 0&&sp(e)?Dm:Lp}function Mm(e){return e.revision===void 0?e.era===`modern`?Dm.era:Lp.era:jm(e.revision).era}function Nm(e){return Im.some(t=>t.hasRequestMethod(e))}function Pm(e){return Im.some(t=>t.hasNotificationMethod(e))}function Fm(e){return e===`tasks/get`||e===`tasks/cancel`}var Im=[Lp,Dm],Lm=m({AnnotationsSchema:()=>Mu,AudioContentSchema:()=>dd,BaseMetadataSchema:()=>su,BaseRequestParamsSchema:()=>Ul,BlobResourceContentsSchema:()=>Au,BooleanSchemaSchema:()=>Kd,CallToolRequestParamsSchema:()=>Ed,CallToolRequestSchema:()=>Dd,CallToolResultSchema:()=>wd,CancelTaskRequestSchema:()=>Nf,CancelTaskResultSchema:()=>Pf,CancelledNotificationParamsSchema:()=>ru,CancelledNotificationSchema:()=>iu,ClientCapabilitiesSchema:()=>fu,ClientNotificationSchema:()=>If,ClientRequestSchema:()=>Ff,ClientResultSchema:()=>Lf,ClientTasksCapabilitySchema:()=>uu,CompatibilityCallToolResultSchema:()=>Td,CompleteRequestParamsSchema:()=>mf,CompleteRequestSchema:()=>hf,CompleteResultSchema:()=>gf,ContentBlockSchema:()=>hd,CreateMessageRequestParamsSchema:()=>Hd,CreateMessageRequestSchema:()=>Ud,CreateMessageResultSchema:()=>Wd,CreateMessageResultWithToolsSchema:()=>Gd,CreateTaskResultSchema:()=>wf,CursorSchema:()=>zl,DiscoverRequestSchema:()=>vu,DiscoverResultSchema:()=>yu,ElicitRequestFormParamsSchema:()=>af,ElicitRequestParamsSchema:()=>sf,ElicitRequestSchema:()=>cf,ElicitRequestURLParamsSchema:()=>of,ElicitResultSchema:()=>df,ElicitationCompleteNotificationParamsSchema:()=>lf,ElicitationCompleteNotificationSchema:()=>uf,EmbeddedResourceSchema:()=>pd,EmptyResultSchema:()=>nu,EnumSchemaSchema:()=>nf,GetPromptRequestParamsSchema:()=>sd,GetPromptRequestSchema:()=>cd,GetPromptResultSchema:()=>_d,GetTaskPayloadRequestSchema:()=>kf,GetTaskPayloadResultSchema:()=>Af,GetTaskRequestSchema:()=>Df,GetTaskResultSchema:()=>Of,IconSchema:()=>au,IconsSchema:()=>ou,ImageContentSchema:()=>ud,ImplementationSchema:()=>cu,InitializeRequestParamsSchema:()=>pu,InitializeRequestSchema:()=>mu,InitializeResultSchema:()=>gu,InitializedNotificationSchema:()=>_u,JSONArraySchema:()=>Ll,JSONObjectSchema:()=>Il,JSONRPCErrorResponseSchema:()=>$l,JSONRPCMessageSchema:()=>eu,JSONRPCNotificationSchema:()=>Zl,JSONRPCRequestSchema:()=>Xl,JSONRPCResponseSchema:()=>tu,JSONRPCResultResponseSchema:()=>Ql,JSONValueSchema:()=>Fl,LegacyTitledEnumSchemaSchema:()=>Zd,ListChangedOptionsBaseSchema:()=>kd,ListPromptsRequestSchema:()=>ad,ListPromptsResultSchema:()=>od,ListResourceTemplatesRequestSchema:()=>Lu,ListResourceTemplatesResultSchema:()=>Ru,ListResourcesRequestSchema:()=>Fu,ListResourcesResultSchema:()=>Iu,ListRootsRequestSchema:()=>vf,ListRootsResultSchema:()=>yf,ListTasksRequestSchema:()=>jf,ListTasksResultSchema:()=>Mf,ListToolsRequestSchema:()=>Sd,ListToolsResultSchema:()=>Cd,LoggingLevelSchema:()=>Ad,LoggingMessageNotificationParamsSchema:()=>Nd,LoggingMessageNotificationSchema:()=>Pd,ModelHintSchema:()=>Fd,ModelPreferencesSchema:()=>Id,MultiSelectEnumSchemaSchema:()=>tf,NotificationSchema:()=>ql,NotificationsParamsSchema:()=>Kl,NumberSchemaSchema:()=>Jd,PaginatedRequestParamsSchema:()=>wu,PaginatedRequestSchema:()=>Tu,PaginatedResultSchema:()=>Eu,PingRequestSchema:()=>bu,PrimitiveSchemaDefinitionSchema:()=>rf,ProgressNotificationParamsSchema:()=>Su,ProgressNotificationSchema:()=>Cu,ProgressSchema:()=>xu,ProgressTokenSchema:()=>Rl,PromptArgumentSchema:()=>rd,PromptListChangedNotificationSchema:()=>vd,PromptMessageSchema:()=>gd,PromptReferenceSchema:()=>pf,PromptSchema:()=>id,ReadResourceRequestParamsSchema:()=>Bu,ReadResourceRequestSchema:()=>Vu,ReadResourceResultSchema:()=>Hu,RelatedTaskMetadataSchema:()=>Vl,RequestIdSchema:()=>Yl,RequestMetaSchema:()=>Hl,RequestSchema:()=>Gl,ResourceContentsSchema:()=>Du,ResourceLinkSchema:()=>md,ResourceListChangedNotificationSchema:()=>Uu,ResourceRequestParamsSchema:()=>zu,ResourceSchema:()=>Nu,ResourceTemplateReferenceSchema:()=>ff,ResourceTemplateSchema:()=>Pu,ResourceUpdatedNotificationParamsSchema:()=>td,ResourceUpdatedNotificationSchema:()=>nd,ResultMetaObjectSchema:()=>Jl,ResultSchema:()=>L,RoleSchema:()=>ju,RootSchema:()=>_f,RootsListChangedNotificationSchema:()=>bf,SamplingContentSchema:()=>zd,SamplingMessageContentBlockSchema:()=>Bd,SamplingMessageSchema:()=>Vd,ServerCapabilitiesSchema:()=>hu,ServerNotificationSchema:()=>zf,ServerRequestSchema:()=>Rf,ServerResultSchema:()=>Bf,ServerTasksCapabilitySchema:()=>du,SetLevelRequestParamsSchema:()=>jd,SetLevelRequestSchema:()=>Md,SingleSelectEnumSchemaSchema:()=>Qd,StringSchemaSchema:()=>qd,SubscribeRequestParamsSchema:()=>Wu,SubscribeRequestSchema:()=>Gu,SubscriptionFilterSchema:()=>Ju,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Zu,SubscriptionsAcknowledgedNotificationSchema:()=>Qu,SubscriptionsListenRequestParamsSchema:()=>Yu,SubscriptionsListenRequestSchema:()=>Xu,SubscriptionsListenResultMetaSchema:()=>$u,SubscriptionsListenResultSchema:()=>ed,TaskAugmentedRequestParamsSchema:()=>Wl,TaskCreationParamsSchema:()=>xf,TaskMetadataSchema:()=>Bl,TaskSchema:()=>Cf,TaskStatusNotificationParamsSchema:()=>Tf,TaskStatusNotificationSchema:()=>Ef,TaskStatusSchema:()=>Sf,TextContentSchema:()=>ld,TextResourceContentsSchema:()=>Ou,TitledMultiSelectEnumSchemaSchema:()=>ef,TitledSingleSelectEnumSchemaSchema:()=>Xd,ToolAnnotationsSchema:()=>yd,ToolChoiceSchema:()=>Ld,ToolExecutionSchema:()=>bd,ToolListChangedNotificationSchema:()=>Od,ToolResultContentSchema:()=>Rd,ToolSchema:()=>xd,ToolUseContentSchema:()=>fd,UnsubscribeRequestParamsSchema:()=>Ku,UnsubscribeRequestSchema:()=>qu,UntitledMultiSelectEnumSchemaSchema:()=>$d,UntitledSingleSelectEnumSchemaSchema:()=>Yd}),Rm=e=>Xl.safeParse(e).success,zm=e=>Zl.safeParse(e).success,Bm=e=>Ql.safeParse(e).success,Vm=e=>$l.safeParse(e).success,Hm=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Um=`Mcp-Param-`,Wm=`x-mcp-header`,Gm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Km=new Set([`string`,`integer`,`boolean`]);function qm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(Wm in s){if(!o||a.length===0)return`${Xm(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of \'properties\' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=s[Wm];if(typeof e!=`string`||e.length===0)return`${Xm(a)}: x-mcp-header MUST be a non-empty string`;if(!Gm.test(e))return`${Xm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Km.has(i)){let e=`${Xm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Jm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ym.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Jm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ym=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Xm(e){return e.length===0?`<root>`:e.join(`.`)}var Zm=`=?base64?`,Qm=`?=`;function $m(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function eh(e){if(e.length===0||e.startsWith(Zm)&&e.endsWith(Qm)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function th(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function nh(e){return eh(e)?`${Zm}${th(e)}${Qm}`:e}function rh(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function ih(e,t){let n={};for(let r of e){let e=rh(t,r.path);if(e==null)continue;let i=$m(e);i!==void 0&&(n[`${Um}${r.headerName}`]=nh(i))}return n}B.InvalidRequest,B.UnsupportedProtocolVersion,B.InvalidParams,B.MethodNotFound,B.InvalidParams,B.MissingRequiredClientCapability,B.ParseError,B.InvalidRequest,B.MethodNotFound,B.UnsupportedProtocolVersion,B.MissingRequiredClientCapability;function ah(e,t){return Bs(e,t)}function oh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function sh(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ch=!1,lh=`draft-2020-12`;function uh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:lh});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ch||(ch=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Ps(e,{target:lh,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&fh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var dh=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function fh(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&dh.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||fh(e,`$id`in e?{}:t)))}return!1}function ph(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function mh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>ph(e)).join(`, `)}:{success:!0,data:n.value}}function hh(e){let t=Ps(e,{target:lh,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var gh=/\\\\\\.\\\\d\\{(\\d+)\\}/;function _h(e){let t=gh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>wl({local:e,offset:t,precision:n}))))}function vh(e,t){let n;switch(e){case`email`:n=[sc()];break;case`uri`:n=[dc()];break;case`date`:n=[Tl()];break;case`date-time`:n=_h(t);break}return new Set(n.map(e=>hh(e)).filter(e=>e!==void 0))}function yh(e,t,n){return n!==`zod`||vh(e,t).has(t)}function bh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xh(e){try{return uh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new qp(B.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Sh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ch(e){return Sh.has(e)||e.startsWith(`x-`)}var wh=new Set([`$schema`,...Object.keys(af.shape.requestedSchema.shape)]),Th={string:oh([qd,Yd,Xd,Zd]),number:oh([Jd]),integer:oh([Jd]),boolean:oh([Kd]),array:oh([$d,ef])},Eh=new Set(qd.shape.format.unwrap().options);function Dh(e,t,n,r){if(!bh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Th,e.type)?Th[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ch(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Eh.has(e.format)?(typeof s!=`string`||!yh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Dh(n,`properties.${e}`,t,r)])):wh.has(i)?n[i]=a:Ch(i)||r.push(i);if(r.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function kh(e,t){if(!bh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ah(rf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Ah(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Ah(e,t[r],`${n}[${r}]`)):!bh(e)||!bh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Ah(r,t[e],i):Ch(e)?[]:[i]})}function jh(e){if(!sh(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Oh(xh(e.requestedSchema),t),r=ah(af.shape.requestedSchema,n);if(!r.success)throw new qp(B.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${kh(n,r.error.message)}`);let i=Ah(n,r.data);if(i.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Mh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Mh,{elicit(e){try{return{method:`elicitation/create`,params:jh(e)}}catch(e){throw e instanceof qp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Nh=!0,Ph=10,Fh=250;function Ih(e){return{autoFulfill:e?.autoFulfill??Nh,maxRounds:e?.maxRounds??Ph}}function Lh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Rh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function zh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Bh(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new z(R.InputRequiredRoundsExceeded,Rh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Bh(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await zh(Fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Lh(r,u,c.requestState),d);if(Hm(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Hh=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Uh={IdJagTokenExchangeResponseSchema:qf,OAuthClientInformationFullSchema:Qf,OAuthClientInformationSchema:Zf,OAuthClientMetadataSchema:Xf,OAuthClientRegistrationErrorSchema:$f,OAuthErrorResponseSchema:Jf,OAuthMetadataSchema:Uf,OAuthProtectedResourceMetadataSchema:Hf,OAuthTokenRevocationRequestSchema:ep,OAuthTokensSchema:Kf,OpenIdProviderDiscoveryMetadataSchema:Gf,OpenIdProviderMetadataSchema:Wf},Wh={},Gh={};function Kh(e,t){let n=e.slice(0,-6);Wh[n]=t,Gh[n]=e=>t.safeParse(e).success}for(let e of Hh)Kh(e,Lm[e]);for(let[e,t]of Object.entries(Uh))Kh(e,t);Object.freeze(Wh);var qh=Object.freeze(Gh);function Jh(e){switch(e){case`initialize`:case`notifications/initialized`:return jm(void 0);case`server/discover`:return jm(Am);default:return}}var Yh=[kl,Al,Ml,Pl],Xh=[`inputResponses`,`requestState`];function Zh(e,t){let n=e.params;if(!ng(n))return{message:e,lifted:{}};let r=n._meta,i=ng(r)?Yh.filter(e=>e in r):[],a=t===`request`?Xh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ng(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Qh(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function $h(e){return()=>e}var eg=$h(void 0),tg=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Dl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'${e.kind}\' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Bm(e)||Vm(e)?this._onresponse(e):Rm(e)?this._onrequest(e,t):zm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new z(R.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Zh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(Pm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Zh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(B.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Nm(n.method)&&!i.hasRequestMethod(n.method)&&!(Fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(B.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(B.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(B.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ag(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?eg:$h(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),sh(t))return u(e,t,n);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(B.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:B.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Bm(e)?n(e):n(qp.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(sh(t))return Fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return jm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Jh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Nm(t)&&!e.hasRequestMethod(t))throw new z(R.MethodNotSupportedByProtocolVersion,`Method \'${t}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof z?e:new z(R.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(dg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;mh(n,o).then(e=>{e.success?d(e.data):f(new z(R.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ee=r?.timeout??6e4;this._setupTimeout(h,ee,r?.maxTotalTimeout,()=>y(new z(R.RequestTimeout,`Request timed out`,{timeout:ee})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new z(R.NotConnected,`Not connected`);if(Pm(t.method)&&!e.hasNotificationMethod(t.method))throw new z(R.MethodNotSupportedByProtocolVersion,`Notification \'${t.method}\' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Nm(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await mh(t.params,{...r.params});if(!a.success)throw new qp(B.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await mh(t.params,{...r.params});if(!i.success)throw new qp(B.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ng(a)&&ng(i)?{...a,...i}:i}return n}function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(e){let t={},n=[];if(!ig(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ig(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function og(e){throw new z(R.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function sg(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:$h(void 0),signal:r,send:(()=>og(`send`)),notify:()=>og(`notify`)}}}async function cg(e,t,n,r,i){if(!ig(r)||typeof r.method!=`string`)throw new z(R.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new z(R.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new z(R.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ig(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(sg(n,a,s,i,e.sessionId)))}function lg(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ug(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>cg(e,i,t,n,r),retry:(e,t)=>r.retry(e,lg(o,t))};return Vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function dg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}p((e=>{var t=/; *([!#$%&\'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*"|[!#$%&\'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function fg(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fg(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fg(e[r],t[r]))return!1;return!0}return e===t}function pg(e){return encodeURI(mg(e))}function mg(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var hg={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},gg={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},_g={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},vg=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function yg(e,t=Object.create(null),n=vg,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:yg(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(_g[i])continue;let a=`${r}/${pg(i)}`,o=e[i];if(Array.isArray(o)){if(hg[i]){let e=o.length;for(let r=0;r<e;r++)yg(o[r],t,n,`${a}/${r}`)}}else if(gg[i])for(let e in o)yg(o[e],t,n,`${a}/${pg(e)}`);else yg(o,t,n,a)}return t}var bg=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,xg=[0,31,28,31,30,31,30,31,31,30,31,30,31],Sg=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,Cg=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,wg=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Tg=/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,Eg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,jg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Mg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,Ng=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,Pg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function Fg(e){return e.test.bind(e)}var Ig={date:Rg,time:zg.bind(void 0,!1),"date-time":Vg,duration:Pg,uri:Wg,"uri-reference":Fg(wg),"uri-template":Fg(Tg),url:Fg(Eg),email:jg,hostname:Fg(Cg),ipv4:Fg(Mg),ipv6:Fg(Ng),regex:Kg,uuid:Fg(Dg),"json-pointer":Fg(Og),"json-pointer-uri-fragment":Fg(kg),"relative-json-pointer":Fg(Ag)};function Lg(e){return e%4==0&&(e%100!=0||e%400==0)}function Rg(e){let t=e.match(bg);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Lg(n)?29:xg[r])}function zg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Bg=/t|\\s/i;function Vg(e){let t=e.split(Bg);return t.length==2&&Rg(t[0])&&zg(!0,t[1])}var Hg=/\\/|:/,Ug=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Wg(e){return Hg.test(e)&&Ug.test(e)}var Gg=/[^\\\\]\\\\Z/;function Kg(e){if(Gg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function qg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Jg(e,t,n=`2019-09`,r=yg(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:ee,oneOf:te,if:ne,then:re,else:ie,format:ae,properties:oe,patternProperties:se,additionalProperties:ce,unevaluatedProperties:le,minProperties:ue,maxProperties:de,propertyNames:fe,dependentRequired:pe,dependentSchemas:b,dependencies:me,prefixItems:he,items:ge,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:be,maxContains:xe,minItems:Se,maxItems:Ce,uniqueItems:we,minimum:Te,maximum:Ee,exclusiveMinimum:De,exclusiveMaximum:x,multipleOf:Oe,minLength:ke,maxLength:Ae,pattern:je,__absolute_ref__:Me,__absolute_recursive_ref__:Ne}=t,S=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Ne]:a,u=`${s}/$recursiveRef`,d=Jg(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||S.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[Me||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw Me&&Me!==d&&(e+=` Absolute URI "${Me}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Jg(e,t,n,r,i,a,o,l,c);if(u.valid||S.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:S.length===0,errors:S}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fg(e,h)||S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fg(e,t))||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Jg(e,v,n,r,i,a,o,t).valid&&S.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Pe=[];if(y!==void 0){let t=`${s}/anyOf`,l=S.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u||=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ee!==void 0){let t=`${s}/allOf`,l=S.length,u=!0;for(let s=0;s<ee.length;s++){let l=ee[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u&&=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(te!==void 0){let t=`${s}/oneOf`,l=S.length,u=te.filter((s,l)=>{let u=Object.create(c),d=Jg(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return S.push(...d.errors),d.valid&&Pe.push(u),d.valid}).length;u===1?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Pe),ne!==void 0){let t=`${s}/if`;if(Jg(e,ne,n,r,i,a,o,t,c).valid){if(re!==void 0){let l=Jg(e,re,n,r,i,a,o,`${s}/then`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(ie!==void 0){let l=Jg(e,ie,n,r,i,a,o,`${s}/else`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||S.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ue!==void 0&&t.length<ue&&S.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ue} properties.`}),de!==void 0&&t.length>de&&S.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pg(s)}`,c=Jg(s,fe,n,r,i,a,e,t);c.valid||S.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(pe!==void 0){let t=`${s}/dependantRequired`;for(let n in pe)if(n in e){let r=pe[n];for(let i of r)i in e||S.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(b!==void 0)for(let t in b){let l=`${s}/dependentSchemas`;if(t in e){let s=Jg(e,b[t],n,r,i,a,o,`${l}/${pg(t)}`,c);s.valid||S.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(me!==void 0){let t=`${s}/dependencies`;for(let s in me)if(s in e){let c=me[s];if(Array.isArray(c))for(let n of c)n in e||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Jg(e,c,n,r,i,a,o,`${t}/${pg(s)}`);l.valid||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(oe!==void 0){let t=`${s}/properties`;for(let s in oe){if(!(s in e))continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],oe[s],n,r,i,a,d,`${t}/${pg(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,S.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&se!==void 0){let t=`${s}/patternProperties`;for(let s in se){let d=new RegExp(s,`u`),f=se[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pg(p)}`,h=Jg(e[p],f,n,r,i,a,m,`${t}/${pg(s)}`);h.valid?c[p]=l[p]=!0:(u=i,S.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&ce!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],ce,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,S.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&le!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pg(s)}`,u=Jg(e[s],le,n,r,i,a,l,t);u.valid?c[s]=!0:S.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Ce!==void 0&&e.length>Ce&&S.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Ce}).`}),Se!==void 0&&e.length<Se&&S.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Se}).`});let t=e.length,l=0,u=!1;if(he!==void 0){let d=`${s}/prefixItems`,f=Math.min(he.length,t);for(;l<f;l++){let t=Jg(e[l],he[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ge!==void 0){let d=`${s}/items`;if(Array.isArray(ge)){let s=Math.min(ge.length,t);for(;l<s;l++){let t=Jg(e[l],ge[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Jg(e[l],ge,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Jg(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,S.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&be===void 0)S.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(be!==void 0&&t<be)S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${be}).`});else{let l=`${s}/contains`,u=S.length,d=0;for(let s=0;s<t;s++){let t=Jg(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):S.push(...t.errors)}d>=(be||0)&&(S.length=u),be===void 0&&xe===void 0&&d===0?S.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):be!==void 0&&d<be?S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${be} items matching schema. Only ${d} items were found.`}):xe!==void 0&&d>xe&&S.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${xe} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Jg(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||S.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(we)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fg(r,t))&&(S.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(Te!==void 0&&(De===!0&&e<=Te||e<Te)&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${De?`or equal to `:``} ${Te}.`}),Ee!==void 0&&(x===!0&&e>=Ee||e>Ee)&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${x?`or equal to `:``} ${Ee}.`})):(Te!==void 0&&e<Te&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Te}.`}),Ee!==void 0&&e>Ee&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Ee}.`}),De!==void 0&&e<=De&&S.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${De}.`}),x!==void 0&&e>=x&&S.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${x}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&S.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=ke===void 0&&Ae===void 0?0:qg(e);ke!==void 0&&t<ke&&S.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ke}).`}),Ae!==void 0&&t>Ae&&S.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Ae}).`}),je!==void 0&&!new RegExp(je,`u`).test(e)&&S.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),ae!==void 0&&Ig[ae]&&!Ig[ae](e)&&S.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${ae}".`})}return{valid:S.length===0,errors:S}}var Yg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=yg(e)}validate(e){return Jg(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),yg(e,this.lookup)}},Xg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ee(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Yg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Zg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e),this.name=new.target.name,np(this,new.target)}};(class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Qg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,np(this,new.target)}},$g=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),e_=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(t_(e))}set(e,t){let n=t_(e),r=$g.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!$g.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(t_(e))&&!$g.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=$g.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function t_(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function n_(e,t){return t===void 0?e:`${e}\\0${t}`}var r_=864e5,i_=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(n_(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:a_(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function a_(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var o_=Symbol.for(`mcp.authSeamEscape`);function s_(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[o_]===!0}var c_=-32022,l_=new Set([-32001,-32020,-32021]);function u_(e,t){switch(e.kind){case`result`:return d_(e.result,t);case`rpc-error`:return f_(e,t);case`http-error`:return p_(e,t);case`network-error`:return m_(e.error,t);case`unusable-reply`:return{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${g_(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:m_(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new z(R.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function d_(e,t){let n=jm(Am).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Xp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function f_(e,t){let{code:n,message:r,data:i}=e;if(n===c_){let e=__(i);if(e===void 0)return{kind:`legacy`};let n=new Xp({supported:e,requested:v_(i)??t.requestedVersion},r),a=lp(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return l_.has(n),{kind:`legacy`}}function p_(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new ip(t?R.ClientHttpForbidden:R.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new ip(R.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=y_(e.body);return n===void 0?{kind:`legacy`}:f_(n,t)}function m_(e,t){return t.environment===`browser`&&h_(e)?{kind:`legacy`}:{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: ${g_(e)}`,{cause:e},{cause:e})}}function h_(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function g_(e){return e instanceof Error?e.message:String(e)}function __(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function v_(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function y_(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var b_=`legacy`;function x_(e,t){let n=e?.mode??b_;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!sp(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?lp(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...op],fallbackAvailable:!t||cp(t).length>0,probe:r}}function S_(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function C_(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var w_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Bm(e)||Vm(e))&&e.id===t.id){n._pending=void 0,Bm(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,T_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},T_=new WeakMap;function E_(e){let t=T_.get(e);T_.delete(e),t?.()}function D_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:jm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function O_(e){return e instanceof z&&e.code===R.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function k_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(s_(t)||t instanceof Qg||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof ip){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return O_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function A_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await w_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>D_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=k_(r,n),d=u_(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new z(R.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function j_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function M_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(N_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=A_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await P_(a),t.close=o}if(s)throw N_();return u}function N_(){return new z(R.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function P_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function F_(e){let t=e._meta?.[jl];return qh.Implementation(t)?t:void 0}function I_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&I_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&I_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&I_(n,t)}}function L_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function R_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&yu.safeParse(e.discover).success))return e;throw new z(R.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var z_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},B_=64,V_={};(class extends tg{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{V_.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,V_.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),V_.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new z(R.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Ih(t?.inputRequired),this._cache=new i_(t?.responseCacheStore??new e_,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??B_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&sp(this._negotiatedProtocolVersion)&&Rm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ug({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=rg(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=L_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new qp(B.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new qp(B.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new qp(l.reason===`not-in-era`?B.InternalError:B.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{I_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new qp(c.reason===`not-in-era`?B.InternalError:B.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new z(R.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,R_(t.prior),t);let n=x_(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=cp(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new z(R.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=C_(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:S_(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?j_(e):void 0;r=o===void 0?await A_(t,{...a,transport:e,transportKind:i}):await M_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),E_(e),t}if(E_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=F_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&lp(i).length>0?lp(i):op).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new z(R.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=F_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return sp(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new z(R.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new z(R.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new z(R.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new z(R.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new z(R.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new z(R.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new z(R.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new z(R.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new z(R.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new z(R.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},yu,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new z(R.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),r_),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:qm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new z(R.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!sp(n))throw new z(R.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new z(R.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new z(R.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(z_,e.method)?z_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Nl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Vm(e)?n.settle({cause:`remote`,error:qp.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new z(R.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new z(R.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&S_()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=ih(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new qp(B.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof qp&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new qp(B.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new qp(B.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof qp?e:new qp(B.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||C_(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=qm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=ah(kd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,np(this,new.target)}};var H_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},U_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},W_=new Set;function G_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;W_.has(o)||(W_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},K_(t)):e=>s({method:a,params:e})]}function K_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var q_=`2026-01-26`,J_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=eu.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Y_=M([F(`light`),F(`dark`)]).describe(`Color theme preference for the host environment.`),X_=M([F(`inline`),F(`fullscreen`),F(`pip`)]).describe(`Display mode for UI presentation.`),Z_=N(M([F(`--color-background-primary`),F(`--color-background-secondary`),F(`--color-background-tertiary`),F(`--color-background-inverse`),F(`--color-background-ghost`),F(`--color-background-info`),F(`--color-background-danger`),F(`--color-background-success`),F(`--color-background-warning`),F(`--color-background-disabled`),F(`--color-text-primary`),F(`--color-text-secondary`),F(`--color-text-tertiary`),F(`--color-text-inverse`),F(`--color-text-ghost`),F(`--color-text-info`),F(`--color-text-danger`),F(`--color-text-success`),F(`--color-text-warning`),F(`--color-text-disabled`),F(`--color-border-primary`),F(`--color-border-secondary`),F(`--color-border-tertiary`),F(`--color-border-inverse`),F(`--color-border-ghost`),F(`--color-border-info`),F(`--color-border-danger`),F(`--color-border-success`),F(`--color-border-warning`),F(`--color-border-disabled`),F(`--color-ring-primary`),F(`--color-ring-secondary`),F(`--color-ring-inverse`),F(`--color-ring-info`),F(`--color-ring-danger`),F(`--color-ring-success`),F(`--color-ring-warning`),F(`--font-sans`),F(`--font-mono`),F(`--font-weight-normal`),F(`--font-weight-medium`),F(`--font-weight-semibold`),F(`--font-weight-bold`),F(`--font-text-xs-size`),F(`--font-text-sm-size`),F(`--font-text-md-size`),F(`--font-text-lg-size`),F(`--font-heading-xs-size`),F(`--font-heading-sm-size`),F(`--font-heading-md-size`),F(`--font-heading-lg-size`),F(`--font-heading-xl-size`),F(`--font-heading-2xl-size`),F(`--font-heading-3xl-size`),F(`--font-text-xs-line-height`),F(`--font-text-sm-line-height`),F(`--font-text-md-line-height`),F(`--font-text-lg-line-height`),F(`--font-heading-xs-line-height`),F(`--font-heading-sm-line-height`),F(`--font-heading-md-line-height`),F(`--font-heading-lg-line-height`),F(`--font-heading-xl-line-height`),F(`--font-heading-2xl-line-height`),F(`--font-heading-3xl-line-height`),F(`--border-radius-xs`),F(`--border-radius-sm`),F(`--border-radius-md`),F(`--border-radius-lg`),F(`--border-radius-xl`),F(`--border-radius-full`),F(`--border-width-regular`),F(`--shadow-hairline`),F(`--shadow-sm`),F(`--shadow-md`),F(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),M([T(),Mc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);A({method:F(`ui/open-link`),params:A({url:T().describe(`URL to open in the host\'s browser`)})});var Q_=A({isError:D().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),$_=A({isError:D().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),ev=A({isError:D().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();A({method:F(`ui/notifications/sandbox-proxy-ready`),params:A({})});var tv=A({connectDomains:k(T()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:k(T()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:k(T()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:k(T()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),nv=A({camera:A({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:A({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});A({method:F(`ui/notifications/size-changed`),params:A({width:E().optional().describe(`New width in pixels.`),height:E().optional().describe(`New height in pixels.`)})});var rv=A({method:F(`ui/notifications/tool-input`),params:A({arguments:N(T(),O().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),iv=A({method:F(`ui/notifications/tool-input-partial`),params:A({arguments:N(T(),O().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),av=A({method:F(`ui/notifications/tool-cancelled`),params:A({reason:T().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),ov=A({fonts:T().optional()}),sv=A({variables:Z_.optional().describe(`CSS variables for theming the app.`),css:ov.optional().describe(`CSS blocks that apps can inject.`)}),cv=A({method:F(`ui/resource-teardown`),params:A({})}),lv=N(T(),O()),uv=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)});A({method:F(`ui/notifications/request-teardown`),params:A({}).optional()});var dv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:D().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:D().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:nv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:tv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:uv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:uv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),fv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:D().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:k(X_).optional().describe(`Display modes the app supports.`)});A({method:F(`ui/notifications/initialized`),params:A({}).optional()}),A({csp:tv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:nv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:T().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:D().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),A({method:F(`ui/request-display-mode`),params:A({mode:X_.describe(`The display mode being requested.`)})});var pv=A({mode:X_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),mv=M([F(`model`),F(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:T().optional(),visibility:k(mv).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:zc().optional(),permissions:zc().optional()}),A({mimeTypes:k(T()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),A({method:F(`ui/download-file`),params:A({contents:k(M([pd,md])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),A({method:F(`ui/message`),params:A({role:F(`user`).describe(`Message role, currently only "user" is supported.`),content:k(hd).describe(`Message content blocks (text, image, etc.).`)})}),A({method:F(`ui/notifications/sandbox-resource-ready`),params:A({html:T().describe(`HTML content to load into the inner iframe.`),sandbox:T().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:tv.optional().describe(`CSP configuration from resource metadata.`),permissions:nv.optional().describe(`Sandbox permissions from resource metadata.`)})});var hv=A({method:F(`ui/notifications/tool-result`),params:wd.describe(`Standard MCP tool execution result.`)}),gv=A({toolInfo:A({id:Yl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:xd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Y_.optional().describe(`Current color theme preference.`),styles:sv.optional().describe(`Style configuration for theming the app.`),displayMode:X_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:k(X_).optional().describe(`Display modes the host supports.`),containerDimensions:M([A({height:E().describe(`Fixed container height in pixels.`)}),A({maxHeight:M([E(),Mc()]).optional().describe(`Maximum container height in pixels.`)})]).and(M([A({width:E().describe(`Fixed container width in pixels.`)}),A({maxWidth:M([E(),Mc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:T().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:T().optional().describe(`User\'s timezone in IANA format.`),userAgent:T().optional().describe(`Host application identifier.`),platform:M([F(`web`),F(`desktop`),F(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:D().optional().describe(`Whether the device supports touch input.`),hover:D().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:E().describe(`Top safe area inset in pixels.`),right:E().describe(`Right safe area inset in pixels.`),bottom:E().describe(`Bottom safe area inset in pixels.`),left:E().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),_v=A({method:F(`ui/notifications/host-context-changed`),params:gv.describe(`Partial context update containing only changed fields.`)});A({method:F(`ui/update-model-context`),params:A({content:k(hd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:N(T(),O().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),A({method:F(`ui/initialize`),params:A({appInfo:cu.describe(`App identification (name and version).`),appCapabilities:fv.describe(`Features and capabilities this app provides.`),protocolVersion:T().describe(`Protocol version this app supports.`)})});var vv=A({protocolVersion:T().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cu.describe(`Host application identification and version.`),hostCapabilities:dv.describe(`Features and capabilities provided by the host.`),hostContext:gv.describe(`Rich context about the host environment.`)}).passthrough(),yv={target:`draft-2020-12`};async function bv(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](yv);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function xv(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Sv(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var Cv=class e extends tg{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H_;_methods=new U_;setRequestHandler=(...e)=>{let[t,...n]=G_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=G_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:rv,toolinputpartial:iv,toolresult:hv,toolcancelled:av,hostcontextchanged:_v};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&yt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Sv(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await xv(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await xv(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await bv(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await bv(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:cv.shape.params,result:lv},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ev,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},nu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Q_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},$_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},pv,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new J_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:q_}},vv,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},wv=e=>`${e}`.split(`.`)[1]?.length??0,Tv=e=>10**-wv(e),Ev=(e,t)=>`${+e.toFixed(wv(t))}`,Dv=class extends Error{},Ov=/[A-Za-z_$][\\w$-]*/y,kv=/-?(?:\\d[\\d_]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/iy,Av={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`\'`,nbsp:`\\xA0`},jv=e=>e.replace(/&(#x[\\da-f]+|#\\d+|\\w+);/gi,(e,t)=>t[0]===`#`?String.fromCodePoint(t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):+t.slice(1)):Av[t]??e),Mv=e=>e.replace(/\\\\(u\\{[\\da-f]+\\}|u[\\da-f]{4}|x[\\da-f]{2}|[\\s\\S])/gi,(e,t)=>t.length>1?String.fromCodePoint(parseInt(t.replace(/[ux{}]/gi,``),16)):{n:`\n`,t:` `,r:`\\r`,b:`\\b`,f:`\\f`,v:`\\v`,0:`\\0`}[t]??t);function Nv(e){let t=0,n=e=>{throw new Dv(e)},r=()=>e.slice(t,t+12).split(`\n`)[0],i=n=>{n.lastIndex=t;let r=n.exec(e)?.[0];return r&&(t+=r.length),r},a=()=>{for(;;)if(i(/\\s+/y),e.startsWith(`//`,t))i(/\\/\\/.*/y);else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n<0?e.length:n+2}else return},o=n=>(a(),e.startsWith(n,t)),s=e=>{o(e)||n(`Expected \\`${e}\\` at \\`${r()}\\`.`),t+=e.length};function c(){let a=[i(Ov)??n(`Expected a name at \\`${r()}\\`.`)];for(;e[t]===`.`;)t++,a.push(i(Ov)??n("Expected a name after `.`."));return a}function l(r,i=!1){let a=e[t],o=t+1;for(;o<e.length&&e[o]!==a;)e[o]===`\\\\`&&!i&&o++,o++;o>=e.length&&n(`A string is not closed.`);let s=e.slice(t+1,o);return a==="`"&&s.includes("${")&&n(`A template string cannot run here.`),t=o+1,{type:`string`,value:i?jv(s):Mv(s),quote:a,jsx:i,start:r,end:t}}function u(){a();let r=t,f=e[t];if(f===`"`||f===`\'`||f==="`")return l(r);if(f===`<`)return d();if(f===`(`){t++;let e=u();return s(`)`),e}if(f===`[`){t++;let e=[];for(;!o(`]`);)e.push(u()),o(`]`)||s(`,`);return t++,{type:`array`,items:e,start:r,end:t}}if(f===`{`){t++;let n=[];for(;!o(`}`);){let r=t,i=e[t]===`"`||e[t]===`\'`?l(t).value:c()[0],a={type:`name`,path:[i],start:r,end:t};n.push([i,o(`:`)?(t++,u()):a]),o(`}`)||s(`,`)}return t++,{type:`object`,entries:n,start:r,end:t}}let p=i(kv);if(p)return{type:`number`,value:+p.replace(/_/g,``),start:r,end:t};let m=c(),h=t;if(m.length===1){let e=m[0];if(e===`true`||e===`false`)return{type:`boolean`,value:e===`true`,start:r,end:h};if(e===`null`||e===`undefined`)return{type:e,start:r,end:h}}return o(`(`)&&n(`\\`${m.join(`.`)}()\\` is a call, which cannot run here.`),{type:`name`,path:m,start:r,end:h}}function d(){let f=t;s(`<`);let p=o(`>`)?``:c().join(`.`),m=[];for(;;){if(o(`/>`))return t+=2,{type:`element`,name:p,attributes:m,children:[],start:f,end:t};if(o(`>`))break;let c=t;if(o(`{`)){t++,s(`...`);let e=u();s(`}`),m.push({name:``,value:e,spread:!0,start:c,end:t});continue}let d=i(/[\\w$:-]+/y)??n(`Expected a prop at \\`${r()}\\`.`),h=t,g=null;o(`=`)&&(t++,a(),e[t]===`{`?(t++,g=u(),s(`}`)):g=e[t]===`"`||e[t]===`\'`?l(t,!0):u()),m.push({name:d,value:g,start:c,end:g?t:h})}t++;let h=[];for(;;){t>=e.length&&n(`\\`<${p}>\\` is not closed.`);let r=t;if(e.startsWith(`</`,t)){t+=2,a();let r=e[t]===`>`?``:c().join(`.`);return r!==p&&n(`\\`</${r}>\\` does not close \\`<${p}>\\`.`),s(`>`),{type:`element`,name:p,attributes:m,children:h,start:f,end:t}}e[t]===`<`?h.push(d()):e[t]===`{`?(t++,o(`}`)||h.push(u()),s(`}`)):(t=e.slice(t).search(/[<{]/)+t,t<r&&(t=e.length),h.push({type:`text`,raw:e.slice(r,t),start:r,end:t}))}}let f=[];for(;!o(`;`)&&t<e.length;){e[t]!==`<`&&e[t]!==`(`&&n(`Expected an element at \\`${r()}\\`.`);let i=u();i.type!==`element`&&n(`Expected an element.`),f.push(i)}return f}function Pv(e,t={}){let n=[],r=(e,r,i)=>{let a=t[`${e}.${r}`]??t[r],{value:o}=i,s=i.type===`string`?i.quote:``;a===!1||s==="`"||`${o}`.includes(`\n`)||n.push({prop:r,kind:Array.isArray(a)?`option`:i.type===`string`?`text`:i.type,value:o,range:{start:i.start,end:i.end},quote:s,jsx:i.type===`string`&&(!s||!!i.jsx),step:typeof o==`number`?Tv(o):1,...Array.isArray(a)?{options:a}:a})},i=e=>{for(let{name:t,value:n}of e.attributes)n?.type===`element`?i(n):(n?.type===`string`||n?.type===`number`||n?.type===`boolean`)&&r(e.name,t,n);let[t]=e.children,n=t?.type===`text`?t.raw.trim():``;if(e.children.length===1&&n&&!n.includes(`\n`)){let i=t.start+t.raw.indexOf(n);r(e.name,`children`,{type:`string`,value:jv(n),quote:``,start:i,end:i+n.length})}for(let t of e.children)t.type===`element`&&i(t)};return e.forEach(i),n}function Fv(e,t){let{quote:n}=e;if(typeof t!=`string`){let r=typeof t==`number`?Ev(t,e.step):`${t}`;return e.jsx&&n?`{${r}}`:r}if(!e.jsx){let e=n||`"`;return e+t.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(e,`\\\\${e}`)+e}let r=t.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return n?n+r.replaceAll(n,n===`"`?`"`:`'`)+n:r.replaceAll(`>`,`>`).replaceAll(`{`,`{`).replaceAll(`}`,`}`)}function Iv(e,t,n){let{start:r,end:i}=t.range;return e.slice(0,r)+Fv(t,n)+e.slice(i)}function Lv(e){let t=[],n=e=>{for(let r of e.attributes)!r.value&&!r.spread?t.push(r.end):r.value?.type===`element`&&n(r.value);for(let t of e.children)t.type===`element`&&n(t)};return Nv(e).forEach(n),t.reverse().reduce((e,t)=>e.slice(0,t)+`={true}`+e.slice(t),e)}var Rv=new Set(`as async await break case catch class const continue default delete do else enum export extends false finally for from function if import in instanceof interface let new null of return satisfies static switch this throw true try type typeof undefined var void while yield`.split(` `)),zv=/^(|[(,=:?[{}>&|!]|return)$/;function Bv(e){let t=[],n=[{in:`code`,depth:0}],r=0,i=``,a=t=>(t.lastIndex=r,t.exec(e)?.[0]??``),o=(e,n)=>{n&&t.push({ink:e,start:r,end:r+n}),r+=n},s=t=>{let n=r+1;for(;n<e.length&&e[n]!==t;)n+=e[n]===`\\\\`?2:1;o(`string`,Math.min(n+1,e.length)-r)};for(;r<e.length;){let t=n[n.length-1],c=e[r];if(t.in===`text`){if(c===`{`)r++,n.push({in:`code`,depth:0});else if(c===`<`)r++,e[r]===`/`?(r++,o(`tag`,a(/[\\w$.:-]*/y).length),r=Math.max(r,e.indexOf(`>`,r)+1),n.pop()):n.push({in:`tag`,named:!1});else{let t=e.slice(r).search(/[<{]/);r=t<0?e.length:r+t}continue}if(t.in===`tag`){let i=a(/[\\w$.:-]+/y);i?o(t.named?`attribute`:`tag`,i.length):c===`"`||c===`\'`?s(c):c===`{`?(r++,n.push({in:`code`,depth:0})):c===`>`?(r++,n[n.length-1]={in:`text`}):e.startsWith(`/>`,r)?(r+=2,n.pop()):r++,t.named=!0;continue}let l=a(/\\s+|\\/\\/.*|\\/\\*[\\s\\S]*?(\\*\\/|$)/y);if(l){r+=l.length;continue}let u=a(/[A-Za-z_$][\\w$]*/y);if(u){let t=e.slice(r+u.length).match(/^\\s*(\\S)/)?.[1],n=Rv.has(u)?`keyword`:t===`(`||/^[A-Z]/.test(u)?`tag`:e[r-1]===`.`||t===`:`&&i!==`?`?`attribute`:void 0;n?o(n,u.length):r+=u.length,i=u===`return`?u:`name`;continue}let d=a(/\\d[\\d_]*\\.?\\d*(e[+-]?\\d+)?n?|\\.\\d+/iy);if(d){o(`keyword`,d.length),i=`name`;continue}if(c===`"`||c===`\'`||c==="`"){s(c),i=`name`;continue}if(c===`<`&&zv.test(i)&&/[A-Za-z>]/.test(e[r+1]??``)){r++,n.push({in:`tag`,named:e[r]===`>`}),e[r]===`>`&&(r++,n[n.length-1]={in:`text`});continue}if(c===`{`&&t.depth++,c===`}`){if(t.depth===0&&n.length>1){r++,n.pop();continue}t.depth--}i=e.startsWith(`&&`,r)||e.startsWith(`||`,r)?`&`:c,r++}return t}var Vv=`.cc{--cc-surface:light-dark(#fff,oklch(17.5% 0 0));--cc-subtle:light-dark(oklch(93% 0 0),oklch(24.5% 0 0));--cc-sunken:light-dark(oklch(89.5% 0 0),oklch(21% 0 0));--cc-foreground:light-dark(oklch(22.7% .006 271.2),oklch(92.3% .004 286.3));--cc-secondary:light-dark(oklch(41.8% .014 274.6),oklch(78.2% .016 281.9));--cc-muted:light-dark(oklch(52% .044 267.6),oklch(67.3% .028 276.2));--cc-disabled:light-dark(oklch(72% .01 270),oklch(48% .01 280));--cc-text:light-dark(oklch(49% .04 268),oklch(67.3% .028 276.2));--cc-line:light-dark(oklch(59% .02 270),oklch(51% .02 276));--cc-tag:light-dark(oklch(46% .185 145.3),oklch(84.4% .185 145.3));--cc-attribute:light-dark(oklch(46% .088 229.9),oklch(85.7% .088 229.9));--cc-string:light-dark(oklch(46% .191 32.2),oklch(71.2% .191 32.2));--cc-keyword:light-dark(oklch(46% .2 317.2),oklch(76.9% .2 317.2));--cc-sans:Geist, ui-sans-serif, system-ui, sans-serif;--cc-mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--cc-ease:.24s cubic-bezier(.2, .9, .3, 1);--copy:0;--reset:0;--split:.5;--seam:min(2px, var(--split) * (100cqw - 4px), (1 - var(--split)) * (100cqw - 4px));--edge:calc(2px + var(--split) * (100cqw - 4px - var(--seam)));box-sizing:border-box;outline:1px solid var(--cc-subtle);background:var(--cc-subtle);width:100%;color:var(--cc-foreground);font:16px/24px var(--cc-sans);text-align:left;-webkit-font-smoothing:antialiased;border-radius:8px;position:relative;overflow:hidden;container-type:inline-size}.cc[data-theme=light]{color-scheme:light}.cc[data-theme=dark]{color-scheme:dark}.cc *,.cc :before,.cc :after{box-sizing:inherit}.cc-frame{background:var(--cc-surface);gap:2px;padding:2px;display:grid}.cc-split{inset:0 auto;left:calc(var(--edge) + var(--seam) / 2 - 5px);width:14px;translate:max(-8px, min(0px, (1 - var(--split)) * (100cqw - 4px - var(--seam)) - 8px));cursor:grab;touch-action:none;display:none;position:absolute}.cc-split:active{cursor:grabbing}.cc-split:before,.cc-split:after{content:"";transition:.4s linear(0, .48, 1, 1.13, 1.06, 1, .98, 1);transition-property:opacity,scale;position:absolute}.cc-split:before{top:calc(50% - 29.315px);left:calc(var(--seam) / 2 + 4px);transform-origin:1px;background:var(--cc-surface);width:9px;height:58.63px;mask:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'3 0 9 58.63\'%3E%3Cpath d=\'M3 0H4A6 6 0 0 0 8 5.66A6 6 0 0 1 12 11.31V47.31A6 6 0 0 1 8 52.97A6 6 0 0 0 4 58.63H3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(50% - 20px);left:calc(var(--seam) / 2 + 5px);transform-origin:0;background:var(--cc-disabled);border-radius:2px;width:4px;height:40px}.cc-split:not(:hover,:active):before,.cc-split:not(:hover,:active):after{opacity:0;scale:.8}.cc-split:active:before,.cc-split:active:after{scale:1.1}@container (width>=640px){.cc-frame{grid-template-columns:calc(var(--split) * (100% - var(--seam))) minmax(0, 1fr);column-gap:var(--seam)}.cc-preview{overflow:clip}.cc-code{clip-path:inset(-2px 0 0 -2px)}.cc>.cc-tab{--cut:calc(var(--edge) + var(--seam) - 2px);clip-path:polygon(-1px -1px, calc(var(--cut) + 6px) -1px, calc(var(--cut) + 6px) 0, calc(var(--cut) + 4.45px) .2px, calc(var(--cut) + 3px) .8px, calc(var(--cut) + 1.76px) 1.76px, calc(var(--cut) + .8px) 3px, calc(var(--cut) + .2px) 4.45px, var(--cut) 6px, var(--cut) calc(100% + 6px), -1px calc(100% + 6px))}.cc-split{display:block}.cc[data-only]>.cc-frame{grid-template-columns:minmax(0,1fr)}.cc[data-only]>.cc-tab{clip-path:none}}.cc{--share:.5;--seam-y:2px;--edge-y:var(--rest,0px)}.cc[data-stack]{--seam-y:min(2px, var(--share) * var(--stack), (1 - var(--share)) * var(--stack));--edge-y:calc(2px + var(--share) * (var(--stack) - var(--seam-y)))}@container (width<640px){.cc[data-stack]>.cc-frame{height:calc(var(--stack) + 4px);grid-template-rows:calc(var(--share) * (100% - var(--seam-y))) minmax(0, 1fr);row-gap:var(--seam-y)}.cc[data-stack] .cc-preview{min-height:0;overflow:clip}.cc[data-stack] .cc-code{clip-path:inset(-2px -2px 0);flex-direction:column;min-height:0;padding-top:0;display:flex}.cc[data-stack] .cc-body{flex-grow:1;min-height:0;margin-top:22px;overflow-y:auto}.cc[data-stack][data-tabs=hidden] .cc-body{margin-top:0}.cc[data-stack]>.cc-tab{clip-path:inset(-1px -7px calc(26px - var(--edge-y) - var(--seam-y)) -1px)}.cc-split{inset:auto 0;top:calc(var(--edge-y) + var(--seam-y) / 2 - 5px);width:auto;height:14px;translate:0 max(-8px, min(0px, (1 - var(--share)) * (var(--stack,100vh) - var(--seam-y)) - 8px));display:block}.cc-split:before{top:calc(var(--seam-y) / 2 + 4px);transform-origin:50% 1px;width:58.63px;height:9px;left:calc(50% - 29.315px);mask-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 3 58.63 9\'%3E%3Cpath d=\'M0 3V4A6 6 0 0 1 5.66 8A6 6 0 0 0 11.31 12H47.31A6 6 0 0 0 52.97 8A6 6 0 0 1 58.63 4V3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(var(--seam-y) / 2 + 5px);transform-origin:50% 0;width:40px;height:4px;left:calc(50% - 20px)}}.cc-preview{place-items:center;min-width:0;padding:48px 24px 24px;display:grid}.cc[data-tabs=hidden] .cc-preview{padding-top:24px}.cc[data-tabs=hidden] .cc-code{padding-top:0}.cc-problem{color:var(--cc-muted);font:14px/20px var(--cc-sans);text-align:center;margin:0}.cc-tab{--inset:0px;top:calc(var(--inset) * -1);left:calc(var(--inset) * -1);background:var(--ground);height:24px;color:var(--cc-muted);font:12px/16px var(--cc-sans);white-space:nowrap;pointer-events:none;border-bottom-right-radius:6px;align-items:center;padding:0 8px;display:flex;position:absolute}.cc-tab:before,.cc-tab:after{content:"";background:radial-gradient(circle at 100% 100%, #0000 6px, var(--ground) 6.5px);width:6px;height:6px;position:absolute}.cc-tab:before{top:var(--inset);left:100%}.cc-tab:after{top:100%;left:var(--inset)}.cc>.cc-tab{--ground:var(--cc-subtle)}.cc-code{--ground:var(--cc-surface);--tint:var(--cc-text);background:var(--cc-sunken);min-width:0;color:var(--cc-text);font:14px/24px var(--cc-mono);border-radius:6px;padding-top:22px;position:relative}.cc-code>.cc-tab{--inset:2px}.cc-body{display:flex}.cc-lines{color:var(--cc-line);text-align:right;white-space:pre;-webkit-user-select:none;user-select:none;flex-shrink:0;padding:16px 4px 16px 16px}.cc-scroll{scrollbar-width:thin;scrollbar-color:var(--cc-disabled) #0000;flex-grow:1;min-width:0;padding:16px 16px 16px 4px;overflow-x:auto}.cc .cc-scroll>code{all:unset;white-space:pre;tab-size:2;width:max-content;min-width:100%;display:block}.cc-tag{color:var(--cc-tag)}.cc-attribute{color:var(--cc-attribute)}.cc-string{--tint:var(--cc-string);color:var(--cc-string)}.cc-keyword{--tint:var(--cc-keyword);color:var(--cc-keyword)}.cc-box{all:unset;background:color-mix(in srgb, var(--tint) 14%, #0000);white-space:pre;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;border-radius:4px;margin:0 -2px;padding:0 4px;line-height:20px;display:inline-block}.cc-box:is(:hover,:focus-within,[aria-expanded=true]){background:color-mix(in srgb, var(--tint) 28%, #0000)}:is(.cc-box,.cc-action,.cc-menu>button):focus-visible{outline-offset:-2px;outline:2px solid}.cc-scrub{cursor:ew-resize;touch-action:pan-y}.cc-field{cursor:text;min-width:8px;display:inline-grid}.cc-field:after{content:attr(data-value);visibility:hidden;white-space:pre;grid-area:1/1}.cc-field>input{all:unset;grid-area:1/1;width:100%;min-width:0}.cc-menu{min-width:96px;font:14px/20px var(--cc-mono);border:0;margin:0;padding:2px;display:none;position:fixed;inset:auto}.cc-menu,.cc-code:after{background:var(--cc-subtle);color:var(--cc-secondary);border-radius:8px;box-shadow:0 8px 24px oklch(0% 0 0/.12)}.cc-menu:popover-open{gap:2px;display:grid}.cc-menu>button{all:unset;white-space:pre;cursor:pointer;border-radius:6px;align-items:center;gap:16px;height:32px;padding:0 8px;display:flex}.cc-menu>button:is(:hover,:focus){background:var(--cc-sunken);color:var(--cc-foreground)}.cc-menu>[aria-checked=true]:after{content:"\u2713";color:var(--cc-muted);margin-left:auto}.cc-code:is(:hover,:has(:focus-visible)){--copy:1}@media (hover:none){.cc-code{--copy:1}}.cc-changed{--reset:1}.cc-actions{--open:max(var(--copy), var(--reset));padding:0 calc(var(--open) * 4px) 0 0;pointer-events:auto;transition:padding var(--cc-ease);border-radius:0 0 0 6px;top:-2px;left:auto;right:-2px}.cc-actions:before,.cc-actions:after{background:radial-gradient(circle at 0 100%, #0000 6px, var(--ground) 6.5px);opacity:var(--open);transition:opacity var(--cc-ease);left:auto}.cc-actions:before{right:100%}.cc-actions:after{right:var(--inset)}.cc-slot{--shown:var(--copy);width:calc(var(--shown) * 24px);transition:width var(--cc-ease);justify-content:flex-end;display:flex;overflow:hidden}.cc-note,.cc-reset{--shown:var(--reset)}.cc-action{all:unset;width:20px;height:20px;color:var(--cc-muted);cursor:pointer;transform:translateX(calc((1 - var(--shown)) * 24px));transition:transform var(--cc-ease);border-radius:4px;flex-shrink:0;place-items:center;display:grid}.cc-action:hover{color:var(--cc-foreground)}.cc-action svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.cc-code:after{content:attr(data-note);font:12px/16px var(--cc-sans);white-space:nowrap;opacity:0;transition:opacity var(--cc-ease);pointer-events:none;padding:4px 8px;position:absolute;top:26px;right:4px}.cc-code:has(.cc-note :is(:hover,:focus)):after{opacity:1}@media (prefers-reduced-motion:reduce){.cc *{transition:none!important}}`,Hv=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),V=c(o(((e,t)=>{t.exports=Hv()}))(),1),Uv=Vv;function Wv(e,t){(0,d.useInsertionEffect)(()=>{if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.prepend(n)},[])}function Gv(e){let t=e.replace(/^\\s*\\n/,``).trimEnd().split(`\n`),n=Math.min(...t.filter(e=>e.trim()).map(e=>e.search(/\\S/)));return t.map(e=>e.slice(n)).join(`\n`)}var Kv=e=>e.kind===`boolean`||typeof e.value==`number`?`cc-box cc-keyword`:e.quote?`cc-box cc-string`:`cc-box`,qv=`M8 7.5h7.5v8H8zM12 4.5H4.5v8`,Jv=`M5 10.5l3 3 7-7`,Yv=`M5 8.5a5.5 5.5 0 1 1 .5 4.5M5 4.5v4h4`,Xv=`M16 10a6 6 0 1 1-12 0a6 6 0 0 1 12 0M10 9.5V13m0-6v.01`;function Zv({control:e,onChange:t,written:n}){let{min:r=-1/0,max:i=1/0,step:a}=e,o=e.value,s=(0,d.useRef)(null),c=i-r<1/0?Math.min(12,Math.max(2,240*a/(i-r))):6,l=()=>s.current=null,u=e=>{e=Math.min(i,Math.max(r,e)),e!==o&&t(e)};return(0,V.jsx)(`span`,{className:`${Kv(e)} cc-scrub`,role:`slider`,tabIndex:0,"aria-label":e.prop,"aria-valuenow":o,"aria-valuemin":r>-1/0?r:void 0,"aria-valuemax":i<1/0?i:void 0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),s.current={x:e.clientX,value:o}},onPointerMove:e=>{if(s.current){let t=Math.round((e.clientX-s.current.x)/c);u(s.current.value+t*a)}},onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{let t=e.shiftKey?a*10:a,n={ArrowUp:o+t,ArrowRight:o+t,ArrowDown:o-t,ArrowLeft:o-t,Home:r,End:i}[e.key];n!==void 0&&isFinite(n)&&(e.preventDefault(),u(n))},children:n})}function Qv({control:e,onChange:t,written:n}){return(0,V.jsx)(`button`,{type:`button`,className:Kv(e),"aria-label":e.prop,"aria-pressed":e.value,onClick:()=>t(!e.value),children:n})}function $v({control:e,onChange:t}){let n=`${e.value}`,{quote:r}=e;return(0,V.jsxs)(`label`,{className:Kv(e),children:[r,(0,V.jsx)(`span`,{className:`cc-field`,"data-value":n,children:(0,V.jsx)(`input`,{size:1,value:n,"aria-label":e.prop,spellCheck:!1,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.currentTarget.blur()}})}),r]})}function ey({control:e,onChange:t,written:n}){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!1),s=t=>{let n=typeof t==`string`?e.quote:``;return n+t+n},c=()=>[...r.current.children];return(0,d.useEffect)(()=>{let e=r.current,t=e=>o(e.newState===`open`),n=()=>e.matches(`:popover-open`)&&e.hidePopover();return e.addEventListener(`toggle`,t),addEventListener(`scroll`,n,!0),()=>{e.removeEventListener(`toggle`,t),removeEventListener(`scroll`,n,!0)}},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{ref:i,type:`button`,className:Kv(e),"aria-haspopup":`menu`,"aria-expanded":a,"aria-label":e.prop,onClick:e=>{let t=r.current,{left:n,bottom:i}=e.currentTarget.getBoundingClientRect();t.style.left=`${n}px`,t.style.top=`${i+4}px`,t.showPopover(),t.querySelector(`[aria-checked=true]`)?.focus()},children:n}),(0,V.jsx)(`div`,{ref:r,className:`cc-menu`,popover:`auto`,role:`menu`,onKeyDown:e=>{let t=c(),n=t.indexOf(document.activeElement),{key:r}=e,a=r.length===1&&[...t.slice(n+1),...t].find(e=>e.textContent.replace(/^\\W/,``).startsWith(r)),o=a?t.indexOf(a):{ArrowDown:n+1,ArrowUp:n-1,Home:0,End:-1}[r];r===`Escape`&&i.current.focus(),o!==void 0&&(e.preventDefault(),t.at(o%t.length).focus())},children:e.options.map(n=>(0,V.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n===e.value,onClick:()=>t(n),children:s(n)},`${n}`))})]})}function ty({source:e,tokens:t,controls:n,onChange:r}){let i=[],a=0,o=0,s=n=>{for(;a<n;){for(;o<t.length&&t[o].end<=a;)o++;let r=t[o];if(r&&r.start<=a){let t=Math.min(r.end,n);i.push((0,V.jsx)(`span`,{className:`cc-${r.ink}`,children:e.slice(a,t)},a)),a=t}else{let t=Math.min(r?.start??n,n);i.push(e.slice(a,t)),a=t}}};return n.forEach((t,n)=>{s(t.range.start);let o={control:t,written:e.slice(t.range.start,t.range.end),onChange:e=>r(t,e)},c={boolean:Qv,number:Zv,option:ey,text:$v}[t.kind];i.push((0,V.jsx)(c,{...o},`c${n}`)),a=t.range.end}),s(e.length),(0,V.jsxs)(`div`,{className:`cc-body`,children:[(0,V.jsx)(`div`,{className:`cc-lines`,"aria-hidden":!0,children:e.split(`\n`).map((e,t)=>t+1).join(`\n`)}),(0,V.jsx)(`div`,{className:`cc-scroll`,children:(0,V.jsx)(`code`,{children:i})})]})}function ny({slot:e,label:t,d:n,hidden:r,onClick:i}){return(0,V.jsx)(`span`,{className:`cc-slot${e}`,children:(0,V.jsx)(`button`,{type:`button`,className:`cc-action`,"aria-label":t,tabIndex:r?-1:0,onClick:i,children:(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":!0,children:(0,V.jsx)(`path`,{d:n})})})})}function ry({source:e,changed:t,note:n,onReset:r}){let[i,a]=(0,d.useState)(!1);return(0,V.jsxs)(`div`,{className:`cc-tab cc-actions${t?` cc-changed`:``}`,children:[n&&(0,V.jsx)(ny,{slot:` cc-note`,label:n,d:Xv,hidden:!t}),(0,V.jsx)(ny,{slot:` cc-reset`,label:`Reset code`,d:Yv,hidden:!t,onClick:r}),(0,V.jsx)(ny,{slot:``,label:i?`Copied`:`Copy code`,d:i?Jv:qv,onClick:()=>navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})})]})}var iy=(2*Math.PI/.35)**2,ay=4*Math.PI/.35;function oy(e,t,n,r){let i={min:n,closed:r===void 0?0:r*2-1,to:r??.5,home:.5,off:0,speed:0,track:1,show(){e.style.setProperty(t,`${Math.min(1,Math.max(0,i.to+i.off))}`)},jump(e){i.off=matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:i.off+i.to-e,i.to=e,o||=(a=performance.now(),requestAnimationFrame(s))},ease(e){let t=n-e;return t<=0?e:t>n/2?0:n-n/4*(1-Math.exp(-4*t/n))},stop:()=>cancelAnimationFrame(o)},a=0,o=0,s=e=>{let t=Math.min(.05,(e-a)/1e3);a=e;for(let e=0;e<t;e+=.001)i.speed-=(iy*i.off+ay*i.speed)*.001,i.off+=i.speed*.001;Math.abs(i.off)*i.track<.5?i.off=i.speed=o=0:o=requestAnimationFrame(s),i.show()};return i}function sy({start:e}){let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=t.current,r=n.parentElement,i=r.firstElementChild,a=i.firstElementChild,o=oy(r,`--split`,160,e),s=oy(r,`--share`,80),c=o,l,u=()=>c=r.clientWidth<640?s:o,d=e=>c===s?e.clientY:e.clientX,f=globalThis.ResizeObserver&&new ResizeObserver(()=>r.style.setProperty(`--rest`,`${a.offsetTop+a.offsetHeight}px`));f?.observe(a),n.onpointerdown=e=>{if(!e.button){if(e.preventDefault(),n.setPointerCapture(e.pointerId),u()===s){if(!(`stack`in r.dataset)){let e=i.clientHeight-4;s.to=s.home=a.offsetHeight/(e-2),s.show(),r.style.setProperty(`--stack`,`${e}px`),r.dataset.stack=``}s.track=i.clientHeight-6}else o.track=i.clientWidth-6;l=d(e)-c.to*c.track}},n.onpointermove=e=>{if(l===void 0)return;if(!(e.buttons&1))return p();let{track:t}=c,n=d(e)-l;if(c.closed){let e=c.closed<0?Math.min(n,0):Math.max(n-t,0);if(l+=e,n-=e,(c.closed<0?n:t-n)<c.min){c.to=n/t,c.show();return}c.closed=0}let r=c.ease(n),i=c.ease(t-n);c.closed=r?+!i:-1,c.closed?(c.jump(c.closed<0?0:1),l=d(e)-c.to*t):c.to=(r===n?t-i:r)/t,c.show()};let p=()=>{if(l===void 0)return;l=void 0;let{min:e,track:t}=c,n=c.to*t,r=Math.min(n,t-n);c.closed&&r<e/2?c.jump(c.closed<0?0:1):r<e&&(c.closed=0,c.jump((n<e?e:t-e)/t))};return n.onpointerup=n.onpointercancel=n.onlostpointercapture=p,n.ondblclick=()=>{u()===s&&!(`stack`in r.dataset)||(c.closed=0,c.jump(c.home))},()=>{o.stop(),s.stop(),f?.disconnect()}},[]),(0,V.jsx)(`div`,{ref:t,className:`cc-split`,"aria-hidden":!0})}function cy({className:e,theme:t,title:n=`Preview`,tabs:r=!0,collapsed:i,only:a,preview:o,tab:s,source:c,changed:l,note:u,onReset:d,...f}){let p=a||!i?void 0:+(i===`code`);return(0,V.jsxs)(`div`,{className:e?`cc ${e}`:`cc`,"data-theme":t,"data-tabs":r?void 0:`hidden`,"data-only":a,style:p===void 0?void 0:{"--split":p},children:[(0,V.jsxs)(`div`,{className:`cc-frame`,children:[a!==`code`&&(0,V.jsx)(`div`,{className:`cc-preview`,children:o}),a!==`preview`&&(0,V.jsxs)(`div`,{className:`cc-code`,"data-note":u,children:[r&&s,(0,V.jsx)(ry,{source:c,changed:l,note:u,onReset:d}),(0,V.jsx)(ty,{source:c,...f})]})]}),r&&a!==`code`&&(0,V.jsx)(`div`,{className:`cc-tab`,children:n}),!a&&(0,V.jsx)(sy,{start:p})]})}var ly=Symbol(),uy=e=>jv(e.split(/\\s*\\n\\s*/).filter(Boolean).join(` `));function dy(e,t){let[n,...r]=e;if(!Object.hasOwn(t,n))throw new Dv(`\\`${n}\\` is not in \\`scope\\`.`);let i=t[n];for(let e of r)i=i?.[e];if(i===void 0)throw new Dv(`\\`${e.join(`.`)}\\` is not in \\`scope\\`.`);return i}function fy(e,t){switch(e.type){case`element`:return my(e,t);case`name`:return dy(e.path,t);case`array`:return e.items.map(e=>fy(e,t));case`object`:return Object.fromEntries(e.entries.map(([e,n])=>[e,fy(n,t)]));case`null`:return null;case`undefined`:return;default:return e.value}}function py(e,t){return e.type===`text`?uy(e.raw)||null:fy(e,t)}function my(e,t){let n=e.name?/^[a-z][^.]*$/.test(e.name)?e.name:dy(e.name.split(`.`),t):d.Fragment,r={},i=t[ly];for(let a of e.attributes){let e=typeof n!=`string`&&i?.get(a.value?.start);if(e){let{name:t}=a;r[`on${t[0].toUpperCase()}${t.slice(1)}Change`]=e}a.spread?Object.assign(r,fy(a.value,t)):r[a.name]=!a.value||fy(a.value,t)}return(0,d.createElement)(n,r,...e.children.map(e=>py(e,t)))}var hy=Uv,gy=class extends d.Component{state={};static getDerivedStateFromError(e){return{problem:e instanceof Error?e.message:`${e}`}}static getDerivedStateFromProps({source:e},t){return t.source===e?null:{source:e,problem:void 0}}render(){let{problem:e}=this.state;return e?(0,V.jsx)(`p`,{className:`cc-problem`,children:e}):this.props.children}};function _y({code:e,file:t=`Code`,theme:n,note:r,className:i,scope:a,interactive:o,controls:s,onChange:c,children:l,...u}){Wv(`component-code`,hy);let f=(0,d.useMemo)(()=>{let t=Gv(e);try{return o?Lv(t):t}catch{return t}},[e,o]),[p,m]=(0,d.useState)({from:f,to:f});p.from!==f&&m({from:f,to:f});let h=p.from===f?p.to:f,g=(0,d.useMemo)(()=>Bv(h),[h]),_=(e,t)=>{let n=Iv(h,e,t);m({from:f,to:n}),c?.({prop:e.prop,value:t,code:n})},v=l,y,ee=[];if(a)try{let e=Nv(h);o&&(ee=Pv(e,s));let t={...a,[ly]:new Map(ee.map(e=>[e.range.start,t=>typeof t==typeof e.value&&_(e,t)]))};v=(0,d.createElement)(d.Fragment,null,...e.map(e=>my(e,t)))}catch(e){if(!(e instanceof Dv))throw e;y=e.message}return(0,V.jsx)(cy,{className:i,theme:n,...u,preview:y?(0,V.jsx)(`p`,{className:`cc-problem`,children:y}):(0,V.jsx)(gy,{source:h,children:v}),tab:(0,V.jsx)(`div`,{className:`cc-tab`,children:t}),source:h,changed:h!==f,note:r,onReset:()=>m({from:f,to:f}),tokens:g,controls:ee,onChange:_})}function vy(){let e=document.documentElement,t=document.currentScript.previousElementSibling,n=e=>parent.postMessage(e,`*`);addEventListener(`message`,e=>{e.source===parent&&(t.textContent=e.data.css)}),addEventListener(`error`,e=>n({problem:e.message})),addEventListener(`unhandledrejection`,e=>n({problem:`${e.reason?.message??e.reason}`})),new ResizeObserver(()=>n({height:e.getBoundingClientRect().height})).observe(e),addEventListener(`load`,()=>n({ready:!0}))}var yy=(e,t)=>e.replace(RegExp(`</${t}`,`gi`),`<\\\\/${t}`);function by(e,t,n,r){return`<!doctype html><html><head><meta charset="utf-8"><style>:root{${r}}body{margin:0}</style><style>${yy(t,`style`)}</style><script>(${vy})()<\\/script></head><body>${e}<script>${yy(n,`script`)}<\\/script></body></html>`}function xy(e,t){let n,r,i,a,o=``,s=e=>e?.contentWindow?.postMessage({css:o},`*`),c=({source:e,data:o})=>{let c=[n,r].find(t=>t&&t.contentWindow===e);if(!(!c||typeof o!=`object`||!o)&&(o.height!==void 0&&(c.style.height=`${Math.ceil(o.height)}px`),o.problem&&(c===n?t(o.problem):a??=o.problem),o.ready&&c===r)){n?.remove(),n=c,r=void 0,c.dataset.shown=``,s(c),t(a),a=void 0;let e=i;i=void 0,e?.()}};return addEventListener(`message`,c),{run(t,a,s){let c=()=>{r=document.createElement(`iframe`),r.setAttribute(`sandbox`,`allow-scripts`),r.title=`Preview`,n&&(r.style.height=n.style.height),r.srcdoc=by(t,o,a,s),e.append(r)};r?i=c:c()},css(e){o=e,s(n),s(r)},stop(){removeEventListener(`message`,c),n?.remove(),r?.remove()}}}var Sy=/^-?(?:\\d+\\.?\\d*|\\.\\d+)$/,Cy=e=>/\\.css$/i.test(e)?`css`:/\\.m?js$/i.test(e)?`js`:`html`;function wy(e,t,n,r,i,a=``){let o=Array.isArray(t);return{prop:e,kind:o?`option`:typeof n==`string`?`text`:typeof n,value:n,range:{start:r,end:i},quote:a,jsx:!1,step:typeof n==`number`?Tv(n):1,...o?{options:t}:t===!0?{}:t}}var Ty=e=>(t,n,r)=>{r&&e.push({ink:t,start:n,end:n+r})},Ey=/\\x3C!--[\\s\\S]*?(?:-->|$)|<[!/]?([A-Za-z][\\w:-]*)([^>]*)>?/g,Dy=/([^\\s"\'=<>/]+)(?:\\s*=\\s*("[^"]*"?|\'[^\']*\'?|[^\\s>]+))?/g;function Oy(e,t){let n=[],r=[],i=Ty(n),a=new RegExp(Ey),o;for(;o=a.exec(e);){let[n,s,c]=o;if(!s)continue;let l=o.index+n.indexOf(s);i(`tag`,l,s.length);let u=s.toLowerCase();for(let e of c.matchAll(Dy)){let[,n,a]=e,o=l+s.length+e.index;if(i(`attribute`,o,n.length),!a)continue;let c=o+e[0].length-a.length;i(`string`,c,a.length);let d=t[`${u}.${n}`]??t[n];if(!d)continue;let f=/^["\']/.test(a)?a[0]:``,p=f?a.slice(1,-1):a;r.push(wy(n,d,Sy.test(p)?+p:p,c,c+a.length,f))}if(n[1]!==`/`&&(u===`script`||u===`style`)){let t=e.indexOf(`</${u}`,a.lastIndex);a.lastIndex=t<0?e.length:t}}return{tokens:n,controls:r}}var ky=/(["\'])(?:\\\\.|(?!\\1)[^\\\\])*\\1?|#[\\da-f]{3,8}\\b|(?<![\\w-])-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?|!important/gi;function Ay(e,t){let n=[],r=[],i=Ty(n),a=0;for(;a<e.length;){let n=/\\s+|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/y;n.lastIndex=a;let o=n.exec(e)?.[0].length;if(o){a+=o;continue}let s=a,c=0;for(;s<e.length;){let t=e[s];if(t===`"`||t===`\'`){let n=e.indexOf(t,s+1);s=n<0?e.length:n+1;continue}if(t===`(`)c++;else if(t===`)`)c--;else if(c<=0&&/[{};]/.test(t))break;s++}let l=e.slice(a,s).trimEnd(),u=l.indexOf(`:`);if(l[0]===`@`)i(`keyword`,a,l.match(/^@[\\w-]*/)[0].length);else if(e[s]===`{`)i(`tag`,a,l.length);else if(u>0){let e=l.slice(0,u).trim();i(`attribute`,a,e.length);let n=l.slice(u+1).search(/\\S/),o=a+u+1+n,s=n<0?``:l.slice(u+1+n);for(let e of s.matchAll(ky))i(e[1]?`string`:`keyword`,o+e.index,e[0].length);let c=t[e],d=s.match(/^(-?(?:\\d+\\.?\\d*|\\.\\d+))([a-z]*|%)$/i);c&&s&&r.push(d&&(!Array.isArray(c)||!d[2])?wy(e,c,+d[1],o,o+d[1].length):wy(e,c,s,o,o+s.length))}a=s+1}return{tokens:n,controls:r}}var jy=/\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)|true|false|(["\'])(?:\\\\.|(?!\\3)[^\\\\\\n])*\\3)(?=[ \\t]*(?:[;,\\n]|$))/g;function My(e,t){let n=[];for(let r of e.matchAll(jy)){let[e,i,a,o=``]=r,s=t[i];if(!s)continue;let c=r.index+e.length-a.length,l=o?a.slice(1,-1).replace(/\\\\(.)/g,`$1`):Sy.test(a)?+a:a===`true`;n.push(wy(i,s,l,c,c+a.length,o))}return{tokens:Bv(e),controls:n}}var Ny={html:Oy,css:Ay,js:My};function Py(e,t,n){let r=typeof n==`number`?Ev(n,t.step):`${n}`;if(e===`css`)return r.replace(/[;{}<]/g,``);let{quote:i}=t;if(e===`html`){let e=r.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return i?i+e.replaceAll(i,i===`"`?`"`:`'`)+i:e}if(typeof n!=`string`)return r;let a=i||`\'`;return a+r.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(a,`\\\\${a}`).replaceAll(`\n`,`\\\\n`)+a}function Fy(e,t,n,r){let{start:i,end:a}=n.range;return t.slice(0,i)+Py(e,n,r)+t.slice(a)}var Iy=Uv+`.cc .cc-files{pointer-events:auto;padding:0 2px}.cc-files>button{all:unset;cursor:pointer;border-radius:4px;align-items:center;height:20px;padding:0 6px;display:flex}.cc-files>:hover{color:var(--cc-secondary)}.cc-files>[aria-selected=true]{background:var(--cc-sunken);color:var(--cc-foreground)}.cc-files>:focus-visible{outline-offset:-2px;outline:2px solid}.cc-run:not([hidden]){width:100%;display:grid}.cc-run>iframe{opacity:0;pointer-events:none;border:0;grid-area:1/1;width:100%}.cc-run>[data-shown]{opacity:1;pointer-events:auto}`,Ly=(e,t)=>Object.keys(e).filter(e=>Cy(e)===t).map(t=>e[t]).join(`\n`);function Ry({html:e,css:t,js:n,theme:r}){let i=(0,d.useRef)(null),a=(0,d.useRef)(null),[o,s]=(0,d.useState)();return(0,d.useEffect)(()=>{let e=xy(i.current,s);return a.current=e,e.stop},[]),(0,d.useEffect)(()=>a.current.css(t),[t]),(0,d.useEffect)(()=>{let t=matchMedia(`(prefers-color-scheme: dark)`),r=()=>{let{colorScheme:r,color:o,fontFamily:s}=getComputedStyle(i.current),c=r.includes(`dark`)&&(!r.includes(`light`)||t.matches);a.current.run(e,n,`color-scheme:${c?`dark`:`light`};color:${o};font-family:${s}`)};return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e,n,r]),(0,V.jsxs)(V.Fragment,{children:[o&&(0,V.jsx)(`p`,{className:`cc-problem`,children:o}),(0,V.jsx)(`div`,{ref:i,className:`cc-run`,hidden:!!o})]})}function zy({files:e,controls:t={},onChange:n,theme:r,note:i,className:a,...o}){Wv(`component-code-html`,Iy);let s=(0,d.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Gv(t)])),[JSON.stringify(e)]),c=Object.keys(s),[l,u]=(0,d.useState)(c[0]),f=c.includes(l)?l:c[0],[p,m]=(0,d.useState)({from:s,to:s});p.from!==s&&m({from:s,to:s});let h=p.from===s?p.to:s,g=Cy(f),{tokens:_,controls:v}=Ny[g](h[f],t);return(0,V.jsx)(cy,{className:a,theme:r,...o,preview:(0,V.jsx)(Ry,{html:Ly(h,`html`),css:Ly(h,`css`),js:Ly(h,`js`),theme:r}),tab:(0,V.jsx)(`div`,{className:`cc-tab cc-files`,role:`tablist`,children:c.map(e=>(0,V.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===f,onClick:()=>u(e),children:e},e))}),source:h[f],changed:c.some(e=>h[e]!==s[e]),note:i,onReset:()=>m({from:s,to:s}),tokens:_,controls:v,onChange:(e,t)=>{let r=Fy(g,h[f],e,t);m({from:s,to:{...h,[f]:r}}),n?.({file:f,prop:e.prop,value:t,code:r})}})}var By=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function te(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,ne||(ne=!0,ce());else{var t=n(l);t!==null&&de(te,t.startTime-e)}}var ne=!1,re=-1,ie=5,ae=-1;function oe(){return g?!0:!(e.unstable_now()-ae<ie)}function se(){if(g=!1,ne){var t=e.unstable_now();ae=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(re),re=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&oe());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&de(te,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ce():ne=!1}}}var ce;if(typeof y==`function`)ce=function(){y(se)};else if(typeof MessageChannel<`u`){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=se,ce=function(){ue.postMessage(null)}}else ce=function(){_(se,0)};function de(t,n){re=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(re),re=-1):h=!0,de(te,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ne||(ne=!0,ce()))),r},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Vy=o(((e,t)=>{t.exports=By()})),Hy=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),Uy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Hy()})),Wy=o((e=>{var t=Vy(),n=u(),r=Uy();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){e.memoizedState!==null&&be(we,e);var t=xe.current,n=nf(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function x(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),up._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);default:return``}}function S(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function C(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=me.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function _t(e,t){var n=me.p;try{return me.p=e,t()}finally{me.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[yt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\\n"\\\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&sn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));Qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(ju(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=p({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=p({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(p({},Bn,{dataTransfer:0})),Un=Mn(p({},Fn,{relatedTarget:0})),Wn=Mn(p({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(p({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(p({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(p({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(p({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(p({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(p({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(p({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(p({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=zd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){jd(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=zd(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=xi(31,n,t,a),e.elementType=se,e.lanes=o,e;case _:return Ei(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=xi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case re:return e=xi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=xi(19,n,t,a),e.elementType=ie,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:S(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:S(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ze(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else t===27?(t=qi,ff(e.type)?(e=Cf,Cf=null,qi=e):qi=t):qi=Ki?Sf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ve(null),oa=null,sa=null;function ca(e,t,n){be(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ye(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=Cd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=b.S;b.S=function(e,t){du=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=ve(null);function Na(){var e=Ma.current;return e===null?ql.pooledCache:e}function Pa(e,t){t===null?be(Ma,Ma.current):be(Ma,t.pool)}function Fa(){var e=Na();return e===null?null:{parent:xa._currentValue,pool:e}}var Ia=Error(i(460)),La=Error(i(474)),Ra=Error(i(542)),za={then:function(){}};function Ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e}throw Ua=t,Ia}}function Ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ua=e,Ia):e}}var Ua=null;function Wa(){if(Ua===null)throw Error(i(459));var e=Ua;return Ua=null,e}function Ga(e){if(e===Ia||e===Ra)throw Error(i(483))}var Ka=null,qa=0;function Ja(e){var t=qa;return qa+=1,Ka===null&&(Ka=[]),Va(Ka,e,t)}function Ya(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Xa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Ha(i)===t.type)?(t=a(t,n.props),Ya(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ya(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ya(n,t),n.return=e,n;case g:return t=ki(t,e.mode,n),t.return=e,t;case oe:return t=Ha(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ja(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Xa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Ha(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ja(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Xa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ha(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ja(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Xa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function ee(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Ha(o),ee(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return ee(e,r,Ja(o),c);if(o.$$typeof===te)return ee(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=ee(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(L&f)===f:(r&f)===f){f!==0&&f===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:eo=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uo(n[e],t)}var po=ve(null),mo=ve(0);function ho(e,t){e=eu,be(mo,e),be(po,t),eu=e|t.baseLanes}function go(){be(mo,eu),be(po,po.current)}function _o(){eu=mo.current,ye(po),ye(mo)}var vo=ve(null),yo=null;function bo(e){var t=e.alternate;be(To,To.current&1),be(vo,e),yo===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(yo=e)}function xo(e){be(To,To.current),be(vo,e),yo===null&&(yo=e)}function So(e){e.tag===22?(be(To,To.current),be(vo,e),yo===null&&(yo=e)):Co(e)}function Co(){be(To,To.current),be(vo,vo.current)}function wo(e){ye(vo),yo===e&&(yo=null),ye(To)}var To=ve(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=0,w=null,Oo=null,ko=null,Ao=!1,jo=!1,Mo=!1,No=0,Po=0,Fo=null,Io=0;function Lo(){throw Error(i(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,r,i,a){return Do=a,w=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?tc:nc,Mo=!1,a=n(r,i),Mo=!1,jo&&(a=Vo(t,n,r,i)),Bo(e),a}function Bo(e){b.H=T;var t=Oo!==null&&Oo.next!==null;if(Do=0,ko=Oo=w=null,Ao=!1,Po=0,Fo=null,t)throw Error(i(300));e===null||yc||(e=e.dependencies,e!==null&&pa(e)&&(yc=!0))}function Vo(e,t,n,r){w=e;var a=0;do{if(jo&&(Fo=null),Po=0,jo=!1,25<=a)throw Error(i(301));if(a+=1,ko=Oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}b.H=rc,o=t(n,r)}while(jo);return o}function Ho(){var e=b.H,t=e.useState()[0];return t=typeof t.then==`function`?Yo(t):t,e=e.useState()[0],(Oo===null?null:Oo.memoizedState)!==e&&(w.flags|=1024),t}function Uo(){var e=No!==0;return No=0,e}function Wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Go(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Do=0,ko=Oo=w=null,jo=!1,Po=No=0,Fo=null}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ko===null?w.memoizedState=ko=e:ko=ko.next=e,ko}function qo(){if(Oo===null){var e=w.alternate;e=e===null?null:e.memoizedState}else e=Oo.next;var t=ko===null?w.memoizedState:ko.next;if(t!==null)ko=t,Oo=e;else{if(e===null)throw w.alternate===null?Error(i(467)):Error(i(310));Oo=e,e={memoizedState:Oo.memoizedState,baseState:Oo.baseState,baseQueue:Oo.baseQueue,queue:Oo.queue,next:null},ko===null?w.memoizedState=ko=e:ko=ko.next=e}return ko}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(e){var t=Po;return Po+=1,Fo===null&&(Fo=[]),e=Va(Fo,e,t),t=w,(ko===null?t.memoizedState:ko.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?tc:nc),e}function Xo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Yo(e);if(e.$$typeof===te)return ha(e)}throw Error(i(438,String(e)))}function Zo(e){var t=null,n=w.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=w.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Jo(),w.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Qo(e,t){return typeof t==`function`?t(e):t}function $o(e){return es(qo(),Oo,e)}function es(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Do&f)===f:(L&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((Do&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,w.lanes|=p,nu|=p;f=u.action,Mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,w.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(yc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=qo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(yc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ns(e,t,n){var r=w,a=qo(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Oo||a).memoizedState,n);if(s&&(a.memoizedState=n,yc=!0),a=a.queue,Ds(as.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ko!==null&&ko.memoizedState.tag&1){if(r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||Do&127||rs(r,t,n)}return n}function rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=w.updateQueue,t===null?(t=Jo(),w.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function is(e,t,n,r){t.value=n,t.getSnapshot=r,os(t)&&ss(e)}function as(e,t,n){return n(function(){os(t)&&ss(e)})}function os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ss(e){var t=gi(e,2);t!==null&&Eu(t,e,2)}function cs(e){var t=Ko();if(typeof e==`function`){var n=e;if(e=n(),Mo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function ls(e,t,n,r){return e.baseState=n,es(e,Oo,typeof r==`function`?r:Qo)}function us(e,t,n,r,a){if(Qs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};b.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=b.T,o={};b.T=o;try{var s=n(i,r),c=b.S;c!==null&&c(o,s),fs(e,t,s)}catch(n){ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),b.T=a}}else try{a=n(i,r),fs(e,t,a)}catch(n){ms(e,t,n)}}function fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ps(e,t,n)},function(n){return ms(e,t,n)}):ps(e,t,n)}function ps(e,t,n){t.status=`fulfilled`,t.value=n,hs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ds(e,n)))}function ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,hs(t),t=t.next;while(t!==r)}e.action=null}function hs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gs(e,t){return t}function _s(e,t){if(Ji){var n=ql.formState;if(n!==null){a:{var r=w;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:t},n.queue=r,n=Ys.bind(null,w,r),r.dispatch=n,r=cs(!1),a=Zs.bind(null,w,!1,r.queue),r=Ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=us.bind(null,w,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function vs(e){return ys(qo(),Oo,e)}function ys(e,t,n){if(t=es(e,t,gs)[0],e=$o(Qo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Yo(t)}catch(e){throw e===Ia?Ra:e}else r=t;t=qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(w.flags|=2048,Ss(9,{destroy:void 0},bs.bind(null,i,n),null)),[r,a,e]}function bs(e,t){e.action=t}function xs(e){var t=qo(),n=Oo;if(n!==null)return ys(t,n,e);qo(),t=t.memoizedState,n=qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=w.updateQueue,t===null&&(t=Jo(),w.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Cs(){return qo().memoizedState}function ws(e,t,n,r){var i=Ko();w.flags|=e,i.memoizedState=Ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ts(e,t,n,r){var i=qo();r=r===void 0?null:r;var a=i.memoizedState.inst;Oo!==null&&r!==null&&Ro(r,Oo.memoizedState.deps)?i.memoizedState=Ss(t,a,n,r):(w.flags|=e,i.memoizedState=Ss(1|t,a,n,r))}function Es(e,t){ws(8390656,8,e,t)}function Ds(e,t){Ts(2048,8,e,t)}function Os(e){w.flags|=4;var t=w.updateQueue;if(t===null)t=Jo(),w.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ks(e){var t=qo().memoizedState;return Os({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function As(e,t){return Ts(4,2,e,t)}function js(e,t){return Ts(4,4,e,t)}function Ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ns(e,t,n){n=n==null?null:n.concat([e]),Ts(4,4,Ms.bind(null,t,e),n)}function Ps(){}function Fs(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Is(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ro(t,r[1]))return r[0];if(r=e(),Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Ls(e,t,n){return n===void 0||Do&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),w.lanes|=e,nu|=e,n)}function Rs(e,t,n,r){return Fr(n,t)?n:po.current===null?!(Do&42)||Do&1073741824&&!(L&261930)?(yc=!0,e.memoizedState=n):(e=Tu(),w.lanes|=e,nu|=e,t):(e=Ls(e,n,r),Fr(e,t)||(yc=!0),e)}function zs(e,t,n,r,i){var a=me.p;me.p=a!==0&&8>a?a:8;var o=b.T,s={};b.T=s,Zs(e,!1,t,n);try{var c=i(),l=b.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Xs(e,t,Aa(c,r),wu(e)):Xs(e,t,r,wu(e))}catch(n){Xs(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{me.p=a,o!==null&&s.types!==null&&(o.types=s.types),b.T=o}}function Bs(){}function Vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Hs(e).queue;zs(e,a,t,he,n===null?Bs:function(){return Us(e),n(r)})}function Hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Us(e){var t=Hs(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},wu())}function Ws(){return ha(up)}function Gs(){return qo().memoizedState}function Ks(){return qo().memoizedState}function qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=ro(n);var r=io(t,e,n);r!==null&&(Eu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Js(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e)?$s(t,n):(n=hi(e,t,n,r),n!==null&&(Eu(n,e,r),ec(n,t,r)))}function Ys(e,t,n){Xs(e,t,n,wu())}function Xs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))$s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),ql===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Eu(n,e,r),ec(n,t,r),!0}return!1}function Zs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Qs(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Eu(t,e,2)}function Qs(e){var t=e.alternate;return e===w||t!==null&&t===w}function $s(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ec(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var T={readContext:ha,use:Xo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};T.useEffectEvent=Lo;var tc={readContext:ha,use:Xo,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ws(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Ko();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ko();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Js.bind(null,w,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:function(e){e=cs(e);var t=e.queue,n=Ys.bind(null,w,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){return Ls(Ko(),e,t)},useTransition:function(){var e=cs(!1);return e=zs.bind(null,w,e.queue,!0,!1),Ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=w,a=Ko();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));L&127||rs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Es(as.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,o,n,t),null),n},useId:function(){var e=Ko(),t=ql.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Io++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:_s,useActionState:_s,useOptimistic:function(e){var t=Ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,w,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return Ko().memoizedState=qs.bind(null,w)},useEffectEvent:function(e){var t=Ko(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:$o,useRef:Cs,useState:function(){return $o(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){return Rs(qo(),Oo.memoizedState,e,t)},useTransition:function(){var e=$o(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:vs,useActionState:vs,useOptimistic:function(e,t){return ls(qo(),Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};nc.useEffectEvent=ks;var rc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:ts,useRef:Cs,useState:function(){return ts(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=qo();return Oo===null?Ls(n,e,t):Rs(n,Oo.memoizedState,e,t)},useTransition:function(){var e=ts(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:xs,useActionState:xs,useOptimistic:function(e,t){var n=qo();return Oo===null?(n.baseState=e,[e,n.queue.dispatch]):ls(n,Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};rc.useEffectEvent=ks;function ic(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=ro(n);r.tag=2,t!=null&&(r.callback=t),t=io(e,r,n),t!==null&&(Eu(t,e,n),ao(t,e,n))}};function oc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function cc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function lc(e){li(e)}function uc(e){console.error(e)}function dc(e){li(e)}function fc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function mc(e,t,n){return n=ro(n),n.tag=3,n.payload={element:null},n.callback=function(){fc(e,t)},n}function hc(e){return e=ro(e),e.tag=3,e}function gc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){pc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function _c(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=vo.current,n!==null){switch(n.tag){case 31:case 13:return yo===null?Ru():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ji)return t=vo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=mc(e.stateNode,r,a),oo(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=mc(n.stateNode,r,e),oo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=hc(a),gc(a,e,n,r),oo(n,a),!1}n=n.return}while(n!==null);return!1}var vc=Error(i(461)),yc=!1;function bc(e,t,n,r){t.child=e===null?$a(t,null,n,r):Qa(t,e.child,n,r)}function xc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=zo(e,t,n,o,a,i),s=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,bc(e,t,r,i),t.child)}function Sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Cc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!A(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Vc(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(yc=!1,t.pendingProps=r=a,A(e,i))e.flags&131072&&(yc=!0);else return t.lanes=e.lanes,Vc(e,t,i)}return Ac(e,t,n,r,i)}function wc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pa(t,a===null?null:a.cachePool),a===null?go():ho(t,a),So(t);else return r=t.lanes=536870912,Ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Pa(t,null),go(),Co(t)):(Pa(t,a.cachePool),ho(t,a),Co(t),t.memoizedState=null);return bc(e,t,i,n),t.child}function Tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ec(e,t,n,r,i){var a=Na();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Pa(t,null),go(),So(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Dc(e,t){return t=O({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function E(e,t,n){return Qa(t,e.child,null,n),e=Dc(t,t.pendingProps),e.flags|=2,wo(t),t.memoizedState=null,e}function Oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Dc(t,r),t.lanes=536870912,Tc(null,e);if(xo(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(xo(t),a)if(t.flags&256)t.flags&=-257,t=E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(yc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,yc||a){if(r=ql,r!==null&&(s=mt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Eu(r,e,s),vc;Ru(),t=E(e,t,n)}else e=o.treeContext,qi=Sf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Dc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ac(e,t,n,r,i){return ma(t),n=zo(e,t,n,r,void 0,i),r=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,i),t.child)}function D(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Vo(t,r,n,i),Bo(e),r=Uo(),e!==null&&!yc?(Wo(e,t,a),Vc(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,a),t.child)}function jc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ac,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},to(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(ic(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&ac.enqueueReplaceState(a,a.state,null),lo(t,r,a,i),co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&sc(t,a,r,o),eo=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),co(),l=t.memoizedState,s||f!==l||eo?(typeof d==`function`&&(ic(t,n,d,r),l=t.memoizedState),(c=eo||oc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,no(e,t),o=t.memoizedProps,u=cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&sc(t,a,r,c),eo=!1,f=t.memoizedState,a.state=f,lo(t,r,a,i),co();var p=t.memoizedState;o!==d||f!==p||eo||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(ic(t,n,s,r),p=t.memoizedState),(u=eo||oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,kc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Qa(t,e.child,null,i),t.child=Qa(t,null,n,i)):bc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Vc(e,t,i),e}function Mc(e,t,n,r){return na(),t.flags|=256,bc(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fa()}}function Fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ic(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(To.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(a?bo(t):Co(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Co(t),a=t.mode,c=O({mode:`hidden`,children:c},a),r=Ei(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(null,r)):(bo(t),Lc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(bo(t),t.flags&=-257,t=Rc(e,t,n)):t.memoizedState===null?(Co(t),c=r.fallback,a=t.mode,r=O({mode:`visible`,children:r.children},a),c=Ei(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Qa(t,e.child,null,n),r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,t=Tc(null,r)):(Co(t),t.child=e.child,t.flags|=128,t=null);else if(bo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Rc(e,t,n)}else if(yc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,yc||s){if(s=ql,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Eu(s,e,r),vc;yf(c)||Ru(),t=Rc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=Sf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Lc(t,r.children),t.flags|=4096);return t}return a?(Co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,a,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,Tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Pc(n):(a=c.cachePool,a===null?a=Fa():(l=xa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(e.child,r)):(bo(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=O({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function O(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Rc(e,t,n){return Qa(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function k(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=To.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,be(To,o),bc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zc(e,n,t);else if(e.tag===19)zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bc(t,!0,n,null,a,r);break;case`together`:Bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function A(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function j(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(bo(t),e=Vc(e,t,n),e===null?null:e.sibling):Ic(e,t,n):(bo(t),t.flags|=128,null);bo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return k(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(To,To.current),r)break;return null;case 22:return t.lanes=0,wc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Vc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yc=!0;else{if(!A(e,n)&&!(t.flags&128))return yc=!1,j(e,t,n);yc=!!(e.flags&131072)}else yc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ha(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=cc(e,r),t.tag=1,t=jc(null,t,e,r,n)):(t.tag=0,t=Ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=xc(null,t,e,r,n);break a}else if(a===ae){t.tag=14,t=Sc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=cc(r,t.pendingProps),jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,no(e,t),lo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),co(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Mc(e,t,r,n);break a}else if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=Sf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===a){t=Vc(e,t,n);break a}bc(e,t,r,n)}t=t.child}return t;case 26:return kc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=ef(Ce.current).createElement(n),r[yt]=t,r[bt]=e,Jd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=Ef(t.type,t.pendingProps,Ce.current),Ki=t,Xi=!0,a=qi,ff(t.type)?(Cf=a,qi=Sf(r.firstChild)):qi=a),bc(e,t,t.pendingProps.children,n),kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=gf(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=Sf(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=zo(e,t,Ho,null,null,n),up._currentValue=a),kc(e,t),bc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=_f(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Ic(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):bc(e,t,r,n),t.child;case 11:return xc(e,t,t.type,t.pendingProps,n);case 7:return bc(e,t,t.pendingProps,n),t.child;case 8:return bc(e,t,t.pendingProps.children,n),t.child;case 12:return bc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),bc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,bc(e,t,r,n),t.child;case 14:return Sc(e,t,t.type,t.pendingProps,n);case 15:return Cc(e,t,t.type,t.pendingProps,n);case 19:return k(e,t,n);case 31:return Oc(e,t,n);case 22:return wc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Na(),a===null&&(a=ql,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},to(t),ca(t,xa,a)):((e.lanes&n)!==0&&(no(e,t),lo(t,null,null,n),co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),bc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function M(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Ua=za,La}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!R(t))if(Fu())e.flags|=8192;else throw Ua=za,La}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ou|=t)}function Kc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?M(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),qc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(M(t),o===null?(qc(t),Uc(t,a,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(M(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&M(t),qc(t),Uc(t,a,e,r,n)),null;case 27:if(x(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}e=xe.current,ta(t)?$i(t,e):(e=Ef(a,r,n),t.stateNode=e,M(t))}return qc(t),null;case 5:if(x(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}if(o=xe.current,ta(t))$i(t,o);else{var s=ef(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&M(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Qi(t,!0)}else e=ef(e).createTextNode(r),e[yt]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return Ee(),e===null&&Fd(t.stateNode.containerInfo),qc(t),null;case 10:return la(t.type),qc(t),null;case 19:if(ye(To),r=t.memoizedState,r===null)return qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Kc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return be(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>fu&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return qc(t),null}else 2*ze()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,be(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return x(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(To),null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&ye(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function P(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:x(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:ye(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&ye(Ma);break;case 24:la(xa)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function F(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function I(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[bt]=t}catch(t){nd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[yt]=e,t[bt]=n}catch(t){nd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Qd=yp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},yp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=cc(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&Yc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Dl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{fo(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Qc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:sl||I(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||I(n,t);var r=ml,i=hl;ff(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Df(n.stateNode),ml=r,hl=i;break;case 5:sl||I(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):pf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:F(2,n,t),sl||F(4,n,t),gl(e,t,n);break;case 1:sl||(I(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){nd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){nd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(F(3,e,e.return),Yc(3,e),F(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else np(a,e.type,e.stateNode);else e.stateNode=Xf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(a,e.type,e.stateNode):Xf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),e.flags&32){a=e.stateNode;try{an(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(ep=null,a=Cl,Cl=Af(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){nd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=Af(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:F(4,t,t.return),Ol(t);break;case 1:I(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),Ol(t);break;case 27:Df(t.stateNode);case 26:case 5:I(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),Yc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)uo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Qc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Qc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&z(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=Af(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&F(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:F(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:F(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,L=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Kl&2&&L!==0?L&-L:b.T===null?gt():Cd()}function Tu(){if(au===0)if(!(L&536870912)||Ji){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),au=e}else au=536870912;return e=vo.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===ql&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,L,au,!1)),ut(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(ru|=n),tu===4&&Au(e,L,au,!1)),hd(e))}function Du(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-ze(),10<a)){if(Au(r,t,au,!Zl),at(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Rl(t,a,d);var m=(a&62914560)===a?uu-ze():(a&4194048)===a?du-ze():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function ju(){return Kl&6?!0:(gd(0,!1),!1)}function Mu(){if(Jl!==null){if(Yl===0)var e=Jl.return;else e=Jl,sa=oa=null,Go(e),Ka=null,qa=0,e=Jl;for(;e!==null;)P(e.alternate,e),e=e.return;Jl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),ql=e,Jl=n=Ci(e.current,null),L=t,Yl=0,Xl=null,Zl=!1,Ql=ot(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,pi(),n}function Pu(e,t){w=null,b.H=T,t===Ia||t===Ra?(t=Wa(),Yl=3):t===La?(t=Wa(),Yl=4):Yl=t===vc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,Jl===null&&(tu=1,fc(e,ji(t,e.current)))}function Fu(){var e=vo.current;return e===null?!0:(L&4194048)===L?yo===null:(L&62914560)===L||L&536870912?e===yo:!1}function Iu(){var e=b.H;return b.H=T,e===null?T:e}function Lu(){var e=b.A;return b.A=Wl,e}function Ru(){tu=4,Zl||(L&4194048)!==L&&vo.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||ql===null||Au(ql,L,au,!1)}function zu(e,t,n){var r=Kl;Kl|=2;var i=Iu(),a=Lu();(ql!==e||L!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&Jl!==null){var s=Jl,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:vo.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Gu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Gu(e,s,c,l)}}Bu(),o=tu;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Kl=r,b.H=i,b.A=a,Jl===null&&(ql=null,L=0,pi()),o}function Bu(){for(;Jl!==null;)Uu(Jl)}function Vu(e,t){var n=Kl;Kl|=2;var r=Iu(),a=Lu();ql!==e||L!==t?(pu=null,fu=ze()+500,Nu(e,t)):Ql=ot(e,t);a:do try{if(Yl!==0&&Jl!==null){t=Jl;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Gu(e,t,o,1);break;case 2:case 9:if(Ba(o)){Yl=0,Xl=null,Wu(t);break}t=function(){Yl!==2&&Yl!==9||ql!==e||(Yl=7),hd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ba(o)?(Yl=0,Xl=null,Wu(t)):(Yl=0,Xl=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?R(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,Ku(u))}break b}}Yl=0,Xl=null,Gu(e,t,o,5);break;case 6:Yl=0,Xl=null,Gu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return sa=oa=null,b.H=r,b.A=a,Kl=n,Jl===null?(ql=null,L=0,pi(),tu):0}function Hu(){for(;Jl!==null&&!Le();)Uu(Jl)}function Uu(e){var t=Hc(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=D(n,t,t.pendingProps,t.type,void 0,L);break;case 11:t=D(n,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:Go(t);default:P(n,t),t=Jl=wi(t,eu),t=Hc(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Gu(e,t,n,r){sa=oa=null,Go(t),Ka=null,qa=0;var i=t.return;try{if(_c(e,i,t,n,L)){tu=1,fc(e,ji(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;tu=1,fc(e,ji(n,e.current)),Jl=null;return}t.flags&32768?(Ji||r===1?e=!0:Ql||L&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=vo.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,Zl);return}e=t.return;var n=N(t.alternate,t,eu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);tu===0&&(tu=5)}function qu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);tu=6,Jl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(hu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=fi,dt(e,n,o,s,c,l),e===ql&&(Jl=ql=null,L=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ue,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=b.T,b.T=null,a=me.p,me.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,me.p=a,b.T=r}}hu=1,Yu(),Xu(),Zu()}}function Yu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=$d,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var ee=d[s];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}yp=!!Qd,$d=Qd=null}finally{Kl=i,me.p=r,b.T=n}}e.current=t,hu=2}}function Xu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,me.p=r,b.T=n}}hu=3}}function Zu(){if(hu===4||hu===3){hu=0,Re();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),C(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=b.T,i=me.p,me.p=2,b.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{b.T=t,me.p=i}}vu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=C(vu),r=b.T,a=me.p;try{me.p=32>n?32:n,b.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,gd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{me.p=a,b.T=r,Qu(e,t)}}function td(e,t,n){t=ji(n,t),t=mc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=ji(n,e),n=hc(2),r=io(t,n,2),r!==null&&(gc(n,r,t,e),ut(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(L&n)===n&&(tu===4||tu===3&&(L&62914560)===L&&300>ze()-uu?!(Kl&2)&&Nu(e,0):iu|=n,ou===L&&(ou=0)),hd(e)}function ad(e,t){t===0&&(t=ct()),e=gi(e,t),e!==null&&(ut(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Fe(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=L,a=at(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=ze(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}hu!==0&&hu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=L,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),C(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=bd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=L;return r=at(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,ze()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){Kl&6?Fe(Ve,_d):vd()})}function Cd(){if(md===0){var e=Ea;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<si.length;Dd++){var Od=si[Dd];ci(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:At(l),h=u==null?c:At(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Cr;else if(_r(c))if(wr)v=Nr;else{v=jr;var y=Ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&en(c,`number`,c.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var ee;if(ar)b:{switch(e){case`compositionstart`:var te=`onCompositionStart`;break b;case`compositionend`:te=`onCompositionEnd`;break b;case`compositionupdate`:te=`onCompositionUpdate`;break b}te=void 0}else pr?dr(e,n)&&(te=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(te=`onCompositionStart`);te&&(cr&&n.locale!==`ko`&&(pr||te!==`onCompositionStart`?te===`onCompositionEnd`&&pr&&(ee=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=zd(r,te),0<y.length&&(te=new Kn(te,e,null,n,i),s.push({event:te,listeners:y}),ee?te.data=ee:(ee=fr(n),ee!==null&&(te.data=ee)))),(ee=sr?mr(e,n):hr(e,n))&&(te=zd(r,`onBeforeInput`),0<te.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:te}),y.data=ee)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=xn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\\r\\n?/g,Ud=/\\u0000|\\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`\n`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Kd(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Md(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Kd(e,t,s,c,n,null)}rn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);Gp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=me.d;me.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=ju();return e||t}function Nf(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Us(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=jt(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Mt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var a=(a=Ce.current)?Af(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=jt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=jt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wf(e){return`href="`+Zt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Zt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Jd(r,`style`,a),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wf(n.href);var o=e.querySelector(Gf(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Kf(n),(a=Of.get(a))&&Qf(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(a=e.querySelector(Yf(o)))?(t.instance=a,Mt(a),a):(r=n,(a=Of.get(o))&&(r=p({},n),$f(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function R(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function z(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:te,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},to(a),e}function pp(e){return e?(e=yi,e):yi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=ro(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=io(e,r,t),n!==null&&(Eu(n,e,t),ao(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=ht(t);var n=gi(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=2,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function xp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=8,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Ld(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}hd(a),!(Kl&6)&&(fu=ze()+500,gd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Eu(s,a,2),ju(),gp(a,2)}if(a=Cp(r),a===null&&Ld(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Cp(e){return e=hn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function B(e){this._internalRoot=e}qp.prototype.render=B.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=B.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ju(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:b,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Je=Xp.inject(Yp),Ye=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=lc,s=uc,c=dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[xt]=t.current,Fd(e),new B(t)}})),Gy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Wy()}))(),Ky=`0.5.0`,qy=A({source:T().describe("The component\'s module in TSX. It may import only from \'react\'. Its exports, the default one by its function\'s name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:T().describe(`How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control.`),file:T().optional().describe("The file named in the code\'s tab, such as `Card.tsx`."),controls:N(T(),M([F(!1),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),Jy=A({files:N(T(),T()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page\'s body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:N(T(),M([F(!0),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")}),Yy={tsx:`tsx`,jsx:`jsx`,ts:`ts`,js:`js`,html:`html`,css:`css`},Xy=(e,t)=>`\\`${e}\\`\\n\\n\\`\\`\\`${Yy[e.split(`.`).pop()??``]??``}\\n${t}\\n\\`\\`\\``;function Zy({prop:e,value:t,files:n,file:r,problem:i}){return[`In Component Code, the user set \\`${e}\\` to \\`${typeof t==`string`?JSON.stringify(t):`${t}`}\\` in \\`${r}\\`. The preview now runs this code, which is its whole state:`,...Object.entries(n).map(([e,t])=>Xy(e,t)),i?`The preview throws instead of rendering: ${i}`:`The preview renders without throwing.`].join(`\n\n`)}var H;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(H||={});var U;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(U||={});function Qy(e){switch(e){case U.num:return`num`;case U.bigint:return`bigint`;case U.decimal:return`decimal`;case U.regexp:return`regexp`;case U.string:return`string`;case U.name:return`name`;case U.eof:return`eof`;case U.bracketL:return`[`;case U.bracketR:return`]`;case U.braceL:return`{`;case U.braceBarL:return`{|`;case U.braceR:return`}`;case U.braceBarR:return`|}`;case U.parenL:return`(`;case U.parenR:return`)`;case U.comma:return`,`;case U.semi:return`;`;case U.colon:return`:`;case U.doubleColon:return`::`;case U.dot:return`.`;case U.question:return`?`;case U.questionDot:return`?.`;case U.arrow:return`=>`;case U.template:return`template`;case U.ellipsis:return`...`;case U.backQuote:return"`";case U.dollarBraceL:return"${";case U.at:return`@`;case U.hash:return`#`;case U.eq:return`=`;case U.assign:return`_=`;case U.preIncDec:return`++/--`;case U.postIncDec:return`++/--`;case U.bang:return`!`;case U.tilde:return`~`;case U.pipeline:return`|>`;case U.nullishCoalescing:return`??`;case U.logicalOR:return`||`;case U.logicalAND:return`&&`;case U.bitwiseOR:return`|`;case U.bitwiseXOR:return`^`;case U.bitwiseAND:return`&`;case U.equality:return`==/!=`;case U.lessThan:return`<`;case U.greaterThan:return`>`;case U.relationalOrEqual:return`<=/>=`;case U.bitShiftL:return`<<`;case U.bitShiftR:return`>>/>>>`;case U.plus:return`+`;case U.minus:return`-`;case U.modulo:return`%`;case U.star:return`*`;case U.slash:return`/`;case U.exponent:return`**`;case U.jsxName:return`jsxName`;case U.jsxText:return`jsxText`;case U.jsxEmptyText:return`jsxEmptyText`;case U.jsxTagStart:return`jsxTagStart`;case U.jsxTagEnd:return`jsxTagEnd`;case U.typeParameterStart:return`typeParameterStart`;case U.nonNullAssertion:return`nonNullAssertion`;case U._break:return`break`;case U._case:return`case`;case U._catch:return`catch`;case U._continue:return`continue`;case U._debugger:return`debugger`;case U._default:return`default`;case U._do:return`do`;case U._else:return`else`;case U._finally:return`finally`;case U._for:return`for`;case U._function:return`function`;case U._if:return`if`;case U._return:return`return`;case U._switch:return`switch`;case U._throw:return`throw`;case U._try:return`try`;case U._var:return`var`;case U._let:return`let`;case U._const:return`const`;case U._while:return`while`;case U._with:return`with`;case U._new:return`new`;case U._this:return`this`;case U._super:return`super`;case U._class:return`class`;case U._extends:return`extends`;case U._export:return`export`;case U._import:return`import`;case U._yield:return`yield`;case U._null:return`null`;case U._true:return`true`;case U._false:return`false`;case U._in:return`in`;case U._instanceof:return`instanceof`;case U._typeof:return`typeof`;case U._void:return`void`;case U._delete:return`delete`;case U._async:return`async`;case U._get:return`get`;case U._set:return`set`;case U._declare:return`declare`;case U._readonly:return`readonly`;case U._abstract:return`abstract`;case U._static:return`static`;case U._public:return`public`;case U._private:return`private`;case U._protected:return`protected`;case U._override:return`override`;case U._as:return`as`;case U._enum:return`enum`;case U._type:return`type`;case U._implements:return`implements`;default:return``}}var $y=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},eb=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},tb=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=U.eof}__init8(){this.contextualKeyword=H.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new eb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},W;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(W||={});var nb,rb,ib,G,K,ab;function ob(){return ab++}function sb(e){if(`pos`in e){let t=lb(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var cb=class{constructor(e,t){this.line=e,this.column=t}};function lb(e){let t=1,n=1;for(let r=0;r<e;r++)K.charCodeAt(r)===W.lineFeed?(t++,n=1):n++;return new cb(t,n)}function ub(e,t,n,r){K=e,G=new tb,ab=1,nb=t,rb=n,ib=r}function q(e){return G.contextualKeyword===e}function db(e){let t=Ub();return t.type===U.name&&t.contextualKeyword===e}function fb(e){return G.contextualKeyword===e&&Z(U.name)}function pb(e){fb(e)||yb()}function mb(){return Q(U.eof)||Q(U.braceR)||hb()}function hb(){let e=G.tokens[G.tokens.length-1],t=e?e.end:0;for(let e=t;e<G.start;e++){let t=K.charCodeAt(e);if(t===W.lineFeed||t===W.carriageReturn||t===8232||t===8233)return!0}return!1}function gb(){let e=Wb();for(let t=G.end;t<e;t++){let e=K.charCodeAt(t);if(e===W.lineFeed||e===W.carriageReturn||e===8232||e===8233)return!0}return!1}function _b(){return Z(U.semi)||mb()}function vb(){_b()||yb(`Unexpected token, expected ";"`)}function J(e){Z(e)||yb(`Unexpected token, expected "${Qy(e)}"`)}function yb(e=`Unexpected token`,t=G.start){if(G.error)return;let n=SyntaxError(e);n.pos=t,G.error=n,G.pos=K.length,Qb(U.eof)}var bb=[9,11,12,W.space,W.nonBreakingSpace,W.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],xb=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,Sb=new Uint8Array(65536);for(let e of bb)Sb[e]=1;function Cb(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var wb=new Uint8Array(65536);for(let e=0;e<128;e++)wb[e]=+!!Cb(e);for(let e=128;e<65536;e++)wb[e]=1;for(let e of bb)wb[e]=0;wb[8232]=0,wb[8233]=0;var Tb=wb.slice();for(let e=W.digit0;e<=W.digit9;e++)Tb[e]=0;var Eb=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,H._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,H._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,H._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,H._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,H._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,H._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(U._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(U._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,H._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(U._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(U._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(U._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,H._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(U._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(U._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(U._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,H._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(U._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,H._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(U._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,H._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(U._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,H._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(U._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,H._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,H._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,H._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,H._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,H._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(U._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(U._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(U._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(U._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Db(){let e=0,t=0,n=G.pos;for(;n<K.length&&(t=K.charCodeAt(n),!(t<W.lowercaseA||t>W.lowercaseZ));){let r=Eb[e+(t-W.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Eb[e];if(r>-1&&!wb[t]){G.pos=n,r&1?Qb(r>>>1):Qb(U.name,r>>>1);return}for(;n<K.length;){let e=K.charCodeAt(n);if(wb[e])n++;else if(e===W.backslash){if(n+=2,K.charCodeAt(n)===W.leftCurlyBrace){for(;n<K.length&&K.charCodeAt(n)!==W.rightCurlyBrace;)n++;n++}}else if(e===W.atSign&&K.charCodeAt(n+1)===W.atSign)n+=2;else break}G.pos=n,Qb(U.name)}var Y;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(Y||={});var Ob;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})(Ob||={});function kb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Ab(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function jb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ImportDeclaration}function Mb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Nb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration}function Pb(e){return e.identifierRole===Y.ObjectShorthandTopLevelDeclaration||e.identifierRole===Y.ObjectShorthandBlockScopedDeclaration||e.identifierRole===Y.ObjectShorthandFunctionScopedDeclaration}var Fb=class{constructor(){this.type=G.type,this.contextualKeyword=G.contextualKeyword,this.start=G.start,this.end=G.end,this.scopeDepth=G.scopeDepth,this.isType=G.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function X(){G.tokens.push(new Fb),qb()}function Ib(){G.tokens.push(new Fb),G.start=G.pos,_x()}function Lb(){G.type===U.assign&&--G.pos,fx()}function Rb(e){for(let t=G.tokens.length-e;t<G.tokens.length;t++)G.tokens[t].isType=!0;let t=G.isType;return G.isType=!0,t}function zb(e){G.isType=e}function Z(e){return Q(e)?(X(),!0):!1}function Bb(e){let t=G.isType;G.isType=!0,Z(e),G.isType=t}function Q(e){return G.type===e}function Vb(){let e=G.snapshot();X();let t=G.type;return G.restoreFromSnapshot(e),t}var Hb=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function Ub(){let e=G.snapshot();X();let t=G.type,n=G.contextualKeyword;return G.restoreFromSnapshot(e),new Hb(t,n)}function Wb(){return Gb(G.pos)}function Gb(e){return xb.lastIndex=e,e+xb.exec(K)[0].length}function Kb(){return K.charCodeAt(Wb())}function qb(){if(Zb(),G.start=G.pos,G.pos>=K.length){let e=G.tokens;e.length>=2&&e[e.length-1].start>=K.length&&e[e.length-2].start>=K.length&&yb(`Unexpectedly reached the end of input.`),Qb(U.eof);return}Jb(K.charCodeAt(G.pos))}function Jb(e){Tb[e]||e===W.backslash||e===W.atSign&&K.charCodeAt(G.pos+1)===W.atSign?Db():ux(e)}function Yb(){for(;K.charCodeAt(G.pos)!==W.asterisk||K.charCodeAt(G.pos+1)!==W.slash;)if(G.pos++,G.pos>K.length){yb(`Unterminated comment`,G.pos-2);return}G.pos+=2}function Xb(e){let t=K.charCodeAt(G.pos+=e);if(G.pos<K.length)for(;t!==W.lineFeed&&t!==W.carriageReturn&&t!==W.lineSeparator&&t!==W.paragraphSeparator&&++G.pos<K.length;)t=K.charCodeAt(G.pos)}function Zb(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);switch(e){case W.carriageReturn:K.charCodeAt(G.pos+1)===W.lineFeed&&++G.pos;case W.lineFeed:case W.lineSeparator:case W.paragraphSeparator:++G.pos;break;case W.slash:switch(K.charCodeAt(G.pos+1)){case W.asterisk:G.pos+=2,Yb();break;case W.slash:Xb(2);break;default:return}break;default:if(Sb[e])++G.pos;else return}}}function Qb(e,t=H.NONE){G.end=G.pos,G.type=e,G.contextualKeyword=t}function $b(){let e=K.charCodeAt(G.pos+1);if(e>=W.digit0&&e<=W.digit9){hx(!0);return}e===W.dot&&K.charCodeAt(G.pos+2)===W.dot?(G.pos+=3,Qb(U.ellipsis)):(++G.pos,Qb(U.dot))}function ex(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.slash,1)}function tx(e){let t=e===W.asterisk?U.star:U.modulo,n=1,r=K.charCodeAt(G.pos+1);e===W.asterisk&&r===W.asterisk&&(n++,r=K.charCodeAt(G.pos+2),t=U.exponent),r===W.equalsTo&&K.charCodeAt(G.pos+2)!==W.greaterThan&&(n++,t=U.assign),dx(t,n)}function nx(e){let t=K.charCodeAt(G.pos+1);if(t===e){K.charCodeAt(G.pos+2)===W.equalsTo?dx(U.assign,3):dx(e===W.verticalBar?U.logicalOR:U.logicalAND,2);return}if(e===W.verticalBar){if(t===W.greaterThan){dx(U.pipeline,2);return}else if(t===W.rightCurlyBrace&&ib){dx(U.braceBarR,2);return}}if(t===W.equalsTo){dx(U.assign,2);return}dx(e===W.verticalBar?U.bitwiseOR:U.bitwiseAND,1)}function rx(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.bitwiseXOR,1)}function ix(e){let t=K.charCodeAt(G.pos+1);if(t===e){dx(U.preIncDec,2);return}t===W.equalsTo?dx(U.assign,2):e===W.plusSign?dx(U.plus,1):dx(U.minus,1)}function ax(){let e=K.charCodeAt(G.pos+1);if(e===W.lessThan){if(K.charCodeAt(G.pos+2)===W.equalsTo){dx(U.assign,3);return}G.isType?dx(U.lessThan,1):dx(U.bitShiftL,2);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.lessThan,1)}function ox(){if(G.isType){dx(U.greaterThan,1);return}let e=K.charCodeAt(G.pos+1);if(e===W.greaterThan){let e=K.charCodeAt(G.pos+2)===W.greaterThan?3:2;if(K.charCodeAt(G.pos+e)===W.equalsTo){dx(U.assign,e+1);return}dx(U.bitShiftR,e);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.greaterThan,1)}function sx(){G.type===U.greaterThan&&(--G.pos,ox())}function cx(e){let t=K.charCodeAt(G.pos+1);if(t===W.equalsTo){dx(U.equality,K.charCodeAt(G.pos+2)===W.equalsTo?3:2);return}if(e===W.equalsTo&&t===W.greaterThan){G.pos+=2,Qb(U.arrow);return}dx(e===W.equalsTo?U.eq:U.bang,1)}function lx(){let e=K.charCodeAt(G.pos+1),t=K.charCodeAt(G.pos+2);e===W.questionMark&&!(ib&&G.isType)?t===W.equalsTo?dx(U.assign,3):dx(U.nullishCoalescing,2):e===W.dot&&!(t>=W.digit0&&t<=W.digit9)?(G.pos+=2,Qb(U.questionDot)):(++G.pos,Qb(U.question))}function ux(e){switch(e){case W.numberSign:++G.pos,Qb(U.hash);return;case W.dot:$b();return;case W.leftParenthesis:++G.pos,Qb(U.parenL);return;case W.rightParenthesis:++G.pos,Qb(U.parenR);return;case W.semicolon:++G.pos,Qb(U.semi);return;case W.comma:++G.pos,Qb(U.comma);return;case W.leftSquareBracket:++G.pos,Qb(U.bracketL);return;case W.rightSquareBracket:++G.pos,Qb(U.bracketR);return;case W.leftCurlyBrace:ib&&K.charCodeAt(G.pos+1)===W.verticalBar?dx(U.braceBarL,2):(++G.pos,Qb(U.braceL));return;case W.rightCurlyBrace:++G.pos,Qb(U.braceR);return;case W.colon:K.charCodeAt(G.pos+1)===W.colon?dx(U.doubleColon,2):(++G.pos,Qb(U.colon));return;case W.questionMark:lx();return;case W.atSign:++G.pos,Qb(U.at);return;case W.graveAccent:++G.pos,Qb(U.backQuote);return;case W.digit0:{let e=K.charCodeAt(G.pos+1);if(e===W.lowercaseX||e===W.uppercaseX||e===W.lowercaseO||e===W.uppercaseO||e===W.lowercaseB||e===W.uppercaseB){mx();return}}case W.digit1:case W.digit2:case W.digit3:case W.digit4:case W.digit5:case W.digit6:case W.digit7:case W.digit8:case W.digit9:hx(!1);return;case W.quotationMark:case W.apostrophe:gx(e);return;case W.slash:ex();return;case W.percentSign:case W.asterisk:tx(e);return;case W.verticalBar:case W.ampersand:nx(e);return;case W.caret:rx();return;case W.plusSign:case W.dash:ix(e);return;case W.lessThan:ax();return;case W.greaterThan:ox();return;case W.equalsTo:case W.exclamationMark:cx(e);return;case W.tilde:dx(U.tilde,1);return;default:break}yb(`Unexpected character \'${String.fromCharCode(e)}\'`,G.pos)}function dx(e,t){G.pos+=t,Qb(e)}function fx(){let e=G.pos,t=!1,n=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated regular expression`,e);return}let r=K.charCodeAt(G.pos);if(t)t=!1;else{if(r===W.leftSquareBracket)n=!0;else if(r===W.rightSquareBracket&&n)n=!1;else if(r===W.slash&&!n)break;t=r===W.backslash}++G.pos}++G.pos,vx(),Qb(U.regexp)}function px(){for(;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e===W.underscore)G.pos++;else break}}function mx(){for(G.pos+=2;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF||e===W.underscore)G.pos++;else break}K.charCodeAt(G.pos)===W.lowercaseN?(++G.pos,Qb(U.bigint)):Qb(U.num)}function hx(e){let t=!1,n=!1;e||px();let r=K.charCodeAt(G.pos);if(r===W.dot&&(++G.pos,px(),r=K.charCodeAt(G.pos)),(r===W.uppercaseE||r===W.lowercaseE)&&(r=K.charCodeAt(++G.pos),(r===W.plusSign||r===W.dash)&&++G.pos,px(),r=K.charCodeAt(G.pos)),r===W.lowercaseN?(++G.pos,t=!0):r===W.lowercaseM&&(++G.pos,n=!0),t){Qb(U.bigint);return}if(n){Qb(U.decimal);return}Qb(U.num)}function gx(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}let t=K.charCodeAt(G.pos);if(t===W.backslash)G.pos++;else if(t===e)break;G.pos++}G.pos++,Qb(U.string)}function _x(){for(;;){if(G.pos>=K.length){yb(`Unterminated template`);return}let e=K.charCodeAt(G.pos);if(e===W.graveAccent||e===W.dollarSign&&K.charCodeAt(G.pos+1)===W.leftCurlyBrace){if(G.pos===G.start&&Q(U.template))if(e===W.dollarSign){G.pos+=2,Qb(U.dollarBraceL);return}else{++G.pos,Qb(U.backQuote);return}Qb(U.template);return}e===W.backslash&&G.pos++,G.pos++}}function vx(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);if(wb[e])G.pos++;else if(e===W.backslash){if(G.pos+=2,K.charCodeAt(G.pos)===W.leftCurlyBrace){for(;G.pos<K.length&&K.charCodeAt(G.pos)!==W.rightCurlyBrace;)G.pos++;G.pos++}}else break}}function yx(e,t=e.currentIndex()){let n=t+1;if(bx(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,bx(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function bx(e,t){let n=e.tokens[t];return n.type===U.braceR||n.type===U.comma}var xx=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`\'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\\xA0`],[`iexcl`,`\xA1`],[`cent`,`\xA2`],[`pound`,`\xA3`],[`curren`,`\xA4`],[`yen`,`\xA5`],[`brvbar`,`\xA6`],[`sect`,`\xA7`],[`uml`,`\xA8`],[`copy`,`\xA9`],[`ordf`,`\xAA`],[`laquo`,`\xAB`],[`not`,`\xAC`],[`shy`,`\xAD`],[`reg`,`\xAE`],[`macr`,`\xAF`],[`deg`,`\xB0`],[`plusmn`,`\xB1`],[`sup2`,`\xB2`],[`sup3`,`\xB3`],[`acute`,`\xB4`],[`micro`,`\xB5`],[`para`,`\xB6`],[`middot`,`\xB7`],[`cedil`,`\xB8`],[`sup1`,`\xB9`],[`ordm`,`\xBA`],[`raquo`,`\xBB`],[`frac14`,`\xBC`],[`frac12`,`\xBD`],[`frac34`,`\xBE`],[`iquest`,`\xBF`],[`Agrave`,`\xC0`],[`Aacute`,`\xC1`],[`Acirc`,`\xC2`],[`Atilde`,`\xC3`],[`Auml`,`\xC4`],[`Aring`,`\xC5`],[`AElig`,`\xC6`],[`Ccedil`,`\xC7`],[`Egrave`,`\xC8`],[`Eacute`,`\xC9`],[`Ecirc`,`\xCA`],[`Euml`,`\xCB`],[`Igrave`,`\xCC`],[`Iacute`,`\xCD`],[`Icirc`,`\xCE`],[`Iuml`,`\xCF`],[`ETH`,`\xD0`],[`Ntilde`,`\xD1`],[`Ograve`,`\xD2`],[`Oacute`,`\xD3`],[`Ocirc`,`\xD4`],[`Otilde`,`\xD5`],[`Ouml`,`\xD6`],[`times`,`\xD7`],[`Oslash`,`\xD8`],[`Ugrave`,`\xD9`],[`Uacute`,`\xDA`],[`Ucirc`,`\xDB`],[`Uuml`,`\xDC`],[`Yacute`,`\xDD`],[`THORN`,`\xDE`],[`szlig`,`\xDF`],[`agrave`,`\xE0`],[`aacute`,`\xE1`],[`acirc`,`\xE2`],[`atilde`,`\xE3`],[`auml`,`\xE4`],[`aring`,`\xE5`],[`aelig`,`\xE6`],[`ccedil`,`\xE7`],[`egrave`,`\xE8`],[`eacute`,`\xE9`],[`ecirc`,`\xEA`],[`euml`,`\xEB`],[`igrave`,`\xEC`],[`iacute`,`\xED`],[`icirc`,`\xEE`],[`iuml`,`\xEF`],[`eth`,`\xF0`],[`ntilde`,`\xF1`],[`ograve`,`\xF2`],[`oacute`,`\xF3`],[`ocirc`,`\xF4`],[`otilde`,`\xF5`],[`ouml`,`\xF6`],[`divide`,`\xF7`],[`oslash`,`\xF8`],[`ugrave`,`\xF9`],[`uacute`,`\xFA`],[`ucirc`,`\xFB`],[`uuml`,`\xFC`],[`yacute`,`\xFD`],[`thorn`,`\xFE`],[`yuml`,`\xFF`],[`OElig`,`\u0152`],[`oelig`,`\u0153`],[`Scaron`,`\u0160`],[`scaron`,`\u0161`],[`Yuml`,`\u0178`],[`fnof`,`\u0192`],[`circ`,`\u02C6`],[`tilde`,`\u02DC`],[`Alpha`,`\u0391`],[`Beta`,`\u0392`],[`Gamma`,`\u0393`],[`Delta`,`\u0394`],[`Epsilon`,`\u0395`],[`Zeta`,`\u0396`],[`Eta`,`\u0397`],[`Theta`,`\u0398`],[`Iota`,`\u0399`],[`Kappa`,`\u039A`],[`Lambda`,`\u039B`],[`Mu`,`\u039C`],[`Nu`,`\u039D`],[`Xi`,`\u039E`],[`Omicron`,`\u039F`],[`Pi`,`\u03A0`],[`Rho`,`\u03A1`],[`Sigma`,`\u03A3`],[`Tau`,`\u03A4`],[`Upsilon`,`\u03A5`],[`Phi`,`\u03A6`],[`Chi`,`\u03A7`],[`Psi`,`\u03A8`],[`Omega`,`\u03A9`],[`alpha`,`\u03B1`],[`beta`,`\u03B2`],[`gamma`,`\u03B3`],[`delta`,`\u03B4`],[`epsilon`,`\u03B5`],[`zeta`,`\u03B6`],[`eta`,`\u03B7`],[`theta`,`\u03B8`],[`iota`,`\u03B9`],[`kappa`,`\u03BA`],[`lambda`,`\u03BB`],[`mu`,`\u03BC`],[`nu`,`\u03BD`],[`xi`,`\u03BE`],[`omicron`,`\u03BF`],[`pi`,`\u03C0`],[`rho`,`\u03C1`],[`sigmaf`,`\u03C2`],[`sigma`,`\u03C3`],[`tau`,`\u03C4`],[`upsilon`,`\u03C5`],[`phi`,`\u03C6`],[`chi`,`\u03C7`],[`psi`,`\u03C8`],[`omega`,`\u03C9`],[`thetasym`,`\u03D1`],[`upsih`,`\u03D2`],[`piv`,`\u03D6`],[`ensp`,`\u2002`],[`emsp`,`\u2003`],[`thinsp`,`\u2009`],[`zwnj`,`\u200C`],[`zwj`,`\u200D`],[`lrm`,`\u200E`],[`rlm`,`\u200F`],[`ndash`,`\u2013`],[`mdash`,`\u2014`],[`lsquo`,`\u2018`],[`rsquo`,`\u2019`],[`sbquo`,`\u201A`],[`ldquo`,`\u201C`],[`rdquo`,`\u201D`],[`bdquo`,`\u201E`],[`dagger`,`\u2020`],[`Dagger`,`\u2021`],[`bull`,`\u2022`],[`hellip`,`\u2026`],[`permil`,`\u2030`],[`prime`,`\u2032`],[`Prime`,`\u2033`],[`lsaquo`,`\u2039`],[`rsaquo`,`\u203A`],[`oline`,`\u203E`],[`frasl`,`\u2044`],[`euro`,`\u20AC`],[`image`,`\u2111`],[`weierp`,`\u2118`],[`real`,`\u211C`],[`trade`,`\u2122`],[`alefsym`,`\u2135`],[`larr`,`\u2190`],[`uarr`,`\u2191`],[`rarr`,`\u2192`],[`darr`,`\u2193`],[`harr`,`\u2194`],[`crarr`,`\u21B5`],[`lArr`,`\u21D0`],[`uArr`,`\u21D1`],[`rArr`,`\u21D2`],[`dArr`,`\u21D3`],[`hArr`,`\u21D4`],[`forall`,`\u2200`],[`part`,`\u2202`],[`exist`,`\u2203`],[`empty`,`\u2205`],[`nabla`,`\u2207`],[`isin`,`\u2208`],[`notin`,`\u2209`],[`ni`,`\u220B`],[`prod`,`\u220F`],[`sum`,`\u2211`],[`minus`,`\u2212`],[`lowast`,`\u2217`],[`radic`,`\u221A`],[`prop`,`\u221D`],[`infin`,`\u221E`],[`ang`,`\u2220`],[`and`,`\u2227`],[`or`,`\u2228`],[`cap`,`\u2229`],[`cup`,`\u222A`],[`int`,`\u222B`],[`there4`,`\u2234`],[`sim`,`\u223C`],[`cong`,`\u2245`],[`asymp`,`\u2248`],[`ne`,`\u2260`],[`equiv`,`\u2261`],[`le`,`\u2264`],[`ge`,`\u2265`],[`sub`,`\u2282`],[`sup`,`\u2283`],[`nsub`,`\u2284`],[`sube`,`\u2286`],[`supe`,`\u2287`],[`oplus`,`\u2295`],[`otimes`,`\u2297`],[`perp`,`\u22A5`],[`sdot`,`\u22C5`],[`lceil`,`\u2308`],[`rceil`,`\u2309`],[`lfloor`,`\u230A`],[`rfloor`,`\u230B`],[`lang`,`\u2329`],[`rang`,`\u232A`],[`loz`,`\u25CA`],[`spades`,`\u2660`],[`clubs`,`\u2663`],[`hearts`,`\u2665`],[`diams`,`\u2666`]]);function Sx(e){let[t,n]=Cx(e.jsxPragma||`React.createElement`),[r,i]=Cx(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function Cx(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var wx=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Tx=class e extends wx{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Sx(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(U.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Ob.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`\n`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===Ob.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(U.slash,U.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(U.slash,U.jsxTagEnd))if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`);for(this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,U.jsxName,U.jsxName)&&!this.tokens.matches2AtIndex(e-1,U.greaterThan,U.jsxName)&&!this.tokens.matches1AtIndex(e,U.braceL)&&!this.tokens.matches1AtIndex(e,U.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,U.slash,U.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Ex(e)&&this.tokens.replaceToken(`\'${e}\'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(U.jsxName)&&!this.tokens.matches1(U.braceL)){t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`);return}this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`)}processProps(e){let t=null;for(;;){if(this.tokens.matches2(U.jsxName,U.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}else this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(U.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(U.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`\'${e}\'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(U.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(U.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Ox(t),r=kx(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===Ob.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===Ob.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(U.jsxTagStart,U.slash))return;let e=!1;if(this.tokens.matches1(U.braceL))this.tokens.matches2(U.braceL,U.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(U.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(U.jsxText)||this.tokens.matches1(U.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Ox(n),i=Dx(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Ex(e){let t=e.charCodeAt(0);return t>=W.lowercaseA&&t<=W.lowercaseZ}function Dx(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\\r`)r||(n+=o);else if(o===`\n`)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=Ax(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Ox(e){let t=0,n=0;for(let r of e)r===`\n`?(t++,n=0):r===` `&&n++;return`\n`.repeat(t)+` `.repeat(n)}function kx(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`\n`)if(/\\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\\s/.test(e[n+1]);)n++;else t+=`\n`;else if(r===`&`){let{entity:r,newI:i}=Ax(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function Ax(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&Mx(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&jx(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=xx.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function jx(e){return e>=W.digit0&&e<=W.digit9}function Mx(e){return e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF}function Nx(e,t){let n=Sx(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===U.name&&!i.isType&&(i.identifierRole===Y.Access||i.identifierRole===Y.ObjectShorthand||i.identifierRole===Y.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===U.jsxTagStart&&r.add(n.base),i.type===U.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===U.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===U.jsxName&&i.identifierRole===Y.Access&&(!Ex(e.identifierNameForToken(i))||e.tokens[t+1].type===U.dot)&&r.add(e.identifierNameForToken(i))}return r}var Px=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,U._import)&&!this.tokens.matches3AtIndex(e,U._import,U.name,U.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,U._export)&&!this.tokens.matches2AtIndex(e,U._export,U.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Nx(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require(\'${e}\');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require(\'${e}\');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, \'${t}\', \'${e}\');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,H._type)||this.tokens.matches1AtIndex(e,U._typeof))&&!this.tokens.matches1AtIndex(e+1,U.comma)&&!this.tokens.matchesContextualAtIndex(e+1,H._from)||this.tokens.matches1AtIndex(e,U.parenL))return;if(this.tokens.matches1AtIndex(e,U.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,U.comma)&&e++),this.tokens.matches1AtIndex(e,U.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,U.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,H._from)&&e++,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,U._export,U._var)||this.tokens.matches2AtIndex(e,U._export,U._let)||this.tokens.matches2AtIndex(e,U._export,U._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,U._export,U._function)||this.tokens.matches2AtIndex(e,U._export,U._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,U._export,U.name,U._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,U._export,U.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,U._export,U.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,U.braceL)||this.tokens.matches1AtIndex(n,U.dollarBraceL)||this.tokens.matches1AtIndex(n,U.bracketL))t++;else if(this.tokens.matches1AtIndex(n,U.braceR)||this.tokens.matches1AtIndex(n,U.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,U.name))break;else if(this.tokens.matches1AtIndex(1,U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(kb(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,H._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,U._export,U.star,U._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}let n=yx(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,U.comma,U.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,U.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},Fx=44,Ix=59,Lx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Rx=new Uint8Array(64),zx=new Uint8Array(128);for(let e=0;e<Lx.length;e++){let t=Lx.charCodeAt(e);Rx[e]=t,zx[t]=e}function Bx(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(Rx[n])}while(t>0)}function Vx(e){return e<0?-e<<1|1:e<<1}var Hx=1024*16,Ux=typeof TextDecoder<`u`?new TextDecoder:typeof Buffer<`u`?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Wx=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(Hx)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Hx&&(this.out+=Ux.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+Ux.decode(e.subarray(0,n)):t}};function Gx(e){let t=new Wx,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(Ix),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(Fx),Bx(t,Vx(o[0]-c)),c=o[0],o.length!==1&&(Bx(t,Vx(o[1]-n)),Bx(t,Vx(o[2]-r)),Bx(t,Vx(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(Bx(t,Vx(o[4]-a)),a=o[4]))}}return t.flush()}o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\\w+.-]+:\\/\\//,t=/^([\\w+.-]+:)\\/\\/([^@/#?]*@)?(\\[[^\\]]+\\]|[^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/,n=/^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var Kx=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function qx(e){return e}function Jx(e,t){return qx(e)._indexes[t]}function Yx(e,t){let n=Jx(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=qx(e);return i[t]=r.push(t)-1}var Xx=0,Zx=1,Qx=2,$x=3,eS=4,tS=-1,nS=class{constructor({file:e,sourceRoot:t}={}){this._names=new Kx,this._sources=new Kx,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new Kx}};function rS(e){return e}var iS=(e,t,n,r,i,a,o,s)=>sS(!0,e,t,n,r,i,a,o,s);function aS(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=rS(e);return dS(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function oS(e){let t=aS(e);return Object.assign({},t,{mappings:Gx(t.mappings)})}function sS(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=rS(t),p=cS(l,n),m=lS(p,r);if(!i)return e&&fS(p,m)?void 0:uS(p,m,[r]);let h=Yx(u,i),g=s?Yx(f,s):tS;if(h===d.length&&(d[h]=c??null),!(e&&pS(p,m,h,a,o,g)))return uS(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function cS(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function lS(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][Xx]);n=r--);return n}function uS(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function dS(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function fS(e,t){return t===0||e[t-1].length===1}function pS(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[Zx]&&r===o[Qx]&&i===o[$x]&&a===(o.length===5?o[eS]:tS)}function mS({code:e,mappings:t},n,r,i,a){let o=hS(i,a),s=new nS({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&iS(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(iS(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===W.lineFeed&&(u++,d=r+1,l!==d&&iS(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=oS(s);return m}function hS(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===W.lineFeed&&(a=o+1);return n}var gS={require:`\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n `,interopRequireWildcard:`\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n `,interopRequireDefault:`\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n `,createNamedExportFrom:`\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n `,createStarExport:`\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n `,nullishCoalesce:`\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n `,asyncNullishCoalesce:`\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n `,optionalChain:`\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,asyncOptionalChain:`\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,optionalChainDelete:`\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `,asyncOptionalChainDelete:`\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `},_S=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(gS)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\\s+/g,` `).trim())}return e}};function vS(e,t,n){yS(e,n)&&bS(e,t,n)}function yS(e,t){for(let n of e.tokens)if(n.type===U.name&&!n.isType&&Ab(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function bS(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===U.name&&n.has(s)){if(Mb(o))xS(r[r.length-1],e,s);else if(Nb(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);xS(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function xS(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===U.name||e.type===U.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function SS(e,t){let n=[];for(let r of t)r.type===U.name&&n.push(e.slice(r.start,r.end));return n}var CS=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(SS(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},wS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),TS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=wS(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof b||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function ee(e,t){return new te(e,t)}e.enumlit=ee;var te=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=te;function ne(e){return Object.keys(e).map(function(t){return re(t,e[t])})}function re(e,t){return t instanceof se?new ce(e,t.ttype,!0):new ce(e,i(t),!1)}function ie(e,t){return new ae(e,ne(t))}e.iface=ie;var ae=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=ae;function oe(e){return new se(i(e))}e.opt=oe;var se=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=se;var ce=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=ce;function le(e){return new ue(new pe([...arguments].slice(1)),i(e))}e.func=le;var ue=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=ue;function de(e,t,n){return new fe(e,i(t),!!n)}e.param=de;var fe=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=fe;var pe=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=pe;var b=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=b,e.basicTypes={any:new b(function(e){return!0},`is invalid`),number:new b(function(e){return typeof e==`number`},`is not a number`),object:new b(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new b(function(e){return typeof e==`boolean`},`is not a boolean`),string:new b(function(e){return typeof e==`string`},`is not a string`),symbol:new b(function(e){return typeof e==`symbol`},`is not a symbol`),void:new b(function(e){return e==null},`is not void`),undefined:new b(function(e){return e===void 0},`is not undefined`),null:new b(function(e){return e===null},`is not null`),never:new b(function(e){return!1},`is unexpected`),Date:new b(he(`[object Date]`),`is not a Date`),RegExp:new b(he(`[object RegExp]`),`is not a RegExp`)};var me=Object.prototype.toString;function he(e){return function(t){return typeof t==`object`&&t&&me.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new b(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ge=function(t){e.basicTypes[t.name]=new b(function(e){return e instanceof t},`is not a `+t.name)},_e=0,ve=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_e<ve.length;_e++){var ye=ve[_e];ge(ye)}})),ES=c(o((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=TS(),r=wS(),i=TS();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=wS();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),DS={Transform:ES.union(ES.lit(`jsx`),ES.lit(`typescript`),ES.lit(`flow`),ES.lit(`imports`),ES.lit(`react-hot-loader`),ES.lit(`jest`)),SourceMapOptions:ES.iface([],{compiledFilename:`string`}),Options:ES.iface([],{transforms:ES.array(`Transform`),disableESTransforms:ES.opt(`boolean`),jsxRuntime:ES.opt(ES.union(ES.lit(`classic`),ES.lit(`automatic`),ES.lit(`preserve`))),production:ES.opt(`boolean`),jsxImportSource:ES.opt(`string`),jsxPragma:ES.opt(`string`),jsxFragmentPragma:ES.opt(`string`),keepUnusedImports:ES.opt(`boolean`),preserveDynamicImport:ES.opt(`boolean`),injectCreateRequireForImportRequire:ES.opt(`boolean`),enableLegacyTypeScriptModuleInterop:ES.opt(`boolean`),enableLegacyBabel5ModuleInterop:ES.opt(`boolean`),sourceMapOptions:ES.opt(`SourceMapOptions`),filePath:ES.opt(`string`)})},{Options:OS}=(0,ES.createCheckers)(DS);function kS(e){OS.strictCheck(e)}function AS(){X(),Jw(!1)}function jS(e){X(),FS(e)}function MS(e){$(),PS(e)}function NS(){$(),G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration}function PS(e){let t;t=G.scopeDepth===0?Y.TopLevelDeclaration:e?Y.BlockScopedDeclaration:Y.FunctionScopedDeclaration,G.tokens[G.tokens.length-1].identifierRole=t}function FS(e){switch(G.type){case U._this:{let e=Rb(0);X(),zb(e);return}case U._yield:case U.name:G.type=U.name,MS(e);return;case U.bracketL:X(),IS(U.bracketR,e,!0);return;case U.braceL:wT(!0,e);return;default:yb()}}function IS(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=G.tokens.length;for(;!Z(e)&&!G.error;)if(a?a=!1:(J(U.comma),G.tokens[G.tokens.length-1].contextId=i,!o&&G.tokens[s].isType&&(G.tokens[G.tokens.length-1].isType=!0,o=!0)),!(n&&Q(U.comma))){if(Z(e))break;if(Q(U.ellipsis)){jS(t),RS(),Z(U.comma),J(e);break}else LS(r,t)}}function LS(e,t){e&&US([H._public,H._protected,H._private,H._readonly,H._override]),zS(t),RS(),zS(t,!0)}function RS(){ib?KE():rb&&Ow()}function zS(e,t=!1){if(t||FS(e),!Z(U.eq))return;let n=G.tokens.length-1;Jw(),G.tokens[n].rhsEndIndex=G.tokens.length}function BS(){return Q(U.name)}function VS(){return Q(U.name)||!!(G.type&U.IS_KEYWORD)||Q(U.string)||Q(U.num)||Q(U.bigint)||Q(U.decimal)}function HS(){let e=G.snapshot();return X(),(Q(U.bracketL)||Q(U.braceL)||Q(U.star)||Q(U.ellipsis)||Q(U.hash)||VS())&&!hb()?!0:(G.restoreFromSnapshot(e),!1)}function US(e){for(;WS(e)!==null;);}function WS(e){if(!Q(U.name))return null;let t=G.contextualKeyword;if(e.indexOf(t)!==-1&&HS()){switch(t){case H._readonly:G.tokens[G.tokens.length-1].type=U._readonly;break;case H._abstract:G.tokens[G.tokens.length-1].type=U._abstract;break;case H._static:G.tokens[G.tokens.length-1].type=U._static;break;case H._public:G.tokens[G.tokens.length-1].type=U._public;break;case H._private:G.tokens[G.tokens.length-1].type=U._private;break;case H._protected:G.tokens[G.tokens.length-1].type=U._protected;break;case H._override:G.tokens[G.tokens.length-1].type=U._override;break;case H._declare:G.tokens[G.tokens.length-1].type=U._declare;break;default:break}return t}return null}function GS(){for($();Z(U.dot);)$()}function KS(){GS(),!hb()&&Q(U.lessThan)&&sw()}function qS(){X(),FC()}function JS(){X()}function YS(){J(U._typeof),Q(U._import)?XS():GS(),!hb()&&Q(U.lessThan)&&sw()}function XS(){J(U._import),J(U.parenL),J(U.string),J(U.parenR),Z(U.dot)&&GS(),Q(U.lessThan)&&sw()}function ZS(){Z(U._const);let e=Z(U._in),t=fb(H._out);Z(U._const),(e||t)&&!Q(U.name)?G.tokens[G.tokens.length-1].type=U.name:$(),Z(U._extends)&&IC(),Z(U.eq)&&IC()}function QS(){Q(U.lessThan)&&$S()}function $S(){let e=Rb(0);for(Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();!Z(U.greaterThan)&&!G.error;)ZS(),Z(U.comma);zb(e)}function eC(e){let t=e===U.arrow;QS(),J(U.parenL),G.scopeDepth++,tC(!1),G.scopeDepth--,(t||Q(e))&&AC(e)}function tC(e){IS(U.parenR,e)}function nC(){Z(U.comma)||vb()}function rC(){eC(U.colon),nC()}function iC(){let e=G.snapshot();X();let t=Z(U.name)&&Q(U.colon);return G.restoreFromSnapshot(e),t}function aC(){if(!(Q(U.bracketL)&&iC()))return!1;let e=Rb(0);return J(U.bracketL),$(),FC(),J(U.bracketR),MC(),nC(),zb(e),!0}function oC(e){Z(U.question),!e&&(Q(U.parenL)||Q(U.lessThan))?(eC(U.colon),nC()):(MC(),nC())}function sC(){if(Q(U.parenL)||Q(U.lessThan)){rC();return}if(Q(U._new)){X(),Q(U.parenL)||Q(U.lessThan)?rC():oC(!1);return}let e=!!WS([H._readonly]);aC()||((q(H._get)||q(H._set))&&HS(),kT(-1),oC(e))}function cC(){lC()}function lC(){for(J(U.braceL);!Z(U.braceR)&&!G.error;)sC()}function uC(){let e=G.snapshot(),t=dC();return G.restoreFromSnapshot(e),t}function dC(){return X(),Z(U.plus)||Z(U.minus)?q(H._readonly):(q(H._readonly)&&X(),!Q(U.bracketL)||(X(),!BS())?!1:(X(),Q(U._in)))}function fC(){$(),J(U._in),IC()}function pC(){J(U.braceL),Q(U.plus)||Q(U.minus)?(X(),pb(H._readonly)):fb(H._readonly),J(U.bracketL),fC(),fb(H._as)&&IC(),J(U.bracketR),Q(U.plus)||Q(U.minus)?(X(),J(U.question)):Z(U.question),NC(),vb(),J(U.braceR)}function mC(){for(J(U.bracketL);!Z(U.bracketR)&&!G.error;)hC(),Z(U.comma)}function hC(){Z(U.ellipsis)?IC():(IC(),Z(U.question)),Z(U.colon)&&IC()}function gC(){J(U.parenL),IC(),J(U.parenR)}function _C(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),IC(),Ib(),Ib();X()}var vC;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(vC||={});function yC(e){e===vC.TSAbstractConstructorType&&pb(H._abstract),(e===vC.TSConstructorType||e===vC.TSAbstractConstructorType)&&J(U._new);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,eC(U.arrow),G.inDisallowConditionalTypesContext=t}function bC(){switch(G.type){case U.name:KS();return;case U._void:case U._null:X();return;case U.string:case U.num:case U.bigint:case U.decimal:case U._true:case U._false:hT();return;case U.minus:X(),hT();return;case U._this:JS(),q(H._is)&&!hb()&&qS();return;case U._typeof:YS();return;case U._import:XS();return;case U.braceL:uC()?pC():cC();return;case U.bracketL:mC();return;case U.parenL:gC();return;case U.backQuote:_C();return;default:if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}break}yb()}function xC(){for(bC();!hb()&&Z(U.bracketL);)Z(U.bracketR)||(IC(),J(U.bracketR))}function SC(){if(pb(H._infer),$(),Q(U._extends)){let e=G.snapshot();J(U._extends);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,IC(),G.inDisallowConditionalTypesContext=t,(G.error||!G.inDisallowConditionalTypesContext&&Q(U.question))&&G.restoreFromSnapshot(e)}}function CC(){if(q(H._keyof)||q(H._unique)||q(H._readonly))X(),CC();else if(q(H._infer))SC();else{let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,xC(),G.inDisallowConditionalTypesContext=e}}function wC(){if(Z(U.bitwiseAND),CC(),Q(U.bitwiseAND))for(;Z(U.bitwiseAND);)CC()}function TC(){if(Z(U.bitwiseOR),wC(),Q(U.bitwiseOR))for(;Z(U.bitwiseOR);)wC()}function EC(){return Q(U.lessThan)?!0:Q(U.parenL)&&OC()}function DC(){if(Q(U.name)||Q(U._this))return X(),!0;if(Q(U.braceL)||Q(U.bracketL)){let e=1;for(X();e>0&&!G.error;)Q(U.braceL)||Q(U.bracketL)?e++:(Q(U.braceR)||Q(U.bracketR))&&e--,X();return!0}return!1}function OC(){let e=G.snapshot(),t=kC();return G.restoreFromSnapshot(e),t}function kC(){return X(),!!(Q(U.parenR)||Q(U.ellipsis)||DC()&&(Q(U.colon)||Q(U.comma)||Q(U.question)||Q(U.eq)||Q(U.parenR)&&(X(),Q(U.arrow))))}function AC(e){let t=Rb(0);J(e),PC()||IC(),zb(t)}function jC(){Q(U.colon)&&AC(U.colon)}function MC(){Q(U.colon)&&FC()}function NC(){Z(U.colon)&&IC()}function PC(){let e=G.snapshot();return q(H._asserts)?(X(),fb(H._is)?(IC(),!0):BS()||Q(U._this)?(X(),fb(H._is)&&IC(),!0):(G.restoreFromSnapshot(e),!1)):BS()||Q(U._this)?(X(),q(H._is)&&!hb()?(X(),IC(),!0):(G.restoreFromSnapshot(e),!1)):!1}function FC(){let e=Rb(0);J(U.colon),IC(),zb(e)}function IC(){if(RC(),G.inDisallowConditionalTypesContext||hb()||!Z(U._extends))return;let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,RC(),G.inDisallowConditionalTypesContext=e,J(U.question),IC(),J(U.colon),IC()}function LC(){return q(H._abstract)&&Vb()===U._new}function RC(){if(EC()){yC(vC.TSFunctionType);return}if(Q(U._new)){yC(vC.TSConstructorType);return}else if(LC()){yC(vC.TSAbstractConstructorType);return}TC()}function zC(){let e=Rb(1);IC(),J(U.greaterThan),zb(e),tT()}function BC(){if(Z(U.jsxTagStart)){G.tokens[G.tokens.length-1].type=U.typeParameterStart;let e=Rb(1);for(;!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);Hw(),zb(e)}}function VC(){for(;!Q(U.braceL)&&!G.error;)HC(),Z(U.comma)}function HC(){GS(),Q(U.lessThan)&&sw()}function UC(){MS(!1),QS(),Z(U._extends)&&VC(),lC()}function WC(){MS(!1),QS(),J(U.eq),IC(),vb()}function GC(){if(Q(U.string)?hT():$(),Z(U.eq)){let e=G.tokens.length-1;Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}}function KC(){for(MS(!1),J(U.braceL);!Z(U.braceR)&&!G.error;)GC(),Z(U.comma)}function qC(){J(U.braceL),ND(U.braceR)}function JC(){MS(!1),Z(U.dot)?JC():qC()}function YC(){q(H._global)?$():Q(U.string)?fT():yb(),Q(U.braceL)?qC():vb()}function XC(){NS(),J(U.eq),QC(),vb()}function ZC(){return q(H._require)&&Vb()===U.parenL}function QC(){ZC()?$C():GS()}function $C(){pb(H._require),J(U.parenL),Q(U.string)||yb(),hT(),J(U.parenR)}function ew(){if(_b())return!1;switch(G.type){case U._function:{let e=Rb(1);X();let t=G.start;return RD(t,!0),zb(e),!0}case U._class:{let e=Rb(1);return BD(!0,!1),zb(e),!0}case U._const:if(Q(U._const)&&db(H._enum)){let e=Rb(1);return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),zb(e),!0}case U._var:case U._let:{let e=Rb(1);return DD(G.type!==U._var),zb(e),!0}case U.name:{let e=Rb(1),t=G.contextualKeyword,n=!1;return t===H._global?(YC(),n=!0):n=rw(t,!0),zb(e),n}default:return!1}}function tw(){return rw(G.contextualKeyword,!0)}function nw(e){switch(e){case H._declare:{let e=G.tokens.length-1;if(ew())return G.tokens[e].type=U._declare,!0;break}case H._global:if(Q(U.braceL))return qC(),!0;break;default:return rw(e,!1)}return!1}function rw(e,t){switch(e){case H._abstract:if(iw(t)&&Q(U._class))return G.tokens[G.tokens.length-1].type=U._abstract,BD(!0,!1),!0;break;case H._enum:if(iw(t)&&Q(U.name))return G.tokens[G.tokens.length-1].type=U._enum,KC(),!0;break;case H._interface:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return UC(),zb(e),!0}break;case H._module:if(iw(t)){if(Q(U.string)){let e=Rb(t?2:1);return YC(),zb(e),!0}else if(Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}}break;case H._namespace:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}break;case H._type:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return WC(),zb(e),!0}break;default:break}return!1}function iw(e){return e?(X(),!0):!_b()}function aw(){let e=G.snapshot();return $S(),zD(),jC(),J(U.arrow),G.error?(G.restoreFromSnapshot(e),!1):(NT(!0),!0)}function ow(){G.type===U.bitShiftL&&(--G.pos,Qb(U.lessThan)),sw()}function sw(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);e?(J(U.greaterThan),zb(e)):(zb(e),sx(),J(U.greaterThan),G.tokens[G.tokens.length-1].isType=!0)}function cw(){if(Q(U.name))switch(G.contextualKeyword){case H._abstract:case H._declare:case H._enum:case H._interface:case H._module:case H._namespace:case H._type:return!0;default:break}return!1}function lw(e,t){if(Q(U.colon)&&AC(U.colon),!Q(U.braceL)&&_b()){let t=G.tokens.length-1;for(;t>=0&&(G.tokens[t].start>=e||G.tokens[t].type===U._default||G.tokens[t].type===U._export);)G.tokens[t].isType=!0,t--;return}NT(!1,t)}function uw(e,t,n){if(!hb()&&Z(U.bang)){G.tokens[G.tokens.length-1].type=U.nonNullAssertion;return}if(Q(U.lessThan)||Q(U.bitShiftL)){let n=G.snapshot();if(!t&&sT()&&aw())return;if(ow(),!t&&Z(U.parenL)?(G.tokens[G.tokens.length-1].subscriptStartIndex=e,cT()):Q(U.backQuote)?CT():(G.type===U.greaterThan||G.type!==U.parenL&&G.type&U.IS_EXPRESSION_START&&!hb())&&yb(),G.error)G.restoreFromSnapshot(n);else return}else!t&&Q(U.questionDot)&&Vb()===U.lessThan&&(X(),G.tokens[e].isOptionalChainStart=!0,G.tokens[G.tokens.length-1].subscriptStartIndex=e,sw(),J(U.parenL),cT());oT(e,t,n)}function dw(){if(Z(U._import))return q(H._type)&&Vb()!==U.eq&&pb(H._type),XC(),!0;if(Z(U.eq))return qw(),vb(),!0;if(fb(H._as))return pb(H._namespace),$(),vb(),!0;if(q(H._type)){let e=Vb();(e===U.braceL||e===U.star)&&X()}return!1}function fw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function pw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function mw(){if(q(H._abstract)&&Vb()===U._class)return G.type=U._abstract,X(),BD(!0,!0),!0;if(q(H._interface)){let e=Rb(2);return rw(H._interface,!0),zb(e),!0}return!1}function hw(){if(G.type===U._const){let e=Ub();if(e.type===U.name&&e.contextualKeyword===H._enum)return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),!0}return!1}function gw(e){let t=G.tokens.length;US([H._abstract,H._readonly,H._declare,H._static,H._override]);let n=G.tokens.length;if(aC()){let r=e?t-1:t;for(let e=r;e<n;e++)G.tokens[e].isType=!0;return!0}return!1}function _w(e){nw(e)||vb()}function vw(){let e=fb(H._declare);e&&(G.tokens[G.tokens.length-1].type=U._declare);let t=!1;if(Q(U.name))if(e){let e=Rb(2);t=tw(),zb(e)}else t=tw();if(!t)if(e){let e=Rb(2);sD(!0),zb(e)}else sD(!0)}function yw(e){if(e&&(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),fb(H._implements)){G.tokens[G.tokens.length-1].type=U._implements;let e=Rb(1);VC(),zb(e)}}function bw(){QS()}function xw(){QS()}function Sw(){let e=Rb(0);hb()||Z(U.bang),MC(),zb(e)}function Cw(){Q(U.colon)&&FC()}function ww(e,t){return nb?Tw(e,t):Ew(e,t)}function Tw(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n);else return r;return G.type=U.typeParameterStart,$S(),r=Yw(e,t),r||yb(),r}function Ew(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot();$S();let r=Yw(e,t);if(r||yb(),G.error)G.restoreFromSnapshot(n);else return r;return Yw(e,t)}function Dw(){if(Q(U.colon)){let e=G.snapshot();AC(U.colon),mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(e)}return Z(U.arrow)}function Ow(){let e=Rb(0);Z(U.question),MC(),zb(e)}function kw(){(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),pD()}function Aw(){let e=!1,t=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated JSX contents`);return}let n=K.charCodeAt(G.pos);if(n===W.lessThan||n===W.leftCurlyBrace){if(G.pos===G.start){if(n===W.lessThan){G.pos++,Qb(U.jsxTagStart);return}ux(n);return}Qb(e&&!t?U.jsxEmptyText:U.jsxText);return}n===W.lineFeed?e=!0:n!==W.space&&n!==W.carriageReturn&&n!==W.tab&&(t=!0),G.pos++}}function jw(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}if(K.charCodeAt(G.pos)===e){G.pos++;break}G.pos++}Qb(U.string)}function Mw(){let e;do{if(G.pos>K.length){yb(`Unexpectedly reached the end of input.`);return}e=K.charCodeAt(++G.pos)}while(wb[e]||e===W.dash);Qb(U.jsxName)}function Nw(){Hw()}function Pw(e){if(Nw(),!Z(U.colon)){G.tokens[G.tokens.length-1].identifierRole=e;return}Nw()}function Fw(){let e=G.tokens.length;Pw(Y.Access);let t=!1;for(;Q(U.dot);)t=!0,Hw(),Nw();if(!t){let t=G.tokens[e],n=K.charCodeAt(t.start);n>=W.lowercaseA&&n<=W.lowercaseZ&&(t.identifierRole=null)}}function Iw(){switch(G.type){case U.braceL:X(),qw(),Hw();return;case U.jsxTagStart:Vw(),Hw();return;case U.string:Hw();return;default:yb(`JSX value should be either an expression or a quoted JSX text`)}}function Lw(){J(U.ellipsis),qw()}function Rw(e){if(Q(U.jsxTagEnd))return!1;Fw(),rb&&BC();let t=!1;for(;!Q(U.slash)&&!Q(U.jsxTagEnd)&&!G.error;){if(Z(U.braceL)){t=!0,J(U.ellipsis),Jw(),Hw();continue}t&&G.end-G.start===3&&K.charCodeAt(G.start)===W.lowercaseK&&K.charCodeAt(G.start+1)===W.lowercaseE&&K.charCodeAt(G.start+2)===W.lowercaseY&&(G.tokens[e].jsxRole=Ob.KeyAfterPropSpread),Pw(Y.ObjectKey),Q(U.eq)&&(Hw(),Iw())}let n=Q(U.slash);return n&&Hw(),n}function zw(){Q(U.jsxTagEnd)||Fw()}function Bw(){let e=G.tokens.length-1;G.tokens[e].jsxRole=Ob.NoChildren;let t=0;if(!Rw(e))for(Uw();;)switch(G.type){case U.jsxTagStart:if(Hw(),Q(U.slash)){Hw(),zw(),G.tokens[e].jsxRole!==Ob.KeyAfterPropSpread&&(t===1?G.tokens[e].jsxRole=Ob.OneChild:t>1&&(G.tokens[e].jsxRole=Ob.StaticChildren));return}t++,Bw(),Uw();break;case U.jsxText:t++,Uw();break;case U.jsxEmptyText:Uw();break;case U.braceL:X(),Q(U.ellipsis)?(Lw(),Uw(),t+=2):(Q(U.braceR)||(t++,qw()),Uw());break;default:yb();return}}function Vw(){Hw(),Bw()}function Hw(){G.tokens.push(new Fb),Zb(),G.start=G.pos;let e=K.charCodeAt(G.pos);if(Tb[e])Mw();else if(e===W.quotationMark||e===W.apostrophe)jw(e);else switch(++G.pos,e){case W.greaterThan:Qb(U.jsxTagEnd);break;case W.lessThan:Qb(U.jsxTagStart);break;case W.slash:Qb(U.slash);break;case W.equalsTo:Qb(U.eq);break;case W.leftCurlyBrace:Qb(U.braceL);break;case W.dot:Qb(U.dot);break;case W.colon:Qb(U.colon);break;default:yb()}}function Uw(){G.tokens.push(new Fb),G.start=G.pos,Aw()}function Ww(e){if(Q(U.question)){let e=Vb();if(e===U.colon||e===U.comma||e===U.parenR)return}Qw(e)}function Gw(){Bb(U.question),Q(U.colon)&&(rb?FC():ib&&AE())}var Kw=class{constructor(e){this.stop=e}};function qw(e=!1){if(Jw(e),Q(U.comma))for(;Z(U.comma);)Jw(e)}function Jw(e=!1,t=!1){return rb?ww(e,t):ib?QE(e,t):Yw(e,t)}function Yw(e,t){if(Q(U._yield))return LT(),!1;(Q(U.parenL)||Q(U.name)||Q(U._yield))&&(G.potentialArrowAt=G.start);let n=Xw(e);return t&&bT(),G.type&U.IS_ASSIGN?(X(),Jw(e),!1):n}function Xw(e){return $w(e)?!0:(Zw(e),!1)}function Zw(e){rb||ib?Ww(e):Qw(e)}function Qw(e){Z(U.question)&&(Jw(),J(U.colon),Jw(e))}function $w(e){let t=G.tokens.length;return tT()?!0:(eT(t,-1,e),!1)}function eT(e,t,n){if(rb&&(U._in&U.PRECEDENCE_MASK)>t&&!hb()&&(fb(H._as)||fb(H._satisfies))){let r=Rb(1);IC(),zb(r),sx(),eT(e,t,n);return}let r=G.type&U.PRECEDENCE_MASK;if(r>0&&(!n||!Q(U._in))&&r>t){let i=G.type;X(),i===U.nullishCoalescing&&(G.tokens[G.tokens.length-1].nullishStartIndex=e);let a=G.tokens.length;tT(),eT(a,i&U.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===U.nullishCoalescing&&(G.tokens[e].numNullishCoalesceStarts++,G.tokens[G.tokens.length-1].numNullishCoalesceEnds++),eT(e,t,n)}}function tT(){if(rb&&!nb&&Z(U.lessThan))return zC(),!1;if(q(H._module)&&Kb()===W.leftCurlyBrace&&!gb())return RT(),!1;if(G.type&U.IS_PREFIX)return X(),tT(),!1;if(nT())return!0;for(;G.type&U.IS_POSTFIX&&!mb();)G.type===U.preIncDec&&(G.type=U.postIncDec),X();return!1}function nT(){let e=G.tokens.length;return fT()?!0:(rT(e),G.tokens.length>e&&G.tokens[e].isOptionalChainStart&&(G.tokens[G.tokens.length-1].isOptionalChainEnd=!0),!1)}function rT(e,t=!1){ib?eD(e,t):iT(e,t)}function iT(e,t=!1){let n=new Kw(!1);do aT(e,t,n);while(!n.stop&&!G.error)}function aT(e,t,n){rb?uw(e,t,n):ib?PE(e,t,n):oT(e,t,n)}function oT(e,t,n){if(!t&&Z(U.doubleColon))dT(),n.stop=!0,rT(e,t);else if(Q(U.questionDot)){if(G.tokens[e].isOptionalChainStart=!0,t&&Vb()===U.parenL){n.stop=!0;return}X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e,Z(U.bracketL)?(qw(),J(U.bracketR)):Z(U.parenL)?cT():pT()}else if(Z(U.dot))G.tokens[G.tokens.length-1].subscriptStartIndex=e,pT();else if(Z(U.bracketL))G.tokens[G.tokens.length-1].subscriptStartIndex=e,qw(),J(U.bracketR);else if(!t&&Q(U.parenL))if(sT()){let t=G.snapshot(),r=G.tokens.length;X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let i=ob();G.tokens[G.tokens.length-1].contextId=i,cT(),G.tokens[G.tokens.length-1].contextId=i,lT()&&(G.restoreFromSnapshot(t),n.stop=!0,G.scopeDepth++,zD(),uT(r))}else{X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let t=ob();G.tokens[G.tokens.length-1].contextId=t,cT(),G.tokens[G.tokens.length-1].contextId=t}else Q(U.backQuote)?CT():n.stop=!0}function sT(){return G.tokens[G.tokens.length-1].contextualKeyword===H._async&&!mb()}function cT(){let e=!0;for(;!Z(U.parenR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.parenR))break;FT(!1)}}function lT(){return Q(U.colon)||Q(U.arrow)}function uT(e){rb?Cw():ib&&ZE(),J(U.arrow),jT(e)}function dT(){let e=G.tokens.length;fT(),rT(e,!0)}function fT(){if(Z(U.modulo))return $(),!1;if(Q(U.jsxText)||Q(U.jsxEmptyText))return hT(),!1;if(Q(U.lessThan)&&nb)return G.type=U.jsxTagStart,Vw(),X(),!1;let e=G.potentialArrowAt===G.start;switch(G.type){case U.slash:case U.assign:Lb();case U._super:case U._this:case U.regexp:case U.num:case U.bigint:case U.decimal:case U.string:case U._null:case U._true:case U._false:return X(),!1;case U._import:return X(),Q(U.dot)&&(G.tokens[G.tokens.length-1].type=U.name,X(),$()),!1;case U.name:{let t=G.tokens.length,n=G.start,r=G.contextualKeyword;return $(),r===H._await?(IT(),!1):r===H._async&&Q(U._function)&&!mb()?(X(),RD(n,!1),!1):e&&r===H._async&&!mb()&&Q(U.name)?(G.scopeDepth++,MS(!1),J(U.arrow),jT(t),!0):Q(U._do)&&!mb()?(X(),MD(),!1):e&&!mb()&&Q(U.arrow)?(G.scopeDepth++,PS(!1),J(U.arrow),jT(t),!0):(G.tokens[G.tokens.length-1].identifierRole=Y.Access,!1)}case U._do:return X(),MD(),!1;case U.parenL:return _T(e);case U.bracketL:return X(),PT(U.bracketR,!0),!1;case U.braceL:return wT(!1,!1),!1;case U._function:return mT(),!1;case U.at:uD();case U._class:return BD(!1),!1;case U._new:return xT(),!1;case U.backQuote:return CT(),!1;case U.doubleColon:return X(),dT(),!1;case U.hash:{let e=Kb();return Tb[e]||e===W.backslash?pT():X(),!1}default:return yb(),!1}}function pT(){Z(U.hash),$()}function mT(){let e=G.start;$(),Z(U.dot)&&$(),RD(e,!1)}function hT(){X()}function gT(){J(U.parenL),qw(),J(U.parenR)}function _T(e){let t=G.snapshot(),n=G.tokens.length;J(U.parenL);let r=!0;for(;!Q(U.parenR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Q(U.parenR))break;if(Q(U.ellipsis)){jS(!1),bT();break}else Jw(!1,!0)}return J(U.parenR),e&&vT()&&yT()?(G.restoreFromSnapshot(t),G.scopeDepth++,zD(),yT(),jT(n),G.error?(G.restoreFromSnapshot(t),_T(!1),!1):!0):!1}function vT(){return Q(U.colon)||!mb()}function yT(){return rb?Dw():ib?$E():Z(U.arrow)}function bT(){(rb||ib)&&Gw()}function xT(){if(J(U._new),Z(U.dot)){$();return}ST(),ib&&FE(),Z(U.parenL)&&PT(U.parenR)}function ST(){dT(),Z(U.questionDot)}function CT(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),qw(),Ib(),Ib();X()}function wT(e,t){let n=ob(),r=!0;for(X(),G.tokens[G.tokens.length-1].contextId=n;!Z(U.braceR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Z(U.braceR))break;let i=!1;if(Q(U.ellipsis)){let n=G.tokens.length;if(AS(),e&&(G.tokens.length===n+2&&PS(t),Z(U.braceR)))break;continue}e||(i=Z(U.star)),!e&&q(H._async)?(i&&yb(),$(),Q(U.colon)||Q(U.parenL)||Q(U.braceR)||Q(U.eq)||Q(U.comma)||(Q(U.star)&&(X(),i=!0),kT(n))):kT(n),OT(e,t,n)}G.tokens[G.tokens.length-1].contextId=n}function TT(e){return!e&&(Q(U.string)||Q(U.num)||Q(U.bracketL)||Q(U.name)||!!(G.type&U.IS_KEYWORD))}function ET(e,t){let n=G.start;return Q(U.parenL)?(e&&yb(),AT(n,!1),!0):TT(e)?(kT(t),AT(n,!1),!0):!1}function DT(e,t){if(Z(U.colon)){e?zS(t):Jw(!1);return}let n;n=e?G.scopeDepth===0?Y.ObjectShorthandTopLevelDeclaration:t?Y.ObjectShorthandBlockScopedDeclaration:Y.ObjectShorthandFunctionScopedDeclaration:Y.ObjectShorthand,G.tokens[G.tokens.length-1].identifierRole=n,zS(t,!0)}function OT(e,t,n){rb?bw():ib&&GE(),ET(e,n)||DT(e,t)}function kT(e){ib&&ME(),Z(U.bracketL)?(G.tokens[G.tokens.length-1].contextId=e,Jw(),J(U.bracketR),G.tokens[G.tokens.length-1].contextId=e):(Q(U.num)||Q(U.string)||Q(U.bigint)||Q(U.decimal)?fT():pT(),G.tokens[G.tokens.length-1].identifierRole=Y.ObjectKey,G.tokens[G.tokens.length-1].contextId=e)}function AT(e,t){let n=ob();G.scopeDepth++;let r=G.tokens.length;zD(t,n),MT(e,n);let i=G.tokens.length;G.scopes.push(new $y(r,i,!0)),G.scopeDepth--}function jT(e){NT(!0);let t=G.tokens.length;G.scopes.push(new $y(e,t,!0)),G.scopeDepth--}function MT(e,t=0){rb?lw(e,t):ib?NE(t):NT(!1,t)}function NT(e,t=0){e&&!Q(U.braceL)?Jw():MD(!0,t)}function PT(e,t=!1){let n=!0;for(;!Z(e)&&!G.error;){if(n)n=!1;else if(J(U.comma),Z(e))break;FT(t)}}function FT(e){e&&Q(U.comma)||(Q(U.ellipsis)?(AS(),bT()):Q(U.question)?X():Jw(!1,!0))}function $(){X(),G.tokens[G.tokens.length-1].type=U.name}function IT(){tT()}function LT(){X(),!Q(U.semi)&&!mb()&&(Z(U.star),Jw())}function RT(){pb(H._module),J(U.braceL),ND(U.braceR)}function zT(e){return(e.type===U.name||!!(e.type&U.IS_KEYWORD))&&e.contextualKeyword!==H._from}function BT(e){let t=Rb(0);J(e||U.colon),kE(),zb(t)}function VT(){J(U.modulo),pb(H._checks),Z(U.parenL)&&(qw(),J(U.parenR))}function HT(){let e=Rb(0);J(U.colon),Q(U.modulo)?VT():(kE(),Q(U.modulo)&&VT()),zb(e)}function UT(){X(),$T(!0)}function WT(){X(),$(),Q(U.lessThan)&&oE(),J(U.parenL),SE(),J(U.parenR),HT(),vb()}function GT(){Q(U._class)?UT():Q(U._function)?WT():Q(U._var)?KT():fb(H._module)?Z(U.dot)?YT():qT():q(H._type)?XT():q(H._opaque)?ZT():q(H._interface)?QT():Q(U._export)?JT():yb()}function KT(){X(),jE(),vb()}function qT(){for(Q(U.string)?fT():$(),J(U.braceL);!Q(U.braceR)&&!G.error;)Q(U._import)?(X(),pO()):yb();J(U.braceR)}function JT(){J(U._export),Z(U._default)?Q(U._function)||Q(U._class)?GT():(kE(),vb()):Q(U._var)||Q(U._function)||Q(U._class)||q(H._opaque)?GT():Q(U.star)||Q(U.braceL)||q(H._interface)||q(H._type)||q(H._opaque)?QD():yb()}function YT(){pb(H._exports),AE(),vb()}function XT(){X(),rE()}function ZT(){X(),iE(!0)}function QT(){X(),$T()}function $T(e=!1){if(nE(),Q(U.lessThan)&&oE(),Z(U._extends))do eE();while(!e&&Z(U.comma));if(q(H._mixins)){X();do eE();while(Z(U.comma))}if(q(H._implements)){X();do eE();while(Z(U.comma))}mE(e,!1,e)}function eE(){_E(!1),Q(U.lessThan)&&sE()}function tE(){$T()}function nE(){$()}function rE(){nE(),Q(U.lessThan)&&oE(),BT(U.eq),vb()}function iE(e){pb(H._type),nE(),Q(U.lessThan)&&oE(),Q(U.colon)&&BT(U.colon),e||BT(U.eq),vb()}function aE(){ME(),jE(),Z(U.eq)&&kE()}function oE(){let e=Rb(0);Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();do aE(),Q(U.greaterThan)||J(U.comma);while(!Q(U.greaterThan)&&!G.error);J(U.greaterThan),zb(e)}function sE(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)kE(),Q(U.greaterThan)||J(U.comma);J(U.greaterThan),zb(e)}function cE(){if(pb(H._interface),Z(U._extends))do eE();while(Z(U.comma));mE(!1,!1,!1)}function lE(){Q(U.num)||Q(U.string)?fT():$()}function uE(){Vb()===U.colon?(lE(),BT()):kE(),J(U.bracketR),BT()}function dE(){lE(),J(U.bracketR),J(U.bracketR),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function fE(){for(Q(U.lessThan)&&oE(),J(U.parenL);!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE(),J(U.parenR),BT()}function pE(){fE()}function mE(e,t,n){let r;for(t&&Q(U.braceBarL)?(J(U.braceBarL),r=U.braceBarR):(J(U.braceL),r=U.braceR);!Q(r)&&!G.error;){if(n&&q(H._proto)){let t=Vb();t!==U.colon&&t!==U.question&&(X(),e=!1)}if(e&&q(H._static)){let e=Vb();e!==U.colon&&e!==U.question&&X()}if(ME(),Z(U.bracketL))Z(U.bracketL)?dE():uE();else if(Q(U.parenL)||Q(U.lessThan))pE();else{if(q(H._get)||q(H._set)){let e=Vb();(e===U.name||e===U.string||e===U.num)&&X()}hE()}gE()}J(r)}function hE(){if(Q(U.ellipsis)){if(J(U.ellipsis),Z(U.comma)||Z(U.semi),Q(U.braceR))return;kE()}else lE(),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function gE(){!Z(U.semi)&&!Z(U.comma)&&!Q(U.braceR)&&!Q(U.braceBarR)&&yb()}function _E(e){for(e||$();Z(U.dot);)$()}function vE(){_E(!0),Q(U.lessThan)&&sE()}function yE(){J(U._typeof),CE()}function bE(){for(J(U.bracketL);G.pos<K.length&&!Q(U.bracketR)&&(kE(),!Q(U.bracketR));)J(U.comma);J(U.bracketR)}function xE(){let e=Vb();e===U.colon||e===U.question?($(),Z(U.question),BT()):kE()}function SE(){for(;!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE()}function CE(){let e=!1,t=G.noAnonFunctionType;switch(G.type){case U.name:if(q(H._interface)){cE();return}$(),vE();return;case U.braceL:mE(!1,!1,!1);return;case U.braceBarL:mE(!1,!0,!1);return;case U.bracketL:bE();return;case U.lessThan:oE(),J(U.parenL),SE(),J(U.parenR),J(U.arrow),kE();return;case U.parenL:if(X(),!Q(U.parenR)&&!Q(U.ellipsis))if(Q(U.name)){let t=Vb();e=t!==U.question&&t!==U.colon}else e=!0;if(e)if(G.noAnonFunctionType=!1,kE(),G.noAnonFunctionType=t,G.noAnonFunctionType||!(Q(U.comma)||Q(U.parenR)&&Vb()===U.arrow)){J(U.parenR);return}else Z(U.comma);SE(),J(U.parenR),J(U.arrow),kE();return;case U.minus:X(),hT();return;case U.string:case U.num:case U._true:case U._false:case U._null:case U._this:case U._void:case U.star:X();return;default:if(G.type===U._typeof){yE();return}else if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}}yb()}function wE(){for(CE();!mb()&&(Q(U.bracketL)||Q(U.questionDot));)Z(U.questionDot),J(U.bracketL),Z(U.bracketR)||(kE(),J(U.bracketR))}function TE(){Z(U.question)?TE():wE()}function EE(){TE(),!G.noAnonFunctionType&&Z(U.arrow)&&kE()}function DE(){for(Z(U.bitwiseAND),EE();Z(U.bitwiseAND);)EE()}function OE(){for(Z(U.bitwiseOR),DE();Z(U.bitwiseOR);)DE()}function kE(){OE()}function AE(){BT()}function jE(){$(),Q(U.colon)&&AE()}function ME(){(Q(U.plus)||Q(U.minus))&&(X(),G.tokens[G.tokens.length-1].isType=!0)}function NE(e){Q(U.colon)&&HT(),NT(!1,e)}function PE(e,t,n){if(Q(U.questionDot)&&Vb()===U.lessThan){if(t){n.stop=!0;return}X(),sE(),J(U.parenL),cT();return}else if(!t&&Q(U.lessThan)){let e=G.snapshot();if(sE(),J(U.parenL),cT(),G.error)G.restoreFromSnapshot(e);else return}oT(e,t,n)}function FE(){if(Q(U.lessThan)){let e=G.snapshot();sE(),G.error&&G.restoreFromSnapshot(e)}}function IE(){if(Q(U.name)&&G.contextualKeyword===H._interface){let e=Rb(0);return X(),tE(),zb(e),!0}else if(q(H._enum))return nD(),!0;return!1}function LE(){return q(H._enum)?(nD(),!0):!1}function RE(e){if(e===H._declare){if(Q(U._class)||Q(U.name)||Q(U._function)||Q(U._var)||Q(U._export)){let e=Rb(1);GT(),zb(e)}}else if(Q(U.name)){if(e===H._interface){let e=Rb(1);tE(),zb(e)}else if(e===H._type){let e=Rb(1);rE(),zb(e)}else if(e===H._opaque){let e=Rb(1);iE(!1),zb(e)}}vb()}function zE(){return q(H._type)||q(H._interface)||q(H._opaque)||q(H._enum)}function BE(){return Q(U.name)&&(G.contextualKeyword===H._type||G.contextualKeyword===H._interface||G.contextualKeyword===H._opaque||G.contextualKeyword===H._enum)}function VE(){if(q(H._type)){let e=Rb(1);X(),Q(U.braceL)?(lO(),rO()):rE(),zb(e)}else if(q(H._opaque)){let e=Rb(1);X(),iE(!1),zb(e)}else if(q(H._interface)){let e=Rb(1);X(),tE(),zb(e)}else sD(!0)}function HE(){return Q(U.star)||q(H._type)&&Vb()===U.star}function UE(){if(fb(H._type)){let e=Rb(2);oO(),zb(e)}else oO()}function WE(e){if(e&&Q(U.lessThan)&&sE(),q(H._implements)){let e=Rb(0);X(),G.tokens[G.tokens.length-1].type=U._implements;do nE(),Q(U.lessThan)&&sE();while(Z(U.comma));zb(e)}}function GE(){Q(U.lessThan)&&(oE(),Q(U.parenL)||yb())}function KE(){let e=Rb(0);Z(U.question),Q(U.colon)&&AE(),zb(e)}function qE(){if(Q(U._typeof)||q(H._type)){let e=Ub();(zT(e)||e.type===U.braceL||e.type===U.star)&&X()}}function JE(){let e=G.contextualKeyword===H._type||G.type===U._typeof;e?X():$(),q(H._as)&&!db(H._as)?($(),e&&!Q(U.name)&&!(G.type&U.IS_KEYWORD)||$()):(e&&(Q(U.name)||G.type&U.IS_KEYWORD)&&$(),fb(H._as)&&$())}function YE(){if(Q(U.lessThan)){let e=Rb(0);oE(),zb(e)}}function XE(){Q(U.colon)&&AE()}function ZE(){if(Q(U.colon)){let e=G.noAnonFunctionType;G.noAnonFunctionType=!0,AE(),G.noAnonFunctionType=e}}function QE(e,t){if(Q(U.lessThan)){let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n),G.type=U.typeParameterStart;else return r;let i=Rb(0);if(oE(),zb(i),r=Yw(e,t),r)return!0;yb()}return Yw(e,t)}function $E(){if(Q(U.colon)){let e=Rb(0),t=G.snapshot(),n=G.noAnonFunctionType;G.noAnonFunctionType=!0,HT(),G.noAnonFunctionType=n,mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(t),zb(e)}return Z(U.arrow)}function eD(e,t=!1){if(G.tokens[G.tokens.length-1].contextualKeyword===H._async&&Q(U.lessThan)){let e=G.snapshot();if(tD()&&!G.error)return;G.restoreFromSnapshot(e)}iT(e,t)}function tD(){G.scopeDepth++;let e=G.tokens.length;return zD(),yT()?(jT(e),!0):!1}function nD(){pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,$(),rD()}function rD(){fb(H._of)&&X(),J(U.braceL),iD(),J(U.braceR)}function iD(){for(;!Q(U.braceR)&&!G.error&&!Z(U.ellipsis);)aD(),Q(U.braceR)||J(U.comma)}function aD(){$(),Z(U.eq)&&X()}function oD(){if(ND(U.eof),G.scopes.push(new $y(0,G.tokens.length,!0)),G.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${G.scopeDepth}`);return new bO(G.tokens,G.scopes)}function sD(e){ib&&IE()||(Q(U.at)&&uD(),cD(e))}function cD(e){if(rb&&hw())return;let t=G.type;switch(t){case U._break:case U._continue:mD();return;case U._debugger:hD();return;case U._do:gD();return;case U._for:_D();return;case U._function:if(Vb()===U.dot)break;e||yb(),bD();return;case U._class:e||yb(),BD(!0);return;case U._if:xD();return;case U._return:SD();return;case U._switch:CD();return;case U._throw:wD();return;case U._try:ED();return;case U._let:case U._const:e||yb();case U._var:DD(t!==U._var);return;case U._while:OD();return;case U.braceL:MD();return;case U.semi:kD();return;case U._export:case U._import:{let e=Vb();if(e===U.parenL||e===U.dot)break;X(),t===U._import?pO():QD();return}case U.name:if(G.contextualKeyword===H._async){let e=G.start,t=G.snapshot();if(X(),Q(U._function)&&!mb()){J(U._function),RD(e,!0);return}else G.restoreFromSnapshot(t)}else if(G.contextualKeyword===H._using&&!gb()&&Vb()===U.name){DD(!0);return}else if(lD()){pb(H._await),DD(!0);return}default:break}let n=G.tokens.length;qw();let r=null;if(G.tokens.length===n+1){let e=G.tokens[G.tokens.length-1];e.type===U.name&&(r=e.contextualKeyword)}if(r==null){vb();return}Z(U.colon)?AD():jD(r)}function lD(){if(!q(H._await))return!1;let e=G.snapshot();return X(),!q(H._using)||hb()||(X(),!Q(U.name)||hb())?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function uD(){for(;Q(U.at);)dD()}function dD(){if(X(),Z(U.parenL))qw(),J(U.parenR);else{for($();Z(U.dot);)$();fD()}}function fD(){rb?kw():pD()}function pD(){Z(U.parenL)&&cT()}function mD(){X(),_b()||($(),vb())}function hD(){X(),vb()}function gD(){X(),sD(!1),J(U._while),gT(),Z(U.semi)}function _D(){G.scopeDepth++;let e=G.tokens.length;yD();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function vD(){return!(!q(H._using)||db(H._of))}function yD(){X();let e=!1;if(q(H._await)&&(e=!0,X()),J(U.parenL),Q(U.semi)){e&&yb(),PD();return}let t=lD();if(t||Q(U._var)||Q(U._let)||Q(U._const)||vD()){if(t&&pb(H._await),X(),ID(!0,G.type!==U._var),Q(U._in)||q(H._of)){FD(e);return}PD();return}if(qw(!0),Q(U._in)||q(H._of)){FD(e);return}e&&yb(),PD()}function bD(){let e=G.start;X(),RD(e,!0)}function xD(){X(),gT(),sD(!1),Z(U._else)&&sD(!1)}function SD(){X(),_b()||(qw(),vb())}function CD(){X(),gT(),G.scopeDepth++;let e=G.tokens.length;for(J(U.braceL);!Q(U.braceR)&&!G.error;)if(Q(U._case)||Q(U._default)){let e=Q(U._case);X(),e&&qw(),J(U.colon)}else sD(!0);X();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function wD(){X(),qw(),vb()}function TD(){FS(!0),rb&&MC()}function ED(){if(X(),MD(),Q(U._catch)){X();let e=null;if(Q(U.parenL)&&(G.scopeDepth++,e=G.tokens.length,J(U.parenL),TD(),J(U.parenR)),MD(),e!=null){let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}}Z(U._finally)&&MD()}function DD(e){X(),ID(!1,e),vb()}function OD(){X(),gT(),sD(!1)}function kD(){X()}function AD(){sD(!0)}function jD(e){rb?_w(e):ib?RE(e):vb()}function MD(e=!1,t=0){let n=G.tokens.length;G.scopeDepth++,J(U.braceL),t&&(G.tokens[G.tokens.length-1].contextId=t),ND(U.braceR),t&&(G.tokens[G.tokens.length-1].contextId=t);let r=G.tokens.length;G.scopes.push(new $y(n,r,e)),G.scopeDepth--}function ND(e){for(;!Z(e)&&!G.error;)sD(!0)}function PD(){J(U.semi),Q(U.semi)||qw(),J(U.semi),Q(U.parenR)||qw(),J(U.parenR),sD(!1)}function FD(e){e?fb(H._of):X(),qw(),J(U.parenR),sD(!1)}function ID(e,t){for(;;){if(LD(t),Z(U.eq)){let t=G.tokens.length-1;Jw(e),G.tokens[t].rhsEndIndex=G.tokens.length}if(!Z(U.comma))break}}function LD(e){FS(e),rb?Sw():ib&&XE()}function RD(e,t,n=!1){Q(U.star)&&X(),t&&!n&&!Q(U.name)&&!Q(U._yield)&&yb();let r=null;Q(U.name)&&(t||(r=G.tokens.length,G.scopeDepth++),MS(!1));let i=G.tokens.length;G.scopeDepth++,zD(),MT(e);let a=G.tokens.length;G.scopes.push(new $y(i,a,!0)),G.scopeDepth--,r!==null&&(G.scopes.push(new $y(r,a,!0)),G.scopeDepth--)}function zD(e=!1,t=0){rb?xw():ib&&YE(),J(U.parenL),t&&(G.tokens[G.tokens.length-1].contextId=t),IS(U.parenR,!1,!1,e,t),t&&(G.tokens[G.tokens.length-1].contextId=t)}function BD(e,t=!1){let n=ob();X(),G.tokens[G.tokens.length-1].contextId=n,G.tokens[G.tokens.length-1].isExpression=!e;let r=null;e||(r=G.tokens.length,G.scopeDepth++),XD(e,t),ZD();let i=G.tokens.length;if(UD(n),!G.error&&(G.tokens[i].contextId=n,G.tokens[G.tokens.length-1].contextId=n,r!==null)){let e=G.tokens.length;G.scopes.push(new $y(r,e,!1)),G.scopeDepth--}}function VD(){return Q(U.eq)||Q(U.semi)||Q(U.braceR)||Q(U.bang)||Q(U.colon)}function HD(){return Q(U.parenL)||Q(U.lessThan)}function UD(e){for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(Z(U.semi))continue;if(Q(U.at)){dD();continue}let t=G.start;WD(t,e)}}function WD(e,t){rb&&US([H._declare,H._public,H._protected,H._private,H._override]);let n=!1;if(Q(U.name)&&G.contextualKeyword===H._static){if($(),HD()){KD(e,!1);return}else if(VD()){YD();return}if(G.tokens[G.tokens.length-1].type=U._static,n=!0,Q(U.braceL)){G.tokens[G.tokens.length-1].contextId=t,MD();return}}GD(e,n,t)}function GD(e,t,n){if(rb&&gw(t))return;if(Z(U.star)){qD(n),KD(e,!1);return}qD(n);let r=!1,i=G.tokens[G.tokens.length-1];i.contextualKeyword===H._constructor&&(r=!0),JD(),HD()?KD(e,r):VD()?YD():i.contextualKeyword===H._async&&!_b()?(G.tokens[G.tokens.length-1].type=U._async,Q(U.star)&&X(),qD(n),JD(),KD(e,!1)):(i.contextualKeyword===H._get||i.contextualKeyword===H._set)&&!(_b()&&Q(U.star))?(i.contextualKeyword===H._get?G.tokens[G.tokens.length-1].type=U._get:G.tokens[G.tokens.length-1].type=U._set,qD(n),KD(e,!1)):i.contextualKeyword===H._accessor&&!_b()?(qD(n),YD()):_b()?YD():yb()}function KD(e,t){rb?QS():ib&&Q(U.lessThan)&&oE(),AT(e,t)}function qD(e){kT(e)}function JD(){if(rb){let e=Rb(0);Z(U.question),zb(e)}}function YD(){if(rb?(Bb(U.bang),MC()):ib&&Q(U.colon)&&AE(),Q(U.eq)){let e=G.tokens.length;X(),Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}vb()}function XD(e,t=!1){rb&&(!e||t)&&q(H._implements)||(Q(U.name)&&MS(!0),rb?QS():ib&&Q(U.lessThan)&&oE())}function ZD(){let e=!1;Z(U._extends)?(nT(),e=!0):e=!1,rb?yw(e):ib&&WE(e)}function QD(){let e=G.tokens.length-1;rb&&dw()||(iO()?aO():tO()?($(),Q(U.comma)&&Vb()===U.star?(J(U.comma),J(U.star),pb(H._as),$()):nO(),rO()):Z(U._default)?$D():cO()?eO():(lO(),rO()),G.tokens[e].rhsEndIndex=G.tokens.length)}function $D(){if(rb&&mw()||ib&&LE())return;let e=G.start;Z(U._function)?RD(e,!0,!0):q(H._async)&&Vb()===U._function?(fb(H._async),Z(U._function),RD(e,!0,!0)):Q(U._class)?BD(!0,!0):Q(U.at)?(uD(),BD(!0,!0)):(Jw(),vb())}function eO(){rb?vw():ib?VE():sD(!0)}function tO(){if(rb&&cw()||ib&&BE())return!1;if(Q(U.name))return G.contextualKeyword!==H._async;if(!Q(U._default))return!1;let e=Wb(),t=Ub(),n=t.type===U.name&&t.contextualKeyword===H._from;if(t.type===U.comma)return!0;if(n){let t=K.charCodeAt(Gb(e+4));return t===W.quotationMark||t===W.apostrophe}return!1}function nO(){Z(U.comma)&&lO()}function rO(){fb(H._from)&&(fT(),vO()),vb()}function iO(){return ib?HE():Q(U.star)}function aO(){ib?UE():oO()}function oO(){J(U.star),q(H._as)?sO():rO()}function sO(){X(),G.tokens[G.tokens.length-1].type=U._as,$(),nO(),rO()}function cO(){return rb&&cw()||ib&&zE()||G.type===U._var||G.type===U._const||G.type===U._let||G.type===U._function||G.type===U._class||q(H._async)||Q(U.at)}function lO(){let e=!0;for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.braceR))break;uO()}}function uO(){if(rb){pw();return}$(),G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,fb(H._as)&&$()}function dO(){let e=G.snapshot();return pb(H._module),fb(H._from)?q(H._from)?(G.restoreFromSnapshot(e),!0):(G.restoreFromSnapshot(e),!1):Q(U.comma)?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function fO(){q(H._module)&&dO()&&X()}function pO(){if(rb&&Q(U.name)&&Vb()===U.eq){XC();return}if(rb&&q(H._type)){let e=Ub();if(e.type===U.name&&e.contextualKeyword!==H._from){if(pb(H._type),Vb()===U.eq){XC();return}}else(e.type===U.star||e.type===U.braceL)&&pb(H._type)}Q(U.string)?fT():(fO(),gO(),pb(H._from),fT()),vO(),vb()}function mO(){return Q(U.name)}function hO(){NS()}function gO(){ib&&qE();let e=!0;if(!(mO()&&(hO(),!Z(U.comma)))){if(Q(U.star)){X(),pb(H._as),hO();return}for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(Z(U.colon)&&yb(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),J(U.comma),Z(U.braceR))break;_O()}}}function _O(){if(rb){fw();return}if(ib){JE();return}NS(),q(H._as)&&(G.tokens[G.tokens.length-1].identifierRole=Y.ImportAccess,X(),NS())}function vO(){(Q(U._with)||q(H._assert)&&!hb())&&(X(),wT(!1,!1))}function yO(){return G.pos===0&&K.charCodeAt(0)===W.numberSign&&K.charCodeAt(1)===W.exclamationMark&&Xb(2),qb(),oD()}var bO=class{constructor(e,t){this.tokens=e,this.scopes=t}};function xO(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);ub(e,t,n,r);let i=yO();if(G.error)throw sb(G.error);return i}function SO(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===H._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var CO=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,U.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(U.braceL))e++;else if(this.matches1(U.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=SO(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===U._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function wO(e,t,n,r){let i=t.snapshot(),a=EO(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(U.braceR,f);)if(t.matchesContextual(H._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));else if(t.matches1(U.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;OO(t.currentToken());)t.matches1(U._static)&&(a=!0),t.matches1(U.hash)&&(p=!0),(t.matches1(U._declare)||t.matches1(U._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(U.braceL)){TO(t,f);continue}if(p){TO(t,f);continue}if(t.matchesContextual(H._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));continue}let h=t.currentIndex();if(kO(t),t.matches1(U.lessThan)||t.matches1(U.parenL)){TO(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(U.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function TO(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;OO(e.tokenAtRelativeIndex(-1));)e.previousToken()}function EO(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(U.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(U.braceL,n);)e.matches1(U._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function DO(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(U.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),OO(e.currentToken())){for(e.nextToken();OO(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==U.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(U.braceR,n);){if(!i&&e.matches2(U._super,U.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(U.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function OO(e){return[U._async,U._get,U._set,U.plus,U.minus,U._readonly,U._static,U._public,U._private,U._protected,U._override,U._abstract,U.star,U._declare,U.hash].includes(e.type)}function kO(e){if(e.matches1(U.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(U.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function AO(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(U.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(U.dot);)e.removeToken(),e.removeToken()}var jO={typeDeclarations:new Set,valueDeclarations:new Set};function MO(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===U.name&&jb(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function NO(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,U.braceR);)t++;return e.matchesContextualAtIndex(t+1,H._from)&&e.matches1AtIndex(t+2,U.string)}function PO(e){(e.matches2(U._with,U.braceL)||e.matches2(U.name,U.braceL)&&e.matchesContextual(H._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function FO(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,U.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==U.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var IO=class e extends wx{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?MO(n):jO}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`\nmodule.exports = exports.default;\n`:``}process(){return this.tokens.matches3(U._import,U.name,U.eq)?this.processImportEquals():this.tokens.matches1(U._import)?(this.processImport(),!0):this.tokens.matches2(U._export,U.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(U._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(U.name,U.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(U.name)||this.tokens.matches1(U.jsxName)?this.processIdentifier():this.tokens.matches1(U.eq)?this.processAssignment():this.tokens.matches1(U.assign)?this.processComplexAssignment():this.tokens.matches1(U.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(U.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`);return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(U.name)||this.tokens.matches1(U.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(U.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(U.string);)(!e&&this.tokens.matches1(U.braceL)||this.tokens.matches1(U.comma))&&(this.tokens.removeToken(),this.tokens.matches1(U.braceR)||(t=!0),(this.tokens.matches2(U.name,U.comma)||this.tokens.matches2(U.name,U.braceR)||this.tokens.matches4(U.name,U.name,U.name,U.comma)||this.tokens.matches4(U.name,U.name,U.name,U.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(U.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===Y.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==Y.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===U.parenR;)n++;return this.tokens.tokens[n].type===U.parenL?this.tokens.tokenAtRelativeIndex(1).type===U.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==U._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(U._export,U._default))return this.tokens.matches3(U._export,U._default,U._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(U._export,U.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(U._export,U._var)||this.tokens.matches2(U._export,U._let)||this.tokens.matches2(U._export,U._const))return this.processExportVar(),!0;if(this.tokens.matches2(U._export,U._function)||this.tokens.matches3(U._export,U.name,U._function))return this.processExportFunction(),!0;if(this.tokens.matches2(U._export,U._class)||this.tokens.matches3(U._export,U._abstract,U._class)||this.tokens.matches2(U._export,U.at))return this.processExportClass(),!0;if(this.tokens.matches2(U._export,U.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot)||e>=2&&[U._var,U._let,U._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,U.dot)||this.tokens.matches1AtIndex(e+2,U.bracketL)||this.tokens.matches1AtIndex(e+2,U.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,U.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name)||this.tokens.matches3(U._export,U._default,U.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(U.at);)if(this.tokens.copyToken(),this.tokens.matches1(U.parenL))this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR);else{for(this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.dot);)this.tokens.copyExpectedToken(U.dot),this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.parenL)&&(this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,U.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,U.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(U.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(U.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL)||this.tokens.matches1(U.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(U.braceR)||this.tokens.matches1(U.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(U.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(kb(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \\`export var\\` syntax.`);Pb(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(U._function))this.tokens.copyToken();else if(this.tokens.matches2(U.name,U._function)){if(!this.tokens.matchesContextual(H._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(U.star)&&this.tokens.copyToken(),!this.tokens.matches1(U.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(U.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=NO(this.tokens),t=[];for(;;){if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}let n=yx(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(U.comma,U.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(U.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(H._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(U.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(U.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},LO=class extends wx{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?Nx(e,s):new Set,this.declarationInfo=i&&!o?MO(e):jO,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(U._import,U.name,U.eq))return this.processImportEquals();if(this.tokens.matches4(U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(U._export,U.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(U._export,U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(U._import))return this.processImport();if(this.tokens.matches2(U._export,U._default))return this.processExportDefault();if(this.tokens.matches2(U._export,U.braceL))return this.processNamedExports();if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(U.string);)this.tokens.removeToken();this.tokens.removeToken(),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(U._import),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return!0;if(this.tokens.matches1(U.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(H._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(U.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(U.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(U.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(U.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(U.star),this.tokens.copyExpectedToken(U.name),this.tokens.copyExpectedToken(U.name));else if(this.tokens.matches1(U.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(U.braceR);){t=!0;let n=yx(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(U.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)||this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(U._export),this.tokens.copyExpectedToken(U.braceL);let e=NO(this.tokens),t=!1;for(;!this.tokens.matches1(U.braceR);){let n=yx(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(U.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},RO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(U._export,U._default,U._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(U.name);let e=!1;this.tokens.matchesContextual(H._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(H._symbol),this.tokens.removeToken());let t=this.tokens.matches3(U.braceL,U.name,U.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(U.braceR);){if(this.tokens.matches1(U.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(U.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function zO(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var BO=`jest`,VO=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],HO=class e extends wx{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(U.name,U.dot,U.name,U.parenL)&&this.tokens.identifierName()===BO?!zO([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(BO)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(U.dot,U.name,U.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(VO.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),e=!0}return!0}},UO=class extends wx{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(U.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},WO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(U._catch,U.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},GO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(U.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(U._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==U._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,U._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(U.questionDot,U.parenL)||this.tokens.matches2(U.questionDot,U.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalCall\', ${n}`);else if(this.tokens.matches2(U.questionDot,U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}`);else if(this.tokens.matches1(U.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}.`);else if(this.tokens.matches1(U.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}.`);else if(this.tokens.matches1(U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}[`);else if(this.tokens.matches1(U.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'call\', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===U._super;t--}}},KO=class extends wx{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(U.name,U.dot,U.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(U.parenL),this.tokens.copyExpectedToken(U.braceL),this.tokens.appendCode(`displayName: \'${t}\',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),this.tokens.copyExpectedToken(U.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,U.name,U.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===Y.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,U._export,U._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(U.parenL,U.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===U.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===Y.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,U.parenR)||this.tokens.matches2AtIndex(e,U.comma,U.parenR)}},qO=class e extends wx{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`\n (function () {\n var enterModule = require(\'react-hot-loader\').enterModule;\n enterModule && enterModule(module);\n })();`.replace(/\\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&jb(t)&&t.identifierRole!==Y.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`\n;(function () {\n var reactHotLoader = require(\'react-hot-loader\').default;\n var leaveModule = require(\'react-hot-loader\').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`\n`)}\n leaveModule(module);\n})();`}process(){return!1}},JO=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function YO(e){if(e.length===0||!Tb[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!wb[e.charCodeAt(t)])return!1;return!JO.has(e)}var XO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._public)||this.tokens.matches1(U._protected)||this.tokens.matches1(U._private)||this.tokens.matches1(U._abstract)||this.tokens.matches1(U._readonly)||this.tokens.matches1(U._override)||this.tokens.matches1(U.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(U._enum)||this.tokens.matches2(U._const,U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(U._const)||this.tokens.matches1(U._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(U.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(U.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(U.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(U.eq,U.string,U.comma)||this.tokens.matches3(U.eq,U.string,U.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(U.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(U.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===U.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:YO(t)?t:null}}else if(e.type===U.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:YO(t)?t:null}}else throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},ZO=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new GO(a,this.nameManager)),this.transformers.push(new UO(a)),this.transformers.push(new WO(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Tx(this,a,o,this.nameManager,i)),this.transformers.push(new KO(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new qO(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new IO(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new LO(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new RO(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new XO(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new HO(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`\n`);return i===-1&&(i=r.length,r+=`\n`),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}else return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL))e++;else if(this.tokens.matches1(U.braceR)){if(e===0)return;e--}if(this.tokens.matches1(U.parenL))t++;else if(this.tokens.matches1(U.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(U._class)){this.processClass();return}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(U._class,U.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=wO(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(U._class);!this.tokens.matchesContextIdAndLabel(U.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(U.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(U.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(U.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(U.string)||this.tokens.matches1(U.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(U.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(U.parenR,U.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,U.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(H._async)&&!this.tokens.matches1(U._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==U.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,U.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};o((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`\n`,n=`\\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++;break}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function QO(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,U._import)&&!e.matches3AtIndex(n,U._import,U.name,U.eq)&&$O(e,n,t);return t}function $O(e,t,n){t++,!e.matches1AtIndex(t,U.parenL)&&(e.matches1AtIndex(t,U.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,U.comma)&&t++),e.matches1AtIndex(t,U.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,U.braceL)&&(t++,ek(e,t,n)))}function ek(e,t,n){for(;;){if(e.matches1AtIndex(t,U.braceR))return;let r=yx(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,U.comma,U.braceR)||e.matches1AtIndex(t,U.braceR))return;if(e.matches1AtIndex(t,U.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function tk(e,t){kS(t);try{let n=nk(e,t),r=new ZO(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:mS(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function nk(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=xO(e,n,r,i),s=o.tokens,c=o.scopes,l=new CS(e,s),u=new _S(l),d=new CO(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new Px(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),vS(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&vS(d,c,QO(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var rk={react:d,"react/jsx-runtime":V};function ik(e){if(e in rk)return rk[e];throw Error(`\'${e}\' cannot be imported here. Only \'react\' can.`)}function ak(e){let{code:t}=tk(e,{transforms:[`typescript`,`jsx`,`imports`],jsxRuntime:`automatic`,production:!0}),n={require:ik,module:{exports:{}},ran:!1};window.__componentCode=n;let r=document.createElement(`script`);if(r.textContent=`(function (require, module, exports) {\ntry {\n${t}\n} catch (error) { __componentCode.error = error; }\n__componentCode.ran = true;\n})(__componentCode.require, __componentCode.module, __componentCode.module.exports);`,document.head.append(r),r.remove(),delete window.__componentCode,n.error)throw n.error;if(!n.ran)throw Error(`The host did not let the component run.`);let{default:i,...a}=n.module.exports;return typeof i==`function`&&i.name&&i.name!=="default"?{[i.name]:i,...a}:a}function ok({error:e}){throw e}function sk({source:e,code:t,file:n=`Code`,controls:r,note:i,onChange:a}){let o=(0,d.useMemo)(()=>{try{return{scope:ak(e)}}catch(e){return{error:e}}},[e]);return o.scope?(0,V.jsx)(_y,{interactive:!0,scope:o.scope,code:t,file:n,controls:r,note:i,onChange:({prop:e,value:t,code:r})=>a({prop:e,value:t,file:n,files:{[n]:r}})}):(0,V.jsx)(_y,{code:t,file:n,children:(0,V.jsx)(ok,{error:o.error})})}var ck=new Cv({name:`Component Code`,version:Ky}),lk=(0,Gy.createRoot)(document.getElementById(`root`)),uk=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,dk,fk={},pk=!1,mk,hk=e=>{ck.getHostCapabilities()?.updateModelContext&&(clearTimeout(mk),mk=setTimeout(()=>{let t=document.querySelector(`.cc-problem`)?.textContent||void 0;pk=!0,ck.updateModelContext({content:[{type:`text`,text:Zy({...e,problem:t})}]}).catch(()=>{})},400))},gk=()=>ck.getHostCapabilities()?.updateModelContext?`The chat sees this state`:void 0,_k=()=>{clearTimeout(mk),pk&&(pk=!1,ck.updateModelContext({content:[]}).catch(()=>{}))},vk=()=>{if(document.documentElement.style.colorScheme=uk,dk===void 0)return;let e=Jy.safeParse(dk),t=qy.safeParse(dk);lk.render(e.success?(0,V.jsx)(zy,{...e.data,theme:uk,note:gk(),onChange:({file:e,prop:t,value:n,code:r})=>{fk={...fk,[e]:r},hk({prop:t,value:n,file:e,files:fk})}}):t.success?(0,V.jsx)(sk,{...t.data,note:gk(),onChange:hk}):(0,V.jsx)(`p`,{children:t.error.message}))};ck.addEventListener(`toolinput`,e=>{dk=e.arguments;let t=Jy.safeParse(dk);fk=t.success?{...t.data.files}:{},_k(),vk()}),ck.addEventListener(`hostcontextchanged`,e=>{e.theme&&(uk=e.theme),vk()}),await ck.connect(),uk=ck.getHostContext()?.theme??uk,vk();var yk={host:ck.getHostVersion(),capabilities:ck.getHostCapabilities()};console.info(`Component Code host`,yk),yk.capabilities?.logging&&ck.sendLog({level:`info`,logger:`Component Code`,data:yk}).catch(()=>{});</script>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var d0=Re.object({source:Re.string().describe("The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:Re.string().describe("How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."),file:Re.string().optional().describe("The file named in the code's tab, such as `Card.tsx`."),controls:Re.record(Re.string(),Re.union([Re.literal(!1),Re.array(Re.union([Re.string(),Re.number()])),Re.object({min:Re.number().optional(),max:Re.number().optional(),step:Re.number().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),p0=Re.object({files:Re.record(Re.string(),Re.string()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:Re.record(Re.string(),Re.union([Re.literal(!0),Re.array(Re.union([Re.string(),Re.number()])),Re.object({min:Re.number().optional(),max:Re.number().optional(),step:Re.number().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")});var yv="ui://fabio.cv/component-code",m0=e=>{Od(e,"component_code_show",{title:"Show in Component Code",description:"Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.",inputSchema:d0,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:yv}}},({file:t,code:r})=>({content:[{type:"text",text:`Showing ${t??"the component"} in Component Code:
|
|
82
82
|
|
|
83
|
-
${r}`}]})),Od(e,"
|
|
83
|
+
${r}`}]})),Od(e,"component_code_show_html",{title:"Show HTML in Component Code",description:"Shows HTML, CSS and JS running in the chat in Component Code: the page beside its code, with a tab for each file. The values named in `controls` become controls the reader can change. Use it when someone asks to show HTML, CSS, JS, a canvas or an SVG in Component Code, or for an experiment without React.",inputSchema:p0,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:yv}}},({files:t})=>({content:[{type:"text",text:`Showing ${Object.keys(t).join(", ")} in Component Code.`}]})),i0(e,{uri:yv,name:"Component Code",description:"A component or page beside the code that makes it.",html:u0})};c0(()=>o0({name:"component-code",version:l0},m0));
|
|
84
84
|
/*! Bundled license information:
|
|
85
85
|
|
|
86
86
|
@modelcontextprotocol/server/dist/src-DdvbAHrR.mjs:
|