UNPKG

@nabsolutions/nab-al-tools-mcp

Version:

NAB AL Tools MCP Server - Model Context Protocol server for AL development and translation management in Microsoft Dynamics 365 Business Central.

3 lines 701 kB
#!/usr/bin/env node /*! For license information please see server.js.LICENSE.txt */ (()=>{var e={270:(e,t,r)=>{"use strict";const n=r(53908),a=r(78311);e.exports=(e,t,r)=>{let s=null,o=null,i=null;try{i=new a(t,r)}catch(e){return null}return e.forEach(e=>{i.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new n(s,r)))}),s}},1243:(e,t)=>{const r={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function n(e){return function(...t){return t.length&&(e=e.replace(/\{(\d)\}/g,(e,r)=>t[r]||"")),new Error("ADM-ZIP: "+e)}}for(const e of Object.keys(r))t[e]=n(r[e])},1283:e=>{"use strict";e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r};var t=Object.getPrototypeOf||function(e){return e.__proto__}},1294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscribeRequestSchema=t.SubscribeRequestSchema=t.ResourceListChangedNotificationSchema=t.ReadResourceResultSchema=t.ReadResourceRequestSchema=t.ListResourceTemplatesResultSchema=t.ListResourceTemplatesRequestSchema=t.ListResourcesResultSchema=t.ListResourcesRequestSchema=t.ResourceTemplateSchema=t.ResourceSchema=t.BlobResourceContentsSchema=t.TextResourceContentsSchema=t.ResourceContentsSchema=t.PaginatedResultSchema=t.PaginatedRequestSchema=t.ProgressNotificationSchema=t.ProgressSchema=t.PingRequestSchema=t.isInitializedNotification=t.InitializedNotificationSchema=t.InitializeResultSchema=t.ServerCapabilitiesSchema=t.isInitializeRequest=t.InitializeRequestSchema=t.ClientCapabilitiesSchema=t.ImplementationSchema=t.BaseMetadataSchema=t.CancelledNotificationSchema=t.EmptyResultSchema=t.JSONRPCMessageSchema=t.isJSONRPCError=t.JSONRPCErrorSchema=t.ErrorCode=t.isJSONRPCResponse=t.JSONRPCResponseSchema=t.isJSONRPCNotification=t.JSONRPCNotificationSchema=t.isJSONRPCRequest=t.JSONRPCRequestSchema=t.RequestIdSchema=t.ResultSchema=t.NotificationSchema=t.RequestSchema=t.CursorSchema=t.ProgressTokenSchema=t.JSONRPC_VERSION=t.SUPPORTED_PROTOCOL_VERSIONS=t.DEFAULT_NEGOTIATED_PROTOCOL_VERSION=t.LATEST_PROTOCOL_VERSION=void 0,t.ClientResultSchema=t.ClientNotificationSchema=t.ClientRequestSchema=t.RootsListChangedNotificationSchema=t.ListRootsResultSchema=t.ListRootsRequestSchema=t.RootSchema=t.CompleteResultSchema=t.CompleteRequestSchema=t.PromptReferenceSchema=t.ResourceReferenceSchema=t.ResourceTemplateReferenceSchema=t.ElicitResultSchema=t.ElicitRequestSchema=t.PrimitiveSchemaDefinitionSchema=t.EnumSchemaSchema=t.NumberSchemaSchema=t.StringSchemaSchema=t.BooleanSchemaSchema=t.CreateMessageResultSchema=t.CreateMessageRequestSchema=t.SamplingMessageSchema=t.ModelPreferencesSchema=t.ModelHintSchema=t.LoggingMessageNotificationSchema=t.SetLevelRequestSchema=t.LoggingLevelSchema=t.ToolListChangedNotificationSchema=t.CallToolRequestSchema=t.CompatibilityCallToolResultSchema=t.CallToolResultSchema=t.ListToolsResultSchema=t.ListToolsRequestSchema=t.ToolSchema=t.ToolAnnotationsSchema=t.PromptListChangedNotificationSchema=t.GetPromptResultSchema=t.PromptMessageSchema=t.ContentBlockSchema=t.ResourceLinkSchema=t.EmbeddedResourceSchema=t.AudioContentSchema=t.ImageContentSchema=t.TextContentSchema=t.GetPromptRequestSchema=t.ListPromptsResultSchema=t.ListPromptsRequestSchema=t.PromptSchema=t.PromptArgumentSchema=t.ResourceUpdatedNotificationSchema=void 0,t.McpError=t.ServerResultSchema=t.ServerNotificationSchema=t.ServerRequestSchema=void 0;const n=r(7552);t.LATEST_PROTOCOL_VERSION="2025-06-18",t.DEFAULT_NEGOTIATED_PROTOCOL_VERSION="2025-03-26",t.SUPPORTED_PROTOCOL_VERSIONS=[t.LATEST_PROTOCOL_VERSION,"2025-03-26","2024-11-05","2024-10-07"],t.JSONRPC_VERSION="2.0",t.ProgressTokenSchema=n.z.union([n.z.string(),n.z.number().int()]),t.CursorSchema=n.z.string();const a=n.z.object({progressToken:n.z.optional(t.ProgressTokenSchema)}).passthrough(),s=n.z.object({_meta:n.z.optional(a)}).passthrough();t.RequestSchema=n.z.object({method:n.z.string(),params:n.z.optional(s)});const o=n.z.object({_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough();var i;t.NotificationSchema=n.z.object({method:n.z.string(),params:n.z.optional(o)}),t.ResultSchema=n.z.object({_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.RequestIdSchema=n.z.union([n.z.string(),n.z.number().int()]),t.JSONRPCRequestSchema=n.z.object({jsonrpc:n.z.literal(t.JSONRPC_VERSION),id:t.RequestIdSchema}).merge(t.RequestSchema).strict(),t.isJSONRPCRequest=e=>t.JSONRPCRequestSchema.safeParse(e).success,t.JSONRPCNotificationSchema=n.z.object({jsonrpc:n.z.literal(t.JSONRPC_VERSION)}).merge(t.NotificationSchema).strict(),t.isJSONRPCNotification=e=>t.JSONRPCNotificationSchema.safeParse(e).success,t.JSONRPCResponseSchema=n.z.object({jsonrpc:n.z.literal(t.JSONRPC_VERSION),id:t.RequestIdSchema,result:t.ResultSchema}).strict(),t.isJSONRPCResponse=e=>t.JSONRPCResponseSchema.safeParse(e).success,function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",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"}(i||(t.ErrorCode=i={})),t.JSONRPCErrorSchema=n.z.object({jsonrpc:n.z.literal(t.JSONRPC_VERSION),id:t.RequestIdSchema,error:n.z.object({code:n.z.number().int(),message:n.z.string(),data:n.z.optional(n.z.unknown())})}).strict(),t.isJSONRPCError=e=>t.JSONRPCErrorSchema.safeParse(e).success,t.JSONRPCMessageSchema=n.z.union([t.JSONRPCRequestSchema,t.JSONRPCNotificationSchema,t.JSONRPCResponseSchema,t.JSONRPCErrorSchema]),t.EmptyResultSchema=t.ResultSchema.strict(),t.CancelledNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/cancelled"),params:o.extend({requestId:t.RequestIdSchema,reason:n.z.string().optional()})}),t.BaseMetadataSchema=n.z.object({name:n.z.string(),title:n.z.optional(n.z.string())}).passthrough(),t.ImplementationSchema=t.BaseMetadataSchema.extend({version:n.z.string()}),t.ClientCapabilitiesSchema=n.z.object({experimental:n.z.optional(n.z.object({}).passthrough()),sampling:n.z.optional(n.z.object({}).passthrough()),elicitation:n.z.optional(n.z.object({}).passthrough()),roots:n.z.optional(n.z.object({listChanged:n.z.optional(n.z.boolean())}).passthrough())}).passthrough(),t.InitializeRequestSchema=t.RequestSchema.extend({method:n.z.literal("initialize"),params:s.extend({protocolVersion:n.z.string(),capabilities:t.ClientCapabilitiesSchema,clientInfo:t.ImplementationSchema})}),t.isInitializeRequest=e=>t.InitializeRequestSchema.safeParse(e).success,t.ServerCapabilitiesSchema=n.z.object({experimental:n.z.optional(n.z.object({}).passthrough()),logging:n.z.optional(n.z.object({}).passthrough()),completions:n.z.optional(n.z.object({}).passthrough()),prompts:n.z.optional(n.z.object({listChanged:n.z.optional(n.z.boolean())}).passthrough()),resources:n.z.optional(n.z.object({subscribe:n.z.optional(n.z.boolean()),listChanged:n.z.optional(n.z.boolean())}).passthrough()),tools:n.z.optional(n.z.object({listChanged:n.z.optional(n.z.boolean())}).passthrough())}).passthrough(),t.InitializeResultSchema=t.ResultSchema.extend({protocolVersion:n.z.string(),capabilities:t.ServerCapabilitiesSchema,serverInfo:t.ImplementationSchema,instructions:n.z.optional(n.z.string())}),t.InitializedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/initialized")}),t.isInitializedNotification=e=>t.InitializedNotificationSchema.safeParse(e).success,t.PingRequestSchema=t.RequestSchema.extend({method:n.z.literal("ping")}),t.ProgressSchema=n.z.object({progress:n.z.number(),total:n.z.optional(n.z.number()),message:n.z.optional(n.z.string())}).passthrough(),t.ProgressNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/progress"),params:o.merge(t.ProgressSchema).extend({progressToken:t.ProgressTokenSchema})}),t.PaginatedRequestSchema=t.RequestSchema.extend({params:s.extend({cursor:n.z.optional(t.CursorSchema)}).optional()}),t.PaginatedResultSchema=t.ResultSchema.extend({nextCursor:n.z.optional(t.CursorSchema)}),t.ResourceContentsSchema=n.z.object({uri:n.z.string(),mimeType:n.z.optional(n.z.string()),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.TextResourceContentsSchema=t.ResourceContentsSchema.extend({text:n.z.string()}),t.BlobResourceContentsSchema=t.ResourceContentsSchema.extend({blob:n.z.string().base64()}),t.ResourceSchema=t.BaseMetadataSchema.extend({uri:n.z.string(),description:n.z.optional(n.z.string()),mimeType:n.z.optional(n.z.string()),_meta:n.z.optional(n.z.object({}).passthrough())}),t.ResourceTemplateSchema=t.BaseMetadataSchema.extend({uriTemplate:n.z.string(),description:n.z.optional(n.z.string()),mimeType:n.z.optional(n.z.string()),_meta:n.z.optional(n.z.object({}).passthrough())}),t.ListResourcesRequestSchema=t.PaginatedRequestSchema.extend({method:n.z.literal("resources/list")}),t.ListResourcesResultSchema=t.PaginatedResultSchema.extend({resources:n.z.array(t.ResourceSchema)}),t.ListResourceTemplatesRequestSchema=t.PaginatedRequestSchema.extend({method:n.z.literal("resources/templates/list")}),t.ListResourceTemplatesResultSchema=t.PaginatedResultSchema.extend({resourceTemplates:n.z.array(t.ResourceTemplateSchema)}),t.ReadResourceRequestSchema=t.RequestSchema.extend({method:n.z.literal("resources/read"),params:s.extend({uri:n.z.string()})}),t.ReadResourceResultSchema=t.ResultSchema.extend({contents:n.z.array(n.z.union([t.TextResourceContentsSchema,t.BlobResourceContentsSchema]))}),t.ResourceListChangedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/resources/list_changed")}),t.SubscribeRequestSchema=t.RequestSchema.extend({method:n.z.literal("resources/subscribe"),params:s.extend({uri:n.z.string()})}),t.UnsubscribeRequestSchema=t.RequestSchema.extend({method:n.z.literal("resources/unsubscribe"),params:s.extend({uri:n.z.string()})}),t.ResourceUpdatedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/resources/updated"),params:o.extend({uri:n.z.string()})}),t.PromptArgumentSchema=n.z.object({name:n.z.string(),description:n.z.optional(n.z.string()),required:n.z.optional(n.z.boolean())}).passthrough(),t.PromptSchema=t.BaseMetadataSchema.extend({description:n.z.optional(n.z.string()),arguments:n.z.optional(n.z.array(t.PromptArgumentSchema)),_meta:n.z.optional(n.z.object({}).passthrough())}),t.ListPromptsRequestSchema=t.PaginatedRequestSchema.extend({method:n.z.literal("prompts/list")}),t.ListPromptsResultSchema=t.PaginatedResultSchema.extend({prompts:n.z.array(t.PromptSchema)}),t.GetPromptRequestSchema=t.RequestSchema.extend({method:n.z.literal("prompts/get"),params:s.extend({name:n.z.string(),arguments:n.z.optional(n.z.record(n.z.string()))})}),t.TextContentSchema=n.z.object({type:n.z.literal("text"),text:n.z.string(),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.ImageContentSchema=n.z.object({type:n.z.literal("image"),data:n.z.string().base64(),mimeType:n.z.string(),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.AudioContentSchema=n.z.object({type:n.z.literal("audio"),data:n.z.string().base64(),mimeType:n.z.string(),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.EmbeddedResourceSchema=n.z.object({type:n.z.literal("resource"),resource:n.z.union([t.TextResourceContentsSchema,t.BlobResourceContentsSchema]),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.ResourceLinkSchema=t.ResourceSchema.extend({type:n.z.literal("resource_link")}),t.ContentBlockSchema=n.z.union([t.TextContentSchema,t.ImageContentSchema,t.AudioContentSchema,t.ResourceLinkSchema,t.EmbeddedResourceSchema]),t.PromptMessageSchema=n.z.object({role:n.z.enum(["user","assistant"]),content:t.ContentBlockSchema}).passthrough(),t.GetPromptResultSchema=t.ResultSchema.extend({description:n.z.optional(n.z.string()),messages:n.z.array(t.PromptMessageSchema)}),t.PromptListChangedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/prompts/list_changed")}),t.ToolAnnotationsSchema=n.z.object({title:n.z.optional(n.z.string()),readOnlyHint:n.z.optional(n.z.boolean()),destructiveHint:n.z.optional(n.z.boolean()),idempotentHint:n.z.optional(n.z.boolean()),openWorldHint:n.z.optional(n.z.boolean())}).passthrough(),t.ToolSchema=t.BaseMetadataSchema.extend({description:n.z.optional(n.z.string()),inputSchema:n.z.object({type:n.z.literal("object"),properties:n.z.optional(n.z.object({}).passthrough()),required:n.z.optional(n.z.array(n.z.string()))}).passthrough(),outputSchema:n.z.optional(n.z.object({type:n.z.literal("object"),properties:n.z.optional(n.z.object({}).passthrough()),required:n.z.optional(n.z.array(n.z.string()))}).passthrough()),annotations:n.z.optional(t.ToolAnnotationsSchema),_meta:n.z.optional(n.z.object({}).passthrough())}),t.ListToolsRequestSchema=t.PaginatedRequestSchema.extend({method:n.z.literal("tools/list")}),t.ListToolsResultSchema=t.PaginatedResultSchema.extend({tools:n.z.array(t.ToolSchema)}),t.CallToolResultSchema=t.ResultSchema.extend({content:n.z.array(t.ContentBlockSchema).default([]),structuredContent:n.z.object({}).passthrough().optional(),isError:n.z.optional(n.z.boolean())}),t.CompatibilityCallToolResultSchema=t.CallToolResultSchema.or(t.ResultSchema.extend({toolResult:n.z.unknown()})),t.CallToolRequestSchema=t.RequestSchema.extend({method:n.z.literal("tools/call"),params:s.extend({name:n.z.string(),arguments:n.z.optional(n.z.record(n.z.unknown()))})}),t.ToolListChangedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/tools/list_changed")}),t.LoggingLevelSchema=n.z.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),t.SetLevelRequestSchema=t.RequestSchema.extend({method:n.z.literal("logging/setLevel"),params:s.extend({level:t.LoggingLevelSchema})}),t.LoggingMessageNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/message"),params:o.extend({level:t.LoggingLevelSchema,logger:n.z.optional(n.z.string()),data:n.z.unknown()})}),t.ModelHintSchema=n.z.object({name:n.z.string().optional()}).passthrough(),t.ModelPreferencesSchema=n.z.object({hints:n.z.optional(n.z.array(t.ModelHintSchema)),costPriority:n.z.optional(n.z.number().min(0).max(1)),speedPriority:n.z.optional(n.z.number().min(0).max(1)),intelligencePriority:n.z.optional(n.z.number().min(0).max(1))}).passthrough(),t.SamplingMessageSchema=n.z.object({role:n.z.enum(["user","assistant"]),content:n.z.union([t.TextContentSchema,t.ImageContentSchema,t.AudioContentSchema])}).passthrough(),t.CreateMessageRequestSchema=t.RequestSchema.extend({method:n.z.literal("sampling/createMessage"),params:s.extend({messages:n.z.array(t.SamplingMessageSchema),systemPrompt:n.z.optional(n.z.string()),includeContext:n.z.optional(n.z.enum(["none","thisServer","allServers"])),temperature:n.z.optional(n.z.number()),maxTokens:n.z.number().int(),stopSequences:n.z.optional(n.z.array(n.z.string())),metadata:n.z.optional(n.z.object({}).passthrough()),modelPreferences:n.z.optional(t.ModelPreferencesSchema)})}),t.CreateMessageResultSchema=t.ResultSchema.extend({model:n.z.string(),stopReason:n.z.optional(n.z.enum(["endTurn","stopSequence","maxTokens"]).or(n.z.string())),role:n.z.enum(["user","assistant"]),content:n.z.discriminatedUnion("type",[t.TextContentSchema,t.ImageContentSchema,t.AudioContentSchema])}),t.BooleanSchemaSchema=n.z.object({type:n.z.literal("boolean"),title:n.z.optional(n.z.string()),description:n.z.optional(n.z.string()),default:n.z.optional(n.z.boolean())}).passthrough(),t.StringSchemaSchema=n.z.object({type:n.z.literal("string"),title:n.z.optional(n.z.string()),description:n.z.optional(n.z.string()),minLength:n.z.optional(n.z.number()),maxLength:n.z.optional(n.z.number()),format:n.z.optional(n.z.enum(["email","uri","date","date-time"]))}).passthrough(),t.NumberSchemaSchema=n.z.object({type:n.z.enum(["number","integer"]),title:n.z.optional(n.z.string()),description:n.z.optional(n.z.string()),minimum:n.z.optional(n.z.number()),maximum:n.z.optional(n.z.number())}).passthrough(),t.EnumSchemaSchema=n.z.object({type:n.z.literal("string"),title:n.z.optional(n.z.string()),description:n.z.optional(n.z.string()),enum:n.z.array(n.z.string()),enumNames:n.z.optional(n.z.array(n.z.string()))}).passthrough(),t.PrimitiveSchemaDefinitionSchema=n.z.union([t.BooleanSchemaSchema,t.StringSchemaSchema,t.NumberSchemaSchema,t.EnumSchemaSchema]),t.ElicitRequestSchema=t.RequestSchema.extend({method:n.z.literal("elicitation/create"),params:s.extend({message:n.z.string(),requestedSchema:n.z.object({type:n.z.literal("object"),properties:n.z.record(n.z.string(),t.PrimitiveSchemaDefinitionSchema),required:n.z.optional(n.z.array(n.z.string()))}).passthrough()})}),t.ElicitResultSchema=t.ResultSchema.extend({action:n.z.enum(["accept","decline","cancel"]),content:n.z.optional(n.z.record(n.z.string(),n.z.unknown()))}),t.ResourceTemplateReferenceSchema=n.z.object({type:n.z.literal("ref/resource"),uri:n.z.string()}).passthrough(),t.ResourceReferenceSchema=t.ResourceTemplateReferenceSchema,t.PromptReferenceSchema=n.z.object({type:n.z.literal("ref/prompt"),name:n.z.string()}).passthrough(),t.CompleteRequestSchema=t.RequestSchema.extend({method:n.z.literal("completion/complete"),params:s.extend({ref:n.z.union([t.PromptReferenceSchema,t.ResourceTemplateReferenceSchema]),argument:n.z.object({name:n.z.string(),value:n.z.string()}).passthrough(),context:n.z.optional(n.z.object({arguments:n.z.optional(n.z.record(n.z.string(),n.z.string()))}))})}),t.CompleteResultSchema=t.ResultSchema.extend({completion:n.z.object({values:n.z.array(n.z.string()).max(100),total:n.z.optional(n.z.number().int()),hasMore:n.z.optional(n.z.boolean())}).passthrough()}),t.RootSchema=n.z.object({uri:n.z.string().startsWith("file://"),name:n.z.optional(n.z.string()),_meta:n.z.optional(n.z.object({}).passthrough())}).passthrough(),t.ListRootsRequestSchema=t.RequestSchema.extend({method:n.z.literal("roots/list")}),t.ListRootsResultSchema=t.ResultSchema.extend({roots:n.z.array(t.RootSchema)}),t.RootsListChangedNotificationSchema=t.NotificationSchema.extend({method:n.z.literal("notifications/roots/list_changed")}),t.ClientRequestSchema=n.z.union([t.PingRequestSchema,t.InitializeRequestSchema,t.CompleteRequestSchema,t.SetLevelRequestSchema,t.GetPromptRequestSchema,t.ListPromptsRequestSchema,t.ListResourcesRequestSchema,t.ListResourceTemplatesRequestSchema,t.ReadResourceRequestSchema,t.SubscribeRequestSchema,t.UnsubscribeRequestSchema,t.CallToolRequestSchema,t.ListToolsRequestSchema]),t.ClientNotificationSchema=n.z.union([t.CancelledNotificationSchema,t.ProgressNotificationSchema,t.InitializedNotificationSchema,t.RootsListChangedNotificationSchema]),t.ClientResultSchema=n.z.union([t.EmptyResultSchema,t.CreateMessageResultSchema,t.ElicitResultSchema,t.ListRootsResultSchema]),t.ServerRequestSchema=n.z.union([t.PingRequestSchema,t.CreateMessageRequestSchema,t.ElicitRequestSchema,t.ListRootsRequestSchema]),t.ServerNotificationSchema=n.z.union([t.CancelledNotificationSchema,t.ProgressNotificationSchema,t.LoggingMessageNotificationSchema,t.ResourceUpdatedNotificationSchema,t.ResourceListChangedNotificationSchema,t.ToolListChangedNotificationSchema,t.PromptListChangedNotificationSchema]),t.ServerResultSchema=n.z.union([t.EmptyResultSchema,t.InitializeResultSchema,t.CompleteResultSchema,t.GetPromptResultSchema,t.ListPromptsResultSchema,t.ListResourcesResultSchema,t.ListResourceTemplatesResultSchema,t.ReadResourceResultSchema,t.CallToolResultSchema,t.ListToolsResultSchema]);class l extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`),this.code=e,this.data=r,this.name="McpError"}}t.McpError=l},1708:e=>{"use strict";e.exports=require("node:process")},2203:e=>{"use strict";e.exports=require("stream")},2543:function(e,t,r){var n;e=r.nmd(e),function(){var a,s="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",l=32,c=128,u=1/0,d=9007199254740991,p=NaN,f=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",T="[object Function]",w="[object GeneratorFunction]",E="[object Map]",S="[object Number]",_="[object Object]",x="[object Promise]",P="[object RegExp]",C="[object Set]",A="[object String]",L="[object Symbol]",O="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",k="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",M="[object Uint8Array]",$="[object Uint8ClampedArray]",z="[object Uint16Array]",U="[object Uint32Array]",q=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,H=RegExp(V.source),W=RegExp(X.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ie=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,Te=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+we+"]",Le="["+Ce+"]",Oe="["+Ee+"]",Ne="\\d+",Ie="["+Se+"]",Re="["+_e+"]",ke="[^"+we+Ce+Ne+Se+_e+xe+"]",De="\\ud83c[\\udffb-\\udfff]",je="[^"+we+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+xe+"]",ze="\\u200d",Ue="(?:"+Re+"|"+ke+")",qe="(?:"+$e+"|"+ke+")",Ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Oe+"|"+De+")?",Xe="["+Pe+"]?",He=Xe+Ve+"(?:"+ze+"(?:"+[je,Fe,Me].join("|")+")"+Xe+Ve+")*",We="(?:"+[Ie,Fe,Me].join("|")+")"+He,Ge="(?:"+[je+Oe+"?",Oe,Fe,Me,Ae].join("|")+")",Ke=RegExp("['’]","g"),Qe=RegExp(Oe,"g"),Je=RegExp(De+"(?="+De+")|"+Ge+He,"g"),Ye=RegExp([$e+"?"+Re+"+"+Ze+"(?="+[Le,$e,"$"].join("|")+")",qe+"+"+Be+"(?="+[Le,$e+Ue,"$"].join("|")+")",$e+"?"+Ue+"+"+Ze,$e+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,We].join("|"),"g"),et=RegExp("["+ze+we+Ee+Pe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,at={};at[R]=at[k]=at[D]=at[j]=at[F]=at[M]=at[$]=at[z]=at[U]=!0,at[m]=at[g]=at[N]=at[y]=at[I]=at[v]=at[b]=at[T]=at[E]=at[S]=at[_]=at[P]=at[C]=at[A]=at[O]=!1;var st={};st[m]=st[g]=st[N]=st[I]=st[y]=st[v]=st[R]=st[k]=st[D]=st[j]=st[F]=st[E]=st[S]=st[_]=st[P]=st[C]=st[A]=st[L]=st[M]=st[$]=st[z]=st[U]=!0,st[b]=st[T]=st[O]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},it=parseFloat,lt=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,ut="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ut||Function("return this")(),pt=t&&!t.nodeType&&t,ft=pt&&e&&!e.nodeType&&e,ht=ft&&ft.exports===pt,mt=ht&&ct.process,gt=function(){try{return ft&&ft.require&&ft.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&&gt.isArrayBuffer,vt=gt&&gt.isDate,bt=gt&&gt.isMap,Tt=gt&&gt.isRegExp,wt=gt&&gt.isSet,Et=gt&&gt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function _t(e,t,r,n){for(var a=-1,s=null==e?0:e.length;++a<s;){var o=e[a];t(n,o,r(o),e)}return n}function xt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Pt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ct(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function At(e,t){for(var r=-1,n=null==e?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}function Lt(e,t){return!(null==e||!e.length)&&$t(e,t,0)>-1}function Ot(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}function It(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Rt(e,t,r,n){var a=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++a]);++a<s;)r=t(r,e[a],a,e);return r}function kt(e,t,r,n){var a=null==e?0:e.length;for(n&&a&&(r=e[--a]);a--;)r=t(r,e[a],a,e);return r}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var jt=Zt("length");function Ft(e,t,r){var n;return r(e,function(e,r,a){if(t(e,r,a))return n=r,!1}),n}function Mt(e,t,r,n){for(var a=e.length,s=r+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}function $t(e,t,r){return t==t?function(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}(e,t,r):Mt(e,Ut,r)}function zt(e,t,r,n){for(var a=r-1,s=e.length;++a<s;)if(n(e[a],t))return a;return-1}function Ut(e){return e!=e}function qt(e,t){var r=null==e?0:e.length;return r?Xt(e,t)/r:p}function Zt(e){return function(t){return null==t?a:t[e]}}function Bt(e){return function(t){return null==e?a:e[t]}}function Vt(e,t,r,n,a){return a(e,function(e,a,s){r=n?(n=!1,e):t(r,e,a,s)}),r}function Xt(e,t){for(var r,n=-1,s=e.length;++n<s;){var o=t(e[n]);o!==a&&(r=r===a?o:r+o)}return r}function Ht(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Wt(e){return e?e.slice(0,dr(e)+1).replace(ne,""):e}function Gt(e){return function(t){return e(t)}}function Kt(e,t){return Nt(t,function(t){return e[t]})}function Qt(e,t){return e.has(t)}function Jt(e,t){for(var r=-1,n=e.length;++r<n&&$t(t,e[r],0)>-1;);return r}function Yt(e,t){for(var r=e.length;r--&&$t(t,e[r],0)>-1;);return r}var er=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+ot[e]}function nr(e){return et.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function sr(e,t){return function(r){return e(t(r))}}function or(e,t){for(var r=-1,n=e.length,a=0,s=[];++r<n;){var o=e[r];o!==t&&o!==i||(e[r]=i,s[a++]=r)}return s}function ir(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function lr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function cr(e){return nr(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):jt(e)}function ur(e){return nr(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function dr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var pr=Bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fr=function e(t){var r,n=(t=null==t?dt:fr.defaults(dt.Object(),t,fr.pick(dt,rt))).Array,ae=t.Date,we=t.Error,Ee=t.Function,Se=t.Math,_e=t.Object,xe=t.RegExp,Pe=t.String,Ce=t.TypeError,Ae=n.prototype,Le=Ee.prototype,Oe=_e.prototype,Ne=t["__core-js_shared__"],Ie=Le.toString,Re=Oe.hasOwnProperty,ke=0,De=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",je=Oe.toString,Fe=Ie.call(_e),Me=dt._,$e=xe("^"+Ie.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=ht?t.Buffer:a,Ue=t.Symbol,qe=t.Uint8Array,Ze=ze?ze.allocUnsafe:a,Be=sr(_e.getPrototypeOf,_e),Ve=_e.create,Xe=Oe.propertyIsEnumerable,He=Ae.splice,We=Ue?Ue.isConcatSpreadable:a,Ge=Ue?Ue.iterator:a,Je=Ue?Ue.toStringTag:a,et=function(){try{var e=ls(_e,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ct=ae&&ae.now!==dt.Date.now&&ae.now,ut=t.setTimeout!==dt.setTimeout&&t.setTimeout,pt=Se.ceil,ft=Se.floor,mt=_e.getOwnPropertySymbols,gt=ze?ze.isBuffer:a,jt=t.isFinite,Bt=Ae.join,hr=sr(_e.keys,_e),mr=Se.max,gr=Se.min,yr=ae.now,vr=t.parseInt,br=Se.random,Tr=Ae.reverse,wr=ls(t,"DataView"),Er=ls(t,"Map"),Sr=ls(t,"Promise"),_r=ls(t,"Set"),xr=ls(t,"WeakMap"),Pr=ls(_e,"create"),Cr=xr&&new xr,Ar={},Lr=js(wr),Or=js(Er),Nr=js(Sr),Ir=js(_r),Rr=js(xr),kr=Ue?Ue.prototype:a,Dr=kr?kr.valueOf:a,jr=kr?kr.toString:a;function Fr(e){if(ei(e)&&!Zo(e)&&!(e instanceof Ur)){if(e instanceof zr)return e;if(Re.call(e,"__wrapped__"))return Fs(e)}return new zr(e)}var Mr=function(){function e(){}return function(t){if(!Yo(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=a,r}}();function $r(){}function zr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Br(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Br;++t<r;)this.add(e[t])}function Xr(e){var t=this.__data__=new Zr(e);this.size=t.size}function Hr(e,t){var r=Zo(e),n=!r&&qo(e),a=!r&&!n&&Ho(e),s=!r&&!n&&!a&&li(e),o=r||n||a||s,i=o?Ht(e.length,Pe):[],l=i.length;for(var c in e)!t&&!Re.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ms(c,l))||i.push(c);return i}function Wr(e){var t=e.length;return t?e[Vn(0,t-1)]:a}function Gr(e,t){return Ns(Pa(e),an(t,0,e.length))}function Kr(e){return Ns(Pa(e))}function Qr(e,t,r){(r!==a&&!$o(e[t],r)||r===a&&!(t in e))&&rn(e,t,r)}function Jr(e,t,r){var n=e[t];Re.call(e,t)&&$o(n,r)&&(r!==a||t in e)||rn(e,t,r)}function Yr(e,t){for(var r=e.length;r--;)if($o(e[r][0],t))return r;return-1}function en(e,t,r,n){return un(e,function(e,a,s){t(n,e,r(e),s)}),n}function tn(e,t){return e&&Ca(t,Oi(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,s=t.length,o=n(s),i=null==e;++r<s;)o[r]=i?a:xi(e,t[r]);return o}function an(e,t,r){return e==e&&(r!==a&&(e=e<=r?e:r),t!==a&&(e=e>=t?e:t)),e}function sn(e,t,r,n,s,o){var i,l=1&t,c=2&t,u=4&t;if(r&&(i=s?r(e,n,s,o):r(e)),i!==a)return i;if(!Yo(e))return e;var d=Zo(e);if(d){if(i=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!l)return Pa(e,i)}else{var p=ds(e),f=p==T||p==w;if(Ho(e))return Ta(e,l);if(p==_||p==m||f&&!s){if(i=c||f?{}:fs(e),!l)return c?function(e,t){return Ca(e,us(e),t)}(e,function(e,t){return e&&Ca(t,Ni(t),e)}(i,e)):function(e,t){return Ca(e,cs(e),t)}(e,tn(i,e))}else{if(!st[p])return s?e:{};i=function(e,t,r){var n,a=e.constructor;switch(t){case N:return wa(e);case y:case v:return new a(+e);case I:return function(e,t){var r=t?wa(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case k:case D:case j:case F:case M:case $:case z:case U:return Ea(e,r);case E:return new a;case S:case A:return new a(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new a;case L:return n=e,Dr?_e(Dr.call(n)):{}}}(e,p,l)}}o||(o=new Xr);var h=o.get(e);if(h)return h;o.set(e,i),si(e)?e.forEach(function(n){i.add(sn(n,t,r,n,e,o))}):ti(e)&&e.forEach(function(n,a){i.set(a,sn(n,t,r,a,e,o))});var g=d?a:(u?c?ts:es:c?Ni:Oi)(e);return xt(g||e,function(n,a){g&&(n=e[a=n]),Jr(i,a,sn(n,t,r,a,e,o))}),i}function on(e,t,r){var n=r.length;if(null==e)return!n;for(e=_e(e);n--;){var s=r[n],o=t[s],i=e[s];if(i===a&&!(s in e)||!o(i))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new Ce(s);return Cs(function(){e.apply(a,r)},t)}function cn(e,t,r,n){var a=-1,s=Lt,o=!0,i=e.length,l=[],c=t.length;if(!i)return l;r&&(t=Nt(t,Gt(r))),n?(s=Ot,o=!1):t.length>=200&&(s=Qt,o=!1,t=new Vr(t));e:for(;++a<i;){var u=e[a],d=null==r?u:r(u);if(u=n||0!==u?u:0,o&&d==d){for(var p=c;p--;)if(t[p]===d)continue e;l.push(u)}else s(t,d,n)||l.push(u)}return l}Fr.templateSettings={escape:G,evaluate:K,interpolate:Q,variable:"",imports:{_:Fr}},Fr.prototype=$r.prototype,Fr.prototype.constructor=Fr,zr.prototype=Mr($r.prototype),zr.prototype.constructor=zr,Ur.prototype=Mr($r.prototype),Ur.prototype.constructor=Ur,qr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},qr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qr.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===o?a:r}return Re.call(t,e)?t[e]:a},qr.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==a:Re.call(t,e)},qr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===a?o:t,this},Zr.prototype.clear=function(){this.__data__=[],this.size=0},Zr.prototype.delete=function(e){var t=this.__data__,r=Yr(t,e);return!(r<0||(r==t.length-1?t.pop():He.call(t,r,1),--this.size,0))},Zr.prototype.get=function(e){var t=this.__data__,r=Yr(t,e);return r<0?a:t[r][1]},Zr.prototype.has=function(e){return Yr(this.__data__,e)>-1},Zr.prototype.set=function(e,t){var r=this.__data__,n=Yr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Br.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Er||Zr),string:new qr}},Br.prototype.delete=function(e){var t=os(this,e).delete(e);return this.size-=t?1:0,t},Br.prototype.get=function(e){return os(this,e).get(e)},Br.prototype.has=function(e){return os(this,e).has(e)},Br.prototype.set=function(e,t){var r=os(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Vr.prototype.add=Vr.prototype.push=function(e){return this.__data__.set(e,o),this},Vr.prototype.has=function(e){return this.__data__.has(e)},Xr.prototype.clear=function(){this.__data__=new Zr,this.size=0},Xr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Xr.prototype.get=function(e){return this.__data__.get(e)},Xr.prototype.has=function(e){return this.__data__.has(e)},Xr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Zr){var n=r.__data__;if(!Er||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Br(n)}return r.set(e,t),this.size=r.size,this};var un=Oa(vn),dn=Oa(bn,!0);function pn(e,t){var r=!0;return un(e,function(e,n,a){return r=!!t(e,n,a)}),r}function fn(e,t,r){for(var n=-1,s=e.length;++n<s;){var o=e[n],i=t(o);if(null!=i&&(l===a?i==i&&!ii(i):r(i,l)))var l=i,c=o}return c}function hn(e,t){var r=[];return un(e,function(e,n,a){t(e,n,a)&&r.push(e)}),r}function mn(e,t,r,n,a){var s=-1,o=e.length;for(r||(r=hs),a||(a=[]);++s<o;){var i=e[s];t>0&&r(i)?t>1?mn(i,t-1,r,n,a):It(a,i):n||(a[a.length]=i)}return a}var gn=Na(),yn=Na(!0);function vn(e,t){return e&&gn(e,t,Oi)}function bn(e,t){return e&&yn(e,t,Oi)}function Tn(e,t){return At(t,function(t){return Ko(e[t])})}function wn(e,t){for(var r=0,n=(t=ga(t,e)).length;null!=e&&r<n;)e=e[Ds(t[r++])];return r&&r==n?e:a}function En(e,t,r){var n=t(e);return Zo(e)?n:It(n,r(e))}function Sn(e){return null==e?e===a?"[object Undefined]":"[object Null]":Je&&Je in _e(e)?function(e){var t=Re.call(e,Je),r=e[Je];try{e[Je]=a;var n=!0}catch(e){}var s=je.call(e);return n&&(t?e[Je]=r:delete e[Je]),s}(e):function(e){return je.call(e)}(e)}function _n(e,t){return e>t}function xn(e,t){return null!=e&&Re.call(e,t)}function Pn(e,t){return null!=e&&t in _e(e)}function Cn(e,t,r){for(var s=r?Ot:Lt,o=e[0].length,i=e.length,l=i,c=n(i),u=1/0,d=[];l--;){var p=e[l];l&&t&&(p=Nt(p,Gt(t))),u=gr(p.length,u),c[l]=!r&&(t||o>=120&&p.length>=120)?new Vr(l&&p):a}p=e[0];var f=-1,h=c[0];e:for(;++f<o&&d.length<u;){var m=p[f],g=t?t(m):m;if(m=r||0!==m?m:0,!(h?Qt(h,g):s(d,g,r))){for(l=i;--l;){var y=c[l];if(!(y?Qt(y,g):s(e[l],g,r)))continue e}h&&h.push(g),d.push(m)}}return d}function An(e,t,r){var n=null==(e=_s(e,t=ga(t,e)))?e:e[Ds(Ws(t))];return null==n?a:St(n,e,r)}function Ln(e){return ei(e)&&Sn(e)==m}function On(e,t,r,n,s){return e===t||(null==e||null==t||!ei(e)&&!ei(t)?e!=e&&t!=t:function(e,t,r,n,s,o){var i=Zo(e),l=Zo(t),c=i?g:ds(e),u=l?g:ds(t),d=(c=c==m?_:c)==_,p=(u=u==m?_:u)==_,f=c==u;if(f&&Ho(e)){if(!Ho(t))return!1;i=!0,d=!1}if(f&&!d)return o||(o=new Xr),i||li(e)?Ja(e,t,r,n,s,o):function(e,t,r,n,a,s,o){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!s(new qe(e),new qe(t)));case y:case v:case S:return $o(+e,+t);case b:return e.name==t.name&&e.message==t.message;case P:case A:return e==t+"";case E:var i=ar;case C:var l=1&n;if(i||(i=ir),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=2,o.set(e,t);var u=Ja(i(e),i(t),n,a,s,o);return o.delete(e),u;case L:if(Dr)return Dr.call(e)==Dr.call(t)}return!1}(e,t,c,r,n,s,o);if(!(1&r)){var h=d&&Re.call(e,"__wrapped__"),T=p&&Re.call(t,"__wrapped__");if(h||T){var w=h?e.value():e,x=T?t.value():t;return o||(o=new Xr),s(w,x,r,n,o)}}return!!f&&(o||(o=new Xr),function(e,t,r,n,s,o){var i=1&r,l=es(e),c=l.length;if(c!=es(t).length&&!i)return!1;for(var u=c;u--;){var d=l[u];if(!(i?d in t:Re.call(t,d)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var h=!0;o.set(e,t),o.set(t,e);for(var m=i;++u<c;){var g=e[d=l[u]],y=t[d];if(n)var v=i?n(y,g,d,t,e,o):n(g,y,d,e,t,o);if(!(v===a?g===y||s(g,y,r,n,o):v)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,T=t.constructor;b==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof T&&T instanceof T||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,r,n,s,o))}(e,t,r,n,On,s))}function Nn(e,t,r,n){var s=r.length,o=s,i=!n;if(null==e)return!o;for(e=_e(e);s--;){var l=r[s];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<o;){var c=(l=r[s])[0],u=e[c],d=l[1];if(i&&l[2]){if(u===a&&!(c in e))return!1}else{var p=new Xr;if(n)var f=n(u,d,c,e,t,p);if(!(f===a?On(d,u,3,n,p):f))return!1}}return!0}function In(e){return!(!Yo(e)||(t=e,De&&De in t))&&(Ko(e)?$e:me).test(js(e));var t}function Rn(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Zo(e)?Mn(e[0],e[1]):Fn(e):dl(e)}function kn(e){if(!Ts(e))return hr(e);var t=[];for(var r in _e(e))Re.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Dn(e,t){return e<t}function jn(e,t){var r=-1,a=Vo(e)?n(e.length):[];return un(e,function(e,n,s){a[++r]=t(e,n,s)}),a}function Fn(e){var t=is(e);return 1==t.length&&t[0][2]?Es(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Mn(e,t){return ys(e)&&ws(t)?Es(Ds(e),t):function(r){var n=xi(r,e);return n===a&&n===t?Pi(r,e):On(t,n,3)}}function $n(e,t,r,n,s){e!==t&&gn(t,function(o,i){if(s||(s=new Xr),Yo(o))!function(e,t,r,n,s,o,i){var l=xs(e,r),c=xs(t,r),u=i.get(c);if(u)Qr(e,r,u);else{var d=o?o(l,c,r+"",e,t,i):a,p=d===a;if(p){var f=Zo(c),h=!f&&Ho(c),m=!f&&!h&&li(c);d=c,f||h||m?Zo(l)?d=l:Xo(l)?d=Pa(l):h?(p=!1,d=Ta(c,!0)):m?(p=!1,d=Ea(c,!0)):d=[]:ni(c)||qo(c)?(d=l,qo(l)?d=gi(l):Yo(l)&&!Ko(l)||(d=fs(c))):p=!1}p&&(i.set(c,d),s(d,c,n,o,i),i.delete(c)),Qr(e,r,d)}}(e,t,i,r,$n,n,s);else{var l=n?n(xs(e,i),o,i+"",e,t,s):a;l===a&&(l=o),Qr(e,i,l)}},Ni)}function zn(e,t){var r=e.length;if(r)return ms(t+=t<0?r:0,r)?e[t]:a}function Un(e,t,r){t=t.length?Nt(t,function(e){return Zo(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e}):[rl];var n=-1;t=Nt(t,Gt(ss()));var a=jn(e,function(e,r,a){var s=Nt(t,function(t){return t(e)});return{criteria:s,index:++n,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,r){for(var n=-1,a=e.criteria,s=t.criteria,o=a.length,i=r.length;++n<o;){var l=Sa(a[n],s[n]);if(l)return n>=i?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)});t--;)e[t]=e[t].value;return e}(a)}function qn(e,t,r){for(var n=-1,a=t.length,s={};++n<a;){var o=t[n],i=wn(e,o);r(i,o)&&Kn(s,ga(o,e),i)}return s}function Zn(e,t,r,n){var a=n?zt:$t,s=-1,o=t.length,i=e;for(e===t&&(t=Pa(t)),r&&(i=Nt(e,Gt(r)));++s<o;)for(var l=0,c=t[s],u=r?r(c):c;(l=a(i,u,l,n))>-1;)i!==e&&He.call(i,l,1),He.call(e,l,1);return e}function Bn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var a=t[r];if(r==n||a!==s){var s=a;ms(a)?He.call(e,a,1):la(e,a)}}return e}function Vn(e,t){return e+ft(br()*(t-e+1))}function Xn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=ft(t/2))&&(e+=e)}while(t);return r}function Hn(e,t){return As(Ss(e,t,rl),e+"")}function Wn(e){return Wr($i(e))}function Gn(e,t){var r=$i(e);return Ns(r,an(t,0,r.length))}function Kn(e,t,r,n){if(!Yo(e))return e;for(var s=-1,o=(t=ga(t,e)).length,i=o-1,l=e;null!=l&&++s<o;){var c=Ds(t[s]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=i){var d=l[c];(u=n?n(d,c,l):a)===a&&(u=Yo(d)?d:ms(t[s+1])?[]:{})}Jr(l,c,u),l=l[c]}return e}var Qn=Cr?function(e,t){return Cr.set(e,t),e}:rl,Jn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Yi(t),writable:!0})}:rl;function Yn(e){return Ns($i(e))}function ea(e,t,r){var a=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var o=n(s);++a<s;)o[a]=e[a+t];return o}function ta(e,t){var r;return un(e,function(e,n,a){return!(r=t(e,n,a))}),!!r}function ra(e,t,r){var n=0,a=null==e?n:e.length;if("number"==typeof t&&t==t&&a<=2147483647){for(;n<a;){var s=n+a>>>1,o=e[s];null!==o&&!ii(o)&&(r?o<=t:o<t)?n=s+1:a=s}return a}return na(e,t,rl,r)}function na(e,t,r,n){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var i=(t=r(t))!=t,l=null===t,c=ii(t),u=t===a;s<o;){var d=ft((s+o)/2),p=r(e[d]),f=p!==a,h=null===p,m=p==p,g=ii(p);if(i)var y=n||m;else y=u?m&&(n||f):l?m&&f&&(n||!h):c?m&&f&&!h&&(n||!g):!h&&!g&&(n?p<=t:p<t);y?s=d+1:o=d}return gr(o,4294967294)}function aa(e,t){for(var r=-1,n=e.length,a=0,s=[];++r<n;){var o=e[r],i=t?t(o):o;if(!r||!$o(i,l)){var l=i;s[a++]=0===o?0:o}}return s}function sa(e){return"number"==typeof e?e:ii(e)?p:+e}function oa(e){if("string"==typeof e)return e;if(Zo(e))return Nt(e,oa)+"";if(ii(e))return jr?jr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ia(e,t,r){var n=-1,a=Lt,s=e.length,o=!0,i=[],l=i;if(r)o=!1,a=Ot;else if(s>=200){var c=t?null:Xa(e);if(c)return ir(c);o=!1,a=Qt,l=new Vr}else l=t?[]:i;e:for(;++n<s;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,o&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),i.push(u)}else a(l,d,r)||(l!==i&&l.push(d),i.push(u))}return i}function la(e,t){return null==(e=_s(e,t=ga(t,e)))||delete e[Ds(Ws(t))]}function ca(e,t,r,n){return Kn(e,t,r(wn(e,t)),n)}function ua(e,t,r,n){for(var a=e.length,s=n?a:-1;(n?s--:++s<a)&&t(e[s],s,e););return r?ea(e,n?0:s,n?s+1:a):ea(e,n?s+1:0,n?a:s)}function da(e,t){var r=e;return r instanceof Ur&&(r=r.value()),Rt(t,function(e,t){return t.func.apply(t.thisArg,It([e],t.args))},r)}function pa(e,t,r){var a=e.length;if(a<2)return a?ia(e[0]):[];for(var s=-1,o=n(a);++s<a;)for(var i=e[s],l=-1;++l<a;)l!=s&&(o[s]=cn(o[s]||i,e[l],t,r));return ia(mn(o,1),t,r)}function fa(e,t,r){for(var n=-1,s=e.length,o=t.length,i={};++n<s;){var l=n<o?t[n]:a;r(i,e[n],l)}return i}function ha(e){return Xo(e)?e:[]}function ma(e){return"function"==typeof e?e:rl}function ga(e,t){return Zo(e)?e:ys(e,t)?[e]:ks(yi(e))}var ya=Hn;function va(e,t,r){var n=e.length;return r=r===a?n:r,!t&&r>=n?e:ea(e,t,r)}var ba=ot||function(e){return dt.clearTimeout(e)};function Ta(e,t){if(t)return e.slice();var r=e.length,n=Ze?Ze(r):new e.constructor(r);return e.copy(n),n}function wa(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Ea(e,t){var r=t?wa(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Sa(e,t){if(e!==t){var r=e!==a,n=null===e,s=e==e,o=ii(e),i=t!==a,l=null===t,c=t==t,u=ii(t);if(!l&&!u&&!o&&e>t||o&&i&&c&&!l&&!u||n&&i&&c||!r&&c||!s)return 1;if(!n&&!o&&!u&&e<t||u&&r&&s&&!n&&!o||l&&r&&s||!i&&s||!c)return-1}return 0}function _a(e,t,r,a){for(var s=-1,o=e.length,i=r.length,l=-1,c=t.length,u=mr(o-i,0),d=n(c+u),p=!a;++l<c;)d[l]=t[l];for(;++s<i;)(p||s<o)&&(d[r[s]]=e[s]);for(;u--;)d[l++]=e[s++];return d}function xa(e,t,r,a){for(var s=-1,o=e.length,i=-1,l=r.length,c=-1,u=t.length,d=mr(o-l,0),p=n(d+u),f=!a;++s<d;)p[s]=e[s];for(var h=s;++c<u;)p[h+c]=t[c];for(;++i<l;)(f||s<o)&&(p[h+r[i]]=e[s++]);return p}function Pa(e,t){var r=-1,a=e.length;for(t||(t=n(a));++r<a;)t[r]=e[r];return t}function Ca(e,t,r,n){var s=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var l=t[o],c=n?n(r[l],e[l],l,r,e):a;c===a&&(c=e[l]),s?rn(r,l,c):Jr(r,l,c)}return r}function Aa(e,t){return function(r,n){var a=Zo(r)?_t:en,s=t?t():{};return a(r,e,ss(n,2),s)}}function La(e){return Hn(function(t,r){var n=-1,s=r.length,o=s>1?r[s-1]:a,i=s>2?r[2]:a;for(o=e.length>3&&"function"==typeof o?(s--,o):a,i&&gs(r[0],r[1],i)&&(o=s<3?a:o,s=1),t=_e(t);++n<s;){var l=r[n];l&&e(t,l,n,o)}return t})}function Oa(e,t){return function(r,n){if(null==r)return r;if(!Vo(r))return e(r,n);for(var a=r.length,s=t?a:-1,o=_e(r);(t?s--:++s<a)&&!1!==n(o[s],s,o););return r}}function Na(e){return function(t,r,n){for(var a=-1,s=_e(t),o=n(t),i=o.length;i--;){var l=o[e?i:++a];if(!1===r(s[l],l,s))break}return t}}function Ia(e){return function(t){var r=nr(t=yi(t))?ur(t):a,n=r?r[0]:t.charAt(0),s=r?va(r,1).join(""):t.slice(1);return n[e]()+s}}function Ra(e){return function(t){return Rt(Ki(qi(t).replace(Ke,"")),e,"")}}function ka(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Mr(e.prototype),n=e.apply(r,t);return Yo(n)?n:r}}function Da(e){return function(t,r,n){var s=_e(t);if(!Vo(t)){var o=ss(r,3);t=Oi(t),r=function(e){return o(s[e],e,s)}}var i=e(t,r,n);return i>-1?s[o?t[i]:i]:a}}function ja(e){return Ya(function(t){var r=t.length,n=r,o=zr.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if("fu