dts-linter 0.0.0-alpha18 → 0.0.0-alpha19

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.
@@ -65,7 +65,7 @@ ${JSON.stringify(o,null,4)}`);let f=o;if(ke.string(f.id)||ke.number(f.id)){let g
65
65
  `,y==="\r"&&a+1<m.length&&m.charAt(a+1)===`
66
66
  `&&a++}u&&m.length>0&&p.push(m.length),this._lineOffsets=p}return this._lineOffsets},c.prototype.positionAt=function(p){p=Math.max(Math.min(p,this._content.length),0);var m=this.getLineOffsets(),u=0,a=m.length;if(a===0)return d.create(0,p);for(;u<a;){var y=Math.floor((u+a)/2);m[y]>p?a=y:u=y+1}var k=u-1;return d.create(k,p-m[k])},c.prototype.offsetAt=function(p){var m=this.getLineOffsets();if(p.line>=m.length)return this._content.length;if(p.line<0)return 0;var u=m[p.line],a=p.line+1<m.length?m[p.line+1]:this._content.length;return Math.max(Math.min(u+p.character,a),u)},Object.defineProperty(c.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),c}(),v;(function(c){var p=Object.prototype.toString;function m(te){return typeof te<"u"}c.defined=m;function u(te){return typeof te>"u"}c.undefined=u;function a(te){return te===!0||te===!1}c.boolean=a;function y(te){return p.call(te)==="[object String]"}c.string=y;function k(te){return p.call(te)==="[object Number]"}c.number=k;function J(te,Xr,ri){return p.call(te)==="[object Number]"&&Xr<=te&&te<=ri}c.numberRange=J;function Ce(te){return p.call(te)==="[object Number]"&&-2147483648<=te&&te<=2147483647}c.integer=Ce;function le(te){return p.call(te)==="[object Number]"&&0<=te&&te<=2147483647}c.uinteger=le;function ht(te){return p.call(te)==="[object Function]"}c.func=ht;function pt(te){return te!==null&&typeof te=="object"}c.objectLiteral=pt;function Nt(te,Xr){return Array.isArray(te)&&te.every(Xr)}c.typedArray=Nt})(v||(v={}))})});var be=M(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.ProtocolNotificationType=Ge.ProtocolNotificationType0=Ge.ProtocolRequestType=Ge.ProtocolRequestType0=Ge.RegistrationType=Ge.MessageDirection=void 0;var gn=yr(),Pu;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(Pu||(Ge.MessageDirection=Pu={}));var Ua=class{constructor(e){this.method=e}};Ge.RegistrationType=Ua;var Ba=class extends gn.RequestType0{constructor(e){super(e)}};Ge.ProtocolRequestType0=Ba;var Ha=class extends gn.RequestType{constructor(e){super(e,gn.ParameterStructures.byName)}};Ge.ProtocolRequestType=Ha;var Za=class extends gn.NotificationType0{constructor(e){super(e)}};Ge.ProtocolNotificationType0=Za;var Ja=class extends gn.NotificationType{constructor(e){super(e,gn.ParameterStructures.byName)}};Ge.ProtocolNotificationType=Ja});var Zi=M(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.objectLiteral=De.typedArray=De.stringArray=De.array=De.func=De.error=De.number=De.string=De.boolean=void 0;function mp(t){return t===!0||t===!1}De.boolean=mp;function xu(t){return typeof t=="string"||t instanceof String}De.string=xu;function gp(t){return typeof t=="number"||t instanceof Number}De.number=gp;function yp(t){return t instanceof Error}De.error=yp;function vp(t){return typeof t=="function"}De.func=vp;function Du(t){return Array.isArray(t)}De.array=Du;function _p(t){return Du(t)&&t.every(e=>xu(e))}De.stringArray=_p;function bp(t,e){return Array.isArray(t)&&t.every(e)}De.typedArray=bp;function wp(t){return t!==null&&typeof t=="object"}De.objectLiteral=wp});var Nu=M(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.ImplementationRequest=void 0;var Eu=be(),Ou;(function(t){t.method="textDocument/implementation",t.messageDirection=Eu.MessageDirection.clientToServer,t.type=new Eu.ProtocolRequestType(t.method)})(Ou||(Ji.ImplementationRequest=Ou={}))});var qu=M(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.TypeDefinitionRequest=void 0;var Mu=be(),ju;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=Mu.MessageDirection.clientToServer,t.type=new Mu.ProtocolRequestType(t.method)})(ju||(Gi.TypeDefinitionRequest=ju={}))});var Lu=M(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.DidChangeWorkspaceFoldersNotification=yn.WorkspaceFoldersRequest=void 0;var Qi=be(),Iu;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=Qi.MessageDirection.serverToClient,t.type=new Qi.ProtocolRequestType0(t.method)})(Iu||(yn.WorkspaceFoldersRequest=Iu={}));var Au;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=Qi.MessageDirection.clientToServer,t.type=new Qi.ProtocolNotificationType(t.method)})(Au||(yn.DidChangeWorkspaceFoldersNotification=Au={}))});var Wu=M(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.ConfigurationRequest=void 0;var $u=be(),Fu;(function(t){t.method="workspace/configuration",t.messageDirection=$u.MessageDirection.serverToClient,t.type=new $u.ProtocolRequestType(t.method)})(Fu||(Xi.ConfigurationRequest=Fu={}))});var Uu=M(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.ColorPresentationRequest=vn.DocumentColorRequest=void 0;var Yi=be(),Vu;(function(t){t.method="textDocument/documentColor",t.messageDirection=Yi.MessageDirection.clientToServer,t.type=new Yi.ProtocolRequestType(t.method)})(Vu||(vn.DocumentColorRequest=Vu={}));var zu;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=Yi.MessageDirection.clientToServer,t.type=new Yi.ProtocolRequestType(t.method)})(zu||(vn.ColorPresentationRequest=zu={}))});var Zu=M(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.FoldingRangeRefreshRequest=_n.FoldingRangeRequest=void 0;var Ki=be(),Bu;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Ki.MessageDirection.clientToServer,t.type=new Ki.ProtocolRequestType(t.method)})(Bu||(_n.FoldingRangeRequest=Bu={}));var Hu;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Ki.MessageDirection.serverToClient,t.type=new Ki.ProtocolRequestType0(t.method)})(Hu||(_n.FoldingRangeRefreshRequest=Hu={}))});var Qu=M(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.DeclarationRequest=void 0;var Ju=be(),Gu;(function(t){t.method="textDocument/declaration",t.messageDirection=Ju.MessageDirection.clientToServer,t.type=new Ju.ProtocolRequestType(t.method)})(Gu||(es.DeclarationRequest=Gu={}))});var Ku=M(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.SelectionRangeRequest=void 0;var Xu=be(),Yu;(function(t){t.method="textDocument/selectionRange",t.messageDirection=Xu.MessageDirection.clientToServer,t.type=new Xu.ProtocolRequestType(t.method)})(Yu||(ts.SelectionRangeRequest=Yu={}))});var nd=M(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.WorkDoneProgressCancelNotification=rr.WorkDoneProgressCreateRequest=rr.WorkDoneProgress=void 0;var Tp=yr(),rs=be(),ed;(function(t){t.type=new Tp.ProgressType;function e(r){return r===t.type}t.is=e})(ed||(rr.WorkDoneProgress=ed={}));var td;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=rs.MessageDirection.serverToClient,t.type=new rs.ProtocolRequestType(t.method)})(td||(rr.WorkDoneProgressCreateRequest=td={}));var rd;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=rs.MessageDirection.clientToServer,t.type=new rs.ProtocolNotificationType(t.method)})(rd||(rr.WorkDoneProgressCancelNotification=rd={}))});var ad=M(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.CallHierarchyOutgoingCallsRequest=nr.CallHierarchyIncomingCallsRequest=nr.CallHierarchyPrepareRequest=void 0;var bn=be(),id;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=bn.MessageDirection.clientToServer,t.type=new bn.ProtocolRequestType(t.method)})(id||(nr.CallHierarchyPrepareRequest=id={}));var sd;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=bn.MessageDirection.clientToServer,t.type=new bn.ProtocolRequestType(t.method)})(sd||(nr.CallHierarchyIncomingCallsRequest=sd={}));var od;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=bn.MessageDirection.clientToServer,t.type=new bn.ProtocolRequestType(t.method)})(od||(nr.CallHierarchyOutgoingCallsRequest=od={}))});var hd=M(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.SemanticTokensRefreshRequest=Qe.SemanticTokensRangeRequest=Qe.SemanticTokensDeltaRequest=Qe.SemanticTokensRequest=Qe.SemanticTokensRegistrationType=Qe.TokenFormat=void 0;var qt=be(),cd;(function(t){t.Relative="relative"})(cd||(Qe.TokenFormat=cd={}));var Gn;(function(t){t.method="textDocument/semanticTokens",t.type=new qt.RegistrationType(t.method)})(Gn||(Qe.SemanticTokensRegistrationType=Gn={}));var ud;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=qt.MessageDirection.clientToServer,t.type=new qt.ProtocolRequestType(t.method),t.registrationMethod=Gn.method})(ud||(Qe.SemanticTokensRequest=ud={}));var dd;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=qt.MessageDirection.clientToServer,t.type=new qt.ProtocolRequestType(t.method),t.registrationMethod=Gn.method})(dd||(Qe.SemanticTokensDeltaRequest=dd={}));var ld;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=qt.MessageDirection.clientToServer,t.type=new qt.ProtocolRequestType(t.method),t.registrationMethod=Gn.method})(ld||(Qe.SemanticTokensRangeRequest=ld={}));var fd;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=qt.MessageDirection.serverToClient,t.type=new qt.ProtocolRequestType0(t.method)})(fd||(Qe.SemanticTokensRefreshRequest=fd={}))});var gd=M(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.ShowDocumentRequest=void 0;var pd=be(),md;(function(t){t.method="window/showDocument",t.messageDirection=pd.MessageDirection.serverToClient,t.type=new pd.ProtocolRequestType(t.method)})(md||(ns.ShowDocumentRequest=md={}))});var _d=M(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.LinkedEditingRangeRequest=void 0;var yd=be(),vd;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=yd.MessageDirection.clientToServer,t.type=new yd.ProtocolRequestType(t.method)})(vd||(is.LinkedEditingRangeRequest=vd={}))});var Pd=M(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.WillDeleteFilesRequest=Ve.DidDeleteFilesNotification=Ve.DidRenameFilesNotification=Ve.WillRenameFilesRequest=Ve.DidCreateFilesNotification=Ve.WillCreateFilesRequest=Ve.FileOperationPatternKind=void 0;var ot=be(),bd;(function(t){t.file="file",t.folder="folder"})(bd||(Ve.FileOperationPatternKind=bd={}));var wd;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolRequestType(t.method)})(wd||(Ve.WillCreateFilesRequest=wd={}));var Td;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolNotificationType(t.method)})(Td||(Ve.DidCreateFilesNotification=Td={}));var Rd;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolRequestType(t.method)})(Rd||(Ve.WillRenameFilesRequest=Rd={}));var kd;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolNotificationType(t.method)})(kd||(Ve.DidRenameFilesNotification=kd={}));var Sd;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolNotificationType(t.method)})(Sd||(Ve.DidDeleteFilesNotification=Sd={}));var Cd;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=ot.MessageDirection.clientToServer,t.type=new ot.ProtocolRequestType(t.method)})(Cd||(Ve.WillDeleteFilesRequest=Cd={}))});var Nd=M(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.MonikerRequest=ir.MonikerKind=ir.UniquenessLevel=void 0;var xd=be(),Dd;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(Dd||(ir.UniquenessLevel=Dd={}));var Ed;(function(t){t.$import="import",t.$export="export",t.local="local"})(Ed||(ir.MonikerKind=Ed={}));var Od;(function(t){t.method="textDocument/moniker",t.messageDirection=xd.MessageDirection.clientToServer,t.type=new xd.ProtocolRequestType(t.method)})(Od||(ir.MonikerRequest=Od={}))});var Id=M(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.TypeHierarchySubtypesRequest=sr.TypeHierarchySupertypesRequest=sr.TypeHierarchyPrepareRequest=void 0;var wn=be(),Md;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=wn.MessageDirection.clientToServer,t.type=new wn.ProtocolRequestType(t.method)})(Md||(sr.TypeHierarchyPrepareRequest=Md={}));var jd;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=wn.MessageDirection.clientToServer,t.type=new wn.ProtocolRequestType(t.method)})(jd||(sr.TypeHierarchySupertypesRequest=jd={}));var qd;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=wn.MessageDirection.clientToServer,t.type=new wn.ProtocolRequestType(t.method)})(qd||(sr.TypeHierarchySubtypesRequest=qd={}))});var $d=M(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.InlineValueRefreshRequest=Tn.InlineValueRequest=void 0;var ss=be(),Ad;(function(t){t.method="textDocument/inlineValue",t.messageDirection=ss.MessageDirection.clientToServer,t.type=new ss.ProtocolRequestType(t.method)})(Ad||(Tn.InlineValueRequest=Ad={}));var Ld;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=ss.MessageDirection.serverToClient,t.type=new ss.ProtocolRequestType0(t.method)})(Ld||(Tn.InlineValueRefreshRequest=Ld={}))});var zd=M(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.InlayHintRefreshRequest=or.InlayHintResolveRequest=or.InlayHintRequest=void 0;var Rn=be(),Fd;(function(t){t.method="textDocument/inlayHint",t.messageDirection=Rn.MessageDirection.clientToServer,t.type=new Rn.ProtocolRequestType(t.method)})(Fd||(or.InlayHintRequest=Fd={}));var Wd;(function(t){t.method="inlayHint/resolve",t.messageDirection=Rn.MessageDirection.clientToServer,t.type=new Rn.ProtocolRequestType(t.method)})(Wd||(or.InlayHintResolveRequest=Wd={}));var Vd;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=Rn.MessageDirection.serverToClient,t.type=new Rn.ProtocolRequestType0(t.method)})(Vd||(or.InlayHintRefreshRequest=Vd={}))});var Qd=M(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.DiagnosticRefreshRequest=at.WorkspaceDiagnosticRequest=at.DocumentDiagnosticRequest=at.DocumentDiagnosticReportKind=at.DiagnosticServerCancellationData=void 0;var Gd=yr(),Rp=Zi(),kn=be(),Ud;(function(t){function e(r){let n=r;return n&&Rp.boolean(n.retriggerRequest)}t.is=e})(Ud||(at.DiagnosticServerCancellationData=Ud={}));var Bd;(function(t){t.Full="full",t.Unchanged="unchanged"})(Bd||(at.DocumentDiagnosticReportKind=Bd={}));var Hd;(function(t){t.method="textDocument/diagnostic",t.messageDirection=kn.MessageDirection.clientToServer,t.type=new kn.ProtocolRequestType(t.method),t.partialResult=new Gd.ProgressType})(Hd||(at.DocumentDiagnosticRequest=Hd={}));var Zd;(function(t){t.method="workspace/diagnostic",t.messageDirection=kn.MessageDirection.clientToServer,t.type=new kn.ProtocolRequestType(t.method),t.partialResult=new Gd.ProgressType})(Zd||(at.WorkspaceDiagnosticRequest=Zd={}));var Jd;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=kn.MessageDirection.serverToClient,t.type=new kn.ProtocolRequestType0(t.method)})(Jd||(at.DiagnosticRefreshRequest=Jd={}))});var nl=M(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.DidCloseNotebookDocumentNotification=Pe.DidSaveNotebookDocumentNotification=Pe.DidChangeNotebookDocumentNotification=Pe.NotebookCellArrayChange=Pe.DidOpenNotebookDocumentNotification=Pe.NotebookDocumentSyncRegistrationType=Pe.NotebookDocument=Pe.NotebookCell=Pe.ExecutionSummary=Pe.NotebookCellKind=void 0;var Qn=Hi(),yt=Zi(),Rt=be(),Ga;(function(t){t.Markup=1,t.Code=2;function e(r){return r===1||r===2}t.is=e})(Ga||(Pe.NotebookCellKind=Ga={}));var Qa;(function(t){function e(i,s){let d={executionOrder:i};return(s===!0||s===!1)&&(d.success=s),d}t.create=e;function r(i){let s=i;return yt.objectLiteral(s)&&Qn.uinteger.is(s.executionOrder)&&(s.success===void 0||yt.boolean(s.success))}t.is=r;function n(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=n})(Qa||(Pe.ExecutionSummary=Qa={}));var os;(function(t){function e(s,d){return{kind:s,document:d}}t.create=e;function r(s){let d=s;return yt.objectLiteral(d)&&Ga.is(d.kind)&&Qn.DocumentUri.is(d.document)&&(d.metadata===void 0||yt.objectLiteral(d.metadata))}t.is=r;function n(s,d){let h=new Set;return s.document!==d.document&&h.add("document"),s.kind!==d.kind&&h.add("kind"),s.executionSummary!==d.executionSummary&&h.add("executionSummary"),(s.metadata!==void 0||d.metadata!==void 0)&&!i(s.metadata,d.metadata)&&h.add("metadata"),(s.executionSummary!==void 0||d.executionSummary!==void 0)&&!Qa.equals(s.executionSummary,d.executionSummary)&&h.add("executionSummary"),h}t.diff=n;function i(s,d){if(s===d)return!0;if(s==null||d===null||d===void 0||typeof s!=typeof d||typeof s!="object")return!1;let h=Array.isArray(s),R=Array.isArray(d);if(h!==R)return!1;if(h&&R){if(s.length!==d.length)return!1;for(let T=0;T<s.length;T++)if(!i(s[T],d[T]))return!1}if(yt.objectLiteral(s)&&yt.objectLiteral(d)){let T=Object.keys(s),P=Object.keys(d);if(T.length!==P.length||(T.sort(),P.sort(),!i(T,P)))return!1;for(let Z=0;Z<T.length;Z++){let se=T[Z];if(!i(s[se],d[se]))return!1}}return!0}})(os||(Pe.NotebookCell=os={}));var Xd;(function(t){function e(n,i,s,d){return{uri:n,notebookType:i,version:s,cells:d}}t.create=e;function r(n){let i=n;return yt.objectLiteral(i)&&yt.string(i.uri)&&Qn.integer.is(i.version)&&yt.typedArray(i.cells,os.is)}t.is=r})(Xd||(Pe.NotebookDocument=Xd={}));var Sn;(function(t){t.method="notebookDocument/sync",t.messageDirection=Rt.MessageDirection.clientToServer,t.type=new Rt.RegistrationType(t.method)})(Sn||(Pe.NotebookDocumentSyncRegistrationType=Sn={}));var Yd;(function(t){t.method="notebookDocument/didOpen",t.messageDirection=Rt.MessageDirection.clientToServer,t.type=new Rt.ProtocolNotificationType(t.method),t.registrationMethod=Sn.method})(Yd||(Pe.DidOpenNotebookDocumentNotification=Yd={}));var Kd;(function(t){function e(n){let i=n;return yt.objectLiteral(i)&&Qn.uinteger.is(i.start)&&Qn.uinteger.is(i.deleteCount)&&(i.cells===void 0||yt.typedArray(i.cells,os.is))}t.is=e;function r(n,i,s){let d={start:n,deleteCount:i};return s!==void 0&&(d.cells=s),d}t.create=r})(Kd||(Pe.NotebookCellArrayChange=Kd={}));var el;(function(t){t.method="notebookDocument/didChange",t.messageDirection=Rt.MessageDirection.clientToServer,t.type=new Rt.ProtocolNotificationType(t.method),t.registrationMethod=Sn.method})(el||(Pe.DidChangeNotebookDocumentNotification=el={}));var tl;(function(t){t.method="notebookDocument/didSave",t.messageDirection=Rt.MessageDirection.clientToServer,t.type=new Rt.ProtocolNotificationType(t.method),t.registrationMethod=Sn.method})(tl||(Pe.DidSaveNotebookDocumentNotification=tl={}));var rl;(function(t){t.method="notebookDocument/didClose",t.messageDirection=Rt.MessageDirection.clientToServer,t.type=new Rt.ProtocolNotificationType(t.method),t.registrationMethod=Sn.method})(rl||(Pe.DidCloseNotebookDocumentNotification=rl={}))});var ol=M(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.InlineCompletionRequest=void 0;var il=be(),sl;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=il.MessageDirection.clientToServer,t.type=new il.ProtocolRequestType(t.method)})(sl||(as.InlineCompletionRequest=sl={}))});var bf=M(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});l.WorkspaceSymbolRequest=l.CodeActionResolveRequest=l.CodeActionRequest=l.DocumentSymbolRequest=l.DocumentHighlightRequest=l.ReferencesRequest=l.DefinitionRequest=l.SignatureHelpRequest=l.SignatureHelpTriggerKind=l.HoverRequest=l.CompletionResolveRequest=l.CompletionRequest=l.CompletionTriggerKind=l.PublishDiagnosticsNotification=l.WatchKind=l.RelativePattern=l.FileChangeType=l.DidChangeWatchedFilesNotification=l.WillSaveTextDocumentWaitUntilRequest=l.WillSaveTextDocumentNotification=l.TextDocumentSaveReason=l.DidSaveTextDocumentNotification=l.DidCloseTextDocumentNotification=l.DidChangeTextDocumentNotification=l.TextDocumentContentChangeEvent=l.DidOpenTextDocumentNotification=l.TextDocumentSyncKind=l.TelemetryEventNotification=l.LogMessageNotification=l.ShowMessageRequest=l.ShowMessageNotification=l.MessageType=l.DidChangeConfigurationNotification=l.ExitNotification=l.ShutdownRequest=l.InitializedNotification=l.InitializeErrorCodes=l.InitializeRequest=l.WorkDoneProgressOptions=l.TextDocumentRegistrationOptions=l.StaticRegistrationOptions=l.PositionEncodingKind=l.FailureHandlingKind=l.ResourceOperationKind=l.UnregistrationRequest=l.RegistrationRequest=l.DocumentSelector=l.NotebookCellTextDocumentFilter=l.NotebookDocumentFilter=l.TextDocumentFilter=void 0;l.MonikerRequest=l.MonikerKind=l.UniquenessLevel=l.WillDeleteFilesRequest=l.DidDeleteFilesNotification=l.WillRenameFilesRequest=l.DidRenameFilesNotification=l.WillCreateFilesRequest=l.DidCreateFilesNotification=l.FileOperationPatternKind=l.LinkedEditingRangeRequest=l.ShowDocumentRequest=l.SemanticTokensRegistrationType=l.SemanticTokensRefreshRequest=l.SemanticTokensRangeRequest=l.SemanticTokensDeltaRequest=l.SemanticTokensRequest=l.TokenFormat=l.CallHierarchyPrepareRequest=l.CallHierarchyOutgoingCallsRequest=l.CallHierarchyIncomingCallsRequest=l.WorkDoneProgressCancelNotification=l.WorkDoneProgressCreateRequest=l.WorkDoneProgress=l.SelectionRangeRequest=l.DeclarationRequest=l.FoldingRangeRefreshRequest=l.FoldingRangeRequest=l.ColorPresentationRequest=l.DocumentColorRequest=l.ConfigurationRequest=l.DidChangeWorkspaceFoldersNotification=l.WorkspaceFoldersRequest=l.TypeDefinitionRequest=l.ImplementationRequest=l.ApplyWorkspaceEditRequest=l.ExecuteCommandRequest=l.PrepareRenameRequest=l.RenameRequest=l.PrepareSupportDefaultBehavior=l.DocumentOnTypeFormattingRequest=l.DocumentRangesFormattingRequest=l.DocumentRangeFormattingRequest=l.DocumentFormattingRequest=l.DocumentLinkResolveRequest=l.DocumentLinkRequest=l.CodeLensRefreshRequest=l.CodeLensResolveRequest=l.CodeLensRequest=l.WorkspaceSymbolResolveRequest=void 0;l.InlineCompletionRequest=l.DidCloseNotebookDocumentNotification=l.DidSaveNotebookDocumentNotification=l.DidChangeNotebookDocumentNotification=l.NotebookCellArrayChange=l.DidOpenNotebookDocumentNotification=l.NotebookDocumentSyncRegistrationType=l.NotebookDocument=l.NotebookCell=l.ExecutionSummary=l.NotebookCellKind=l.DiagnosticRefreshRequest=l.WorkspaceDiagnosticRequest=l.DocumentDiagnosticRequest=l.DocumentDiagnosticReportKind=l.DiagnosticServerCancellationData=l.InlayHintRefreshRequest=l.InlayHintResolveRequest=l.InlayHintRequest=l.InlineValueRefreshRequest=l.InlineValueRequest=l.TypeHierarchySupertypesRequest=l.TypeHierarchySubtypesRequest=l.TypeHierarchyPrepareRequest=void 0;var C=be(),al=Hi(),Ee=Zi(),kp=Nu();Object.defineProperty(l,"ImplementationRequest",{enumerable:!0,get:function(){return kp.ImplementationRequest}});var Sp=qu();Object.defineProperty(l,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Sp.TypeDefinitionRequest}});var gf=Lu();Object.defineProperty(l,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return gf.WorkspaceFoldersRequest}});Object.defineProperty(l,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return gf.DidChangeWorkspaceFoldersNotification}});var Cp=Wu();Object.defineProperty(l,"ConfigurationRequest",{enumerable:!0,get:function(){return Cp.ConfigurationRequest}});var yf=Uu();Object.defineProperty(l,"DocumentColorRequest",{enumerable:!0,get:function(){return yf.DocumentColorRequest}});Object.defineProperty(l,"ColorPresentationRequest",{enumerable:!0,get:function(){return yf.ColorPresentationRequest}});var vf=Zu();Object.defineProperty(l,"FoldingRangeRequest",{enumerable:!0,get:function(){return vf.FoldingRangeRequest}});Object.defineProperty(l,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return vf.FoldingRangeRefreshRequest}});var Pp=Qu();Object.defineProperty(l,"DeclarationRequest",{enumerable:!0,get:function(){return Pp.DeclarationRequest}});var xp=Ku();Object.defineProperty(l,"SelectionRangeRequest",{enumerable:!0,get:function(){return xp.SelectionRangeRequest}});var tc=nd();Object.defineProperty(l,"WorkDoneProgress",{enumerable:!0,get:function(){return tc.WorkDoneProgress}});Object.defineProperty(l,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return tc.WorkDoneProgressCreateRequest}});Object.defineProperty(l,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return tc.WorkDoneProgressCancelNotification}});var rc=ad();Object.defineProperty(l,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return rc.CallHierarchyIncomingCallsRequest}});Object.defineProperty(l,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return rc.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(l,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return rc.CallHierarchyPrepareRequest}});var Cn=hd();Object.defineProperty(l,"TokenFormat",{enumerable:!0,get:function(){return Cn.TokenFormat}});Object.defineProperty(l,"SemanticTokensRequest",{enumerable:!0,get:function(){return Cn.SemanticTokensRequest}});Object.defineProperty(l,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Cn.SemanticTokensDeltaRequest}});Object.defineProperty(l,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Cn.SemanticTokensRangeRequest}});Object.defineProperty(l,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Cn.SemanticTokensRefreshRequest}});Object.defineProperty(l,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Cn.SemanticTokensRegistrationType}});var Dp=gd();Object.defineProperty(l,"ShowDocumentRequest",{enumerable:!0,get:function(){return Dp.ShowDocumentRequest}});var Ep=_d();Object.defineProperty(l,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return Ep.LinkedEditingRangeRequest}});var vr=Pd();Object.defineProperty(l,"FileOperationPatternKind",{enumerable:!0,get:function(){return vr.FileOperationPatternKind}});Object.defineProperty(l,"DidCreateFilesNotification",{enumerable:!0,get:function(){return vr.DidCreateFilesNotification}});Object.defineProperty(l,"WillCreateFilesRequest",{enumerable:!0,get:function(){return vr.WillCreateFilesRequest}});Object.defineProperty(l,"DidRenameFilesNotification",{enumerable:!0,get:function(){return vr.DidRenameFilesNotification}});Object.defineProperty(l,"WillRenameFilesRequest",{enumerable:!0,get:function(){return vr.WillRenameFilesRequest}});Object.defineProperty(l,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return vr.DidDeleteFilesNotification}});Object.defineProperty(l,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return vr.WillDeleteFilesRequest}});var nc=Nd();Object.defineProperty(l,"UniquenessLevel",{enumerable:!0,get:function(){return nc.UniquenessLevel}});Object.defineProperty(l,"MonikerKind",{enumerable:!0,get:function(){return nc.MonikerKind}});Object.defineProperty(l,"MonikerRequest",{enumerable:!0,get:function(){return nc.MonikerRequest}});var ic=Id();Object.defineProperty(l,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return ic.TypeHierarchyPrepareRequest}});Object.defineProperty(l,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return ic.TypeHierarchySubtypesRequest}});Object.defineProperty(l,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return ic.TypeHierarchySupertypesRequest}});var _f=$d();Object.defineProperty(l,"InlineValueRequest",{enumerable:!0,get:function(){return _f.InlineValueRequest}});Object.defineProperty(l,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return _f.InlineValueRefreshRequest}});var sc=zd();Object.defineProperty(l,"InlayHintRequest",{enumerable:!0,get:function(){return sc.InlayHintRequest}});Object.defineProperty(l,"InlayHintResolveRequest",{enumerable:!0,get:function(){return sc.InlayHintResolveRequest}});Object.defineProperty(l,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return sc.InlayHintRefreshRequest}});var Xn=Qd();Object.defineProperty(l,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Xn.DiagnosticServerCancellationData}});Object.defineProperty(l,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Xn.DocumentDiagnosticReportKind}});Object.defineProperty(l,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Xn.DocumentDiagnosticRequest}});Object.defineProperty(l,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Xn.WorkspaceDiagnosticRequest}});Object.defineProperty(l,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Xn.DiagnosticRefreshRequest}});var kt=nl();Object.defineProperty(l,"NotebookCellKind",{enumerable:!0,get:function(){return kt.NotebookCellKind}});Object.defineProperty(l,"ExecutionSummary",{enumerable:!0,get:function(){return kt.ExecutionSummary}});Object.defineProperty(l,"NotebookCell",{enumerable:!0,get:function(){return kt.NotebookCell}});Object.defineProperty(l,"NotebookDocument",{enumerable:!0,get:function(){return kt.NotebookDocument}});Object.defineProperty(l,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return kt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(l,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidOpenNotebookDocumentNotification}});Object.defineProperty(l,"NotebookCellArrayChange",{enumerable:!0,get:function(){return kt.NotebookCellArrayChange}});Object.defineProperty(l,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidChangeNotebookDocumentNotification}});Object.defineProperty(l,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidSaveNotebookDocumentNotification}});Object.defineProperty(l,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidCloseNotebookDocumentNotification}});var Op=ol();Object.defineProperty(l,"InlineCompletionRequest",{enumerable:!0,get:function(){return Op.InlineCompletionRequest}});var Xa;(function(t){function e(r){let n=r;return Ee.string(n)||Ee.string(n.language)||Ee.string(n.scheme)||Ee.string(n.pattern)}t.is=e})(Xa||(l.TextDocumentFilter=Xa={}));var Ya;(function(t){function e(r){let n=r;return Ee.objectLiteral(n)&&(Ee.string(n.notebookType)||Ee.string(n.scheme)||Ee.string(n.pattern))}t.is=e})(Ya||(l.NotebookDocumentFilter=Ya={}));var Ka;(function(t){function e(r){let n=r;return Ee.objectLiteral(n)&&(Ee.string(n.notebook)||Ya.is(n.notebook))&&(n.language===void 0||Ee.string(n.language))}t.is=e})(Ka||(l.NotebookCellTextDocumentFilter=Ka={}));var ec;(function(t){function e(r){if(!Array.isArray(r))return!1;for(let n of r)if(!Ee.string(n)&&!Xa.is(n)&&!Ka.is(n))return!1;return!0}t.is=e})(ec||(l.DocumentSelector=ec={}));var cl;(function(t){t.method="client/registerCapability",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolRequestType(t.method)})(cl||(l.RegistrationRequest=cl={}));var ul;(function(t){t.method="client/unregisterCapability",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolRequestType(t.method)})(ul||(l.UnregistrationRequest=ul={}));var dl;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(dl||(l.ResourceOperationKind=dl={}));var ll;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(ll||(l.FailureHandlingKind=ll={}));var fl;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(fl||(l.PositionEncodingKind=fl={}));var hl;(function(t){function e(r){let n=r;return n&&Ee.string(n.id)&&n.id.length>0}t.hasId=e})(hl||(l.StaticRegistrationOptions=hl={}));var pl;(function(t){function e(r){let n=r;return n&&(n.documentSelector===null||ec.is(n.documentSelector))}t.is=e})(pl||(l.TextDocumentRegistrationOptions=pl={}));var ml;(function(t){function e(n){let i=n;return Ee.objectLiteral(i)&&(i.workDoneProgress===void 0||Ee.boolean(i.workDoneProgress))}t.is=e;function r(n){let i=n;return i&&Ee.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=r})(ml||(l.WorkDoneProgressOptions=ml={}));var gl;(function(t){t.method="initialize",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(gl||(l.InitializeRequest=gl={}));var yl;(function(t){t.unknownProtocolVersion=1})(yl||(l.InitializeErrorCodes=yl={}));var vl;(function(t){t.method="initialized",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(vl||(l.InitializedNotification=vl={}));var _l;(function(t){t.method="shutdown",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType0(t.method)})(_l||(l.ShutdownRequest=_l={}));var bl;(function(t){t.method="exit",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType0(t.method)})(bl||(l.ExitNotification=bl={}));var wl;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(wl||(l.DidChangeConfigurationNotification=wl={}));var Tl;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(Tl||(l.MessageType=Tl={}));var Rl;(function(t){t.method="window/showMessage",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolNotificationType(t.method)})(Rl||(l.ShowMessageNotification=Rl={}));var kl;(function(t){t.method="window/showMessageRequest",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolRequestType(t.method)})(kl||(l.ShowMessageRequest=kl={}));var Sl;(function(t){t.method="window/logMessage",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolNotificationType(t.method)})(Sl||(l.LogMessageNotification=Sl={}));var Cl;(function(t){t.method="telemetry/event",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolNotificationType(t.method)})(Cl||(l.TelemetryEventNotification=Cl={}));var Pl;(function(t){t.None=0,t.Full=1,t.Incremental=2})(Pl||(l.TextDocumentSyncKind=Pl={}));var xl;(function(t){t.method="textDocument/didOpen",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(xl||(l.DidOpenTextDocumentNotification=xl={}));var Dl;(function(t){function e(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function r(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=r})(Dl||(l.TextDocumentContentChangeEvent=Dl={}));var El;(function(t){t.method="textDocument/didChange",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(El||(l.DidChangeTextDocumentNotification=El={}));var Ol;(function(t){t.method="textDocument/didClose",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(Ol||(l.DidCloseTextDocumentNotification=Ol={}));var Nl;(function(t){t.method="textDocument/didSave",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(Nl||(l.DidSaveTextDocumentNotification=Nl={}));var Ml;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(Ml||(l.TextDocumentSaveReason=Ml={}));var jl;(function(t){t.method="textDocument/willSave",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(jl||(l.WillSaveTextDocumentNotification=jl={}));var ql;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(ql||(l.WillSaveTextDocumentWaitUntilRequest=ql={}));var Il;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolNotificationType(t.method)})(Il||(l.DidChangeWatchedFilesNotification=Il={}));var Al;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Al||(l.FileChangeType=Al={}));var Ll;(function(t){function e(r){let n=r;return Ee.objectLiteral(n)&&(al.URI.is(n.baseUri)||al.WorkspaceFolder.is(n.baseUri))&&Ee.string(n.pattern)}t.is=e})(Ll||(l.RelativePattern=Ll={}));var $l;(function(t){t.Create=1,t.Change=2,t.Delete=4})($l||(l.WatchKind=$l={}));var Fl;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolNotificationType(t.method)})(Fl||(l.PublishDiagnosticsNotification=Fl={}));var Wl;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Wl||(l.CompletionTriggerKind=Wl={}));var Vl;(function(t){t.method="textDocument/completion",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Vl||(l.CompletionRequest=Vl={}));var zl;(function(t){t.method="completionItem/resolve",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(zl||(l.CompletionResolveRequest=zl={}));var Ul;(function(t){t.method="textDocument/hover",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Ul||(l.HoverRequest=Ul={}));var Bl;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Bl||(l.SignatureHelpTriggerKind=Bl={}));var Hl;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Hl||(l.SignatureHelpRequest=Hl={}));var Zl;(function(t){t.method="textDocument/definition",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Zl||(l.DefinitionRequest=Zl={}));var Jl;(function(t){t.method="textDocument/references",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Jl||(l.ReferencesRequest=Jl={}));var Gl;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Gl||(l.DocumentHighlightRequest=Gl={}));var Ql;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Ql||(l.DocumentSymbolRequest=Ql={}));var Xl;(function(t){t.method="textDocument/codeAction",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Xl||(l.CodeActionRequest=Xl={}));var Yl;(function(t){t.method="codeAction/resolve",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Yl||(l.CodeActionResolveRequest=Yl={}));var Kl;(function(t){t.method="workspace/symbol",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(Kl||(l.WorkspaceSymbolRequest=Kl={}));var ef;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(ef||(l.WorkspaceSymbolResolveRequest=ef={}));var tf;(function(t){t.method="textDocument/codeLens",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(tf||(l.CodeLensRequest=tf={}));var rf;(function(t){t.method="codeLens/resolve",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(rf||(l.CodeLensResolveRequest=rf={}));var nf;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolRequestType0(t.method)})(nf||(l.CodeLensRefreshRequest=nf={}));var sf;(function(t){t.method="textDocument/documentLink",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(sf||(l.DocumentLinkRequest=sf={}));var of;(function(t){t.method="documentLink/resolve",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(of||(l.DocumentLinkResolveRequest=of={}));var af;(function(t){t.method="textDocument/formatting",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(af||(l.DocumentFormattingRequest=af={}));var cf;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(cf||(l.DocumentRangeFormattingRequest=cf={}));var uf;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(uf||(l.DocumentRangesFormattingRequest=uf={}));var df;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(df||(l.DocumentOnTypeFormattingRequest=df={}));var lf;(function(t){t.Identifier=1})(lf||(l.PrepareSupportDefaultBehavior=lf={}));var ff;(function(t){t.method="textDocument/rename",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(ff||(l.RenameRequest=ff={}));var hf;(function(t){t.method="textDocument/prepareRename",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(hf||(l.PrepareRenameRequest=hf={}));var pf;(function(t){t.method="workspace/executeCommand",t.messageDirection=C.MessageDirection.clientToServer,t.type=new C.ProtocolRequestType(t.method)})(pf||(l.ExecuteCommandRequest=pf={}));var mf;(function(t){t.method="workspace/applyEdit",t.messageDirection=C.MessageDirection.serverToClient,t.type=new C.ProtocolRequestType("workspace/applyEdit")})(mf||(l.ApplyWorkspaceEditRequest=mf={}))});var Tf=M(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.createProtocolConnection=void 0;var wf=yr();function Np(t,e,r,n){return wf.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,wf.createMessageConnection)(t,e,r,n)}cs.createProtocolConnection=Np});var kf=M(Xe=>{"use strict";var Mp=Xe&&Xe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),us=Xe&&Xe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Mp(e,t,r)};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.LSPErrorCodes=Xe.createProtocolConnection=void 0;us(yr(),Xe);us(Hi(),Xe);us(be(),Xe);us(bf(),Xe);var jp=Tf();Object.defineProperty(Xe,"createProtocolConnection",{enumerable:!0,get:function(){return jp.createProtocolConnection}});var Rf;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(Rf||(Xe.LSPErrorCodes=Rf={}))});var Cf=M(St=>{"use strict";var qp=St&&St.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Sf=St&&St.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qp(e,t,r)};Object.defineProperty(St,"__esModule",{value:!0});St.createProtocolConnection=void 0;var Ip=za();Sf(za(),St);Sf(kf(),St);function Ap(t,e,r,n){return(0,Ip.createMessageConnection)(t,e,r,n)}St.createProtocolConnection=Ap});var Wf=Yr(require("child_process")),ti=Yr(require("fs")),vs=Yr(require("path")),Vf=Yr(No()),_s=Yr(Gc()),uc=Yr(Cf());var et={};Kf(et,{BRAND:()=>um,DIRTY:()=>_r,EMPTY_PATH:()=>Wp,INVALID:()=>W,NEVER:()=>Zm,OK:()=>ze,ParseStatus:()=>Me,Schema:()=>K,ZodAny:()=>ur,ZodArray:()=>$t,ZodBigInt:()=>wr,ZodBoolean:()=>Tr,ZodBranded:()=>Kn,ZodCatch:()=>Mr,ZodDate:()=>Rr,ZodDefault:()=>Nr,ZodDiscriminatedUnion:()=>fs,ZodEffects:()=>dt,ZodEnum:()=>Er,ZodError:()=>Ye,ZodFirstPartyTypeKind:()=>U,ZodFunction:()=>ps,ZodIntersection:()=>Pr,ZodIssueCode:()=>S,ZodLazy:()=>xr,ZodLiteral:()=>Dr,ZodMap:()=>Nn,ZodNaN:()=>jn,ZodNativeEnum:()=>Or,ZodNever:()=>vt,ZodNull:()=>Sr,ZodNullable:()=>xt,ZodNumber:()=>br,ZodObject:()=>Ke,ZodOptional:()=>ct,ZodParsedType:()=>E,ZodPipeline:()=>ei,ZodPromise:()=>dr,ZodReadonly:()=>jr,ZodRecord:()=>hs,ZodSchema:()=>K,ZodSet:()=>Mn,ZodString:()=>cr,ZodSymbol:()=>En,ZodTransformer:()=>dt,ZodTuple:()=>Pt,ZodType:()=>K,ZodUndefined:()=>kr,ZodUnion:()=>Cr,ZodUnknown:()=>Lt,ZodVoid:()=>On,addIssueToContext:()=>x,any:()=>vm,array:()=>Tm,bigint:()=>hm,boolean:()=>Af,coerce:()=>Hm,custom:()=>jf,date:()=>pm,datetimeRegex:()=>Nf,defaultErrorMap:()=>It,discriminatedUnion:()=>Cm,effect:()=>Lm,enum:()=>qm,function:()=>Nm,getErrorMap:()=>Pn,getParsedType:()=>Ct,instanceof:()=>lm,intersection:()=>Pm,isAborted:()=>ds,isAsync:()=>xn,isDirty:()=>ls,isValid:()=>ar,late:()=>dm,lazy:()=>Mm,literal:()=>jm,makeIssue:()=>Yn,map:()=>Em,nan:()=>fm,nativeEnum:()=>Im,never:()=>bm,null:()=>ym,nullable:()=>Fm,number:()=>If,object:()=>Rm,objectUtil:()=>oc,oboolean:()=>Bm,onumber:()=>Um,optional:()=>$m,ostring:()=>zm,pipeline:()=>Vm,preprocess:()=>Wm,promise:()=>Am,quotelessJson:()=>Lp,record:()=>Dm,set:()=>Om,setErrorMap:()=>Fp,strictObject:()=>km,string:()=>qf,symbol:()=>mm,transformer:()=>Lm,tuple:()=>xm,undefined:()=>gm,union:()=>Sm,unknown:()=>_m,util:()=>ee,void:()=>wm});var ee;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let d of i)s[d]=d;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(h=>typeof i[i[h]]!="number"),d={};for(let h of s)d[h]=i[h];return t.objectValues(d)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.push(d);return s},t.find=(i,s)=>{for(let d of i)if(s(d))return d},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(d=>typeof d=="string"?`'${d}'`:d).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ee||(ee={}));var oc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(oc||(oc={}));var E=ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ct=t=>{switch(typeof t){case"undefined":return E.undefined;case"string":return E.string;case"number":return Number.isNaN(t)?E.nan:E.number;case"boolean":return E.boolean;case"function":return E.function;case"bigint":return E.bigint;case"symbol":return E.symbol;case"object":return Array.isArray(t)?E.array:t===null?E.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?E.promise:typeof Map<"u"&&t instanceof Map?E.map:typeof Set<"u"&&t instanceof Set?E.set:typeof Date<"u"&&t instanceof Date?E.date:E.object;default:return E.unknown}};var S=ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Lp=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Ye=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let d of s.issues)if(d.code==="invalid_union")d.unionErrors.map(i);else if(d.code==="invalid_return_type")i(d.returnTypeError);else if(d.code==="invalid_arguments")i(d.argumentsError);else if(d.path.length===0)n._errors.push(r(d));else{let h=n,R=0;for(;R<d.path.length;){let T=d.path[R];R===d.path.length-1?(h[T]=h[T]||{_errors:[]},h[T]._errors.push(r(d))):h[T]=h[T]||{_errors:[]},h=h[T],R++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ye.create=t=>new Ye(t);var $p=(t,e)=>{let r;switch(t.code){case S.invalid_type:t.received===E.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case S.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ee.jsonStringifyReplacer)}`;break;case S.unrecognized_keys:r=`Unrecognized key(s) in object: ${ee.joinValues(t.keys,", ")}`;break;case S.invalid_union:r="Invalid input";break;case S.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ee.joinValues(t.options)}`;break;case S.invalid_enum_value:r=`Invalid enum value. Expected ${ee.joinValues(t.options)}, received '${t.received}'`;break;case S.invalid_arguments:r="Invalid function arguments";break;case S.invalid_return_type:r="Invalid function return type";break;case S.invalid_date:r="Invalid date";break;case S.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ee.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case S.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case S.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case S.custom:r="Invalid input";break;case S.invalid_intersection_types:r="Intersection results could not be merged";break;case S.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case S.not_finite:r="Number must be finite";break;default:r=e.defaultError,ee.assertNever(t)}return{message:r}},It=$p;var Pf=It;function Fp(t){Pf=t}function Pn(){return Pf}var Yn=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],d={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let h="",R=n.filter(T=>!!T).slice().reverse();for(let T of R)h=T(d,{data:e,defaultError:h}).message;return{...i,path:s,message:h}},Wp=[];function x(t,e){let r=Pn(),n=Yn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===It?void 0:It].filter(i=>!!i)});t.common.issues.push(n)}var Me=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return W;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,d=await i.value;n.push({key:s,value:d})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:d}=i;if(s.status==="aborted"||d.status==="aborted")return W;s.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof d.value<"u"||i.alwaysSet)&&(n[s.value]=d.value)}return{status:e.value,value:n}}},W=Object.freeze({status:"aborted"}),_r=t=>({status:"dirty",value:t}),ze=t=>({status:"valid",value:t}),ds=t=>t.status==="aborted",ls=t=>t.status==="dirty",ar=t=>t.status==="valid",xn=t=>typeof Promise<"u"&&t instanceof Promise;var j;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(j||(j={}));var ut=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},xf=(t,e)=>{if(ar(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ye(t.common.issues);return this._error=r,this._error}}};function Y(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(d,h)=>{let{message:R}=t;return d.code==="invalid_enum_value"?{message:R??h.defaultError}:typeof h.data>"u"?{message:R??n??h.defaultError}:d.code!=="invalid_type"?{message:h.defaultError}:{message:R??r??h.defaultError}},description:i}}var K=class{get description(){return this._def.description}_getType(e){return Ct(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ct(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Me,ctx:{common:e.parent.common,data:e.data,parsedType:Ct(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(xn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ct(e)},i=this._parseSync({data:e,path:n.path,parent:n});return xf(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ct(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return ar(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>ar(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ct(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(xn(i)?i:Promise.resolve(i));return xf(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let d=e(i),h=()=>s.addIssue({code:S.custom,...n(i)});return typeof Promise<"u"&&d instanceof Promise?d.then(R=>R?!0:(h(),!1)):d?!0:(h(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new dt({schema:this,typeName:U.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ct.create(this,this._def)}nullable(){return xt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $t.create(this)}promise(){return dr.create(this,this._def)}or(e){return Cr.create([this,e],this._def)}and(e){return Pr.create(this,e,this._def)}transform(e){return new dt({...Y(this._def),schema:this,typeName:U.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Nr({...Y(this._def),innerType:this,defaultValue:r,typeName:U.ZodDefault})}brand(){return new Kn({typeName:U.ZodBranded,type:this,...Y(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Mr({...Y(this._def),innerType:this,catchValue:r,typeName:U.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ei.create(this,e)}readonly(){return jr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Vp=/^c[^\s-]{8,}$/i,zp=/^[0-9a-z]+$/,Up=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Bp=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Hp=/^[a-z0-9_-]{21}$/i,Zp=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Jp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Gp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ac,Xp=/^(?:(?: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])$/,Yp=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Kp=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,em=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rm=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ef="((\\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])))",nm=new RegExp(`^${Ef}$`);function Of(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function im(t){return new RegExp(`^${Of(t)}$`)}function Nf(t){let e=`${Ef}T${Of(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function sm(t,e){return!!((e==="v4"||!e)&&Xp.test(t)||(e==="v6"||!e)&&Kp.test(t))}function om(t,e){if(!Zp.test(t))return!1;try{let[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function am(t,e){return!!((e==="v4"||!e)&&Yp.test(t)||(e==="v6"||!e)&&em.test(t))}var cr=class t extends K{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==E.string){let s=this._getOrReturnCtx(e);return x(s,{code:S.invalid_type,expected:E.string,received:s.parsedType}),W}let n=new Me,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),x(i,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),x(i,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let d=e.data.length>s.value,h=e.data.length<s.value;(d||h)&&(i=this._getOrReturnCtx(e,i),d?x(i,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):h&&x(i,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Gp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"email",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")ac||(ac=new RegExp(Qp,"u")),ac.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"emoji",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Bp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"uuid",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Hp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"nanoid",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Vp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"cuid",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")zp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"cuid2",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Up.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"ulid",code:S.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),x(i,{validation:"url",code:S.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"regex",code:S.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Nf(s).test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?nm.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?im(s).test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{code:S.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Jp.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"duration",code:S.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?sm(e.data,s.version)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"ip",code:S.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?om(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"jwt",code:S.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?am(e.data,s.version)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"cidr",code:S.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?tm.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"base64",code:S.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?rm.test(e.data)||(i=this._getOrReturnCtx(e,i),x(i,{validation:"base64url",code:S.invalid_string,message:s.message}),n.dirty()):ee.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:S.invalid_string,...j.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...j.errToObj(e)})}url(e){return this._addCheck({kind:"url",...j.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...j.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...j.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...j.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...j.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...j.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...j.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...j.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...j.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...j.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...j.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...j.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...j.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...j.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...j.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...j.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...j.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...j.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...j.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...j.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...j.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...j.errToObj(r)})}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.create=t=>new cr({checks:[],typeName:U.ZodString,coerce:t?.coerce??!1,...Y(t)});function cm(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(t.toFixed(i).replace(".","")),d=Number.parseInt(e.toFixed(i).replace(".",""));return s%d/10**i}var br=class t extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==E.number){let s=this._getOrReturnCtx(e);return x(s,{code:S.invalid_type,expected:E.number,received:s.parsedType}),W}let n,i=new Me;for(let s of this._def.checks)s.kind==="int"?ee.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:S.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?cm(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:S.not_finite,message:s.message}),i.dirty()):ee.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,j.toString(r))}gt(e,r){return this.setLimit("min",e,!1,j.toString(r))}lte(e,r){return this.setLimit("max",e,!0,j.toString(r))}lt(e,r){return this.setLimit("max",e,!1,j.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:j.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ee.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};br.create=t=>new br({checks:[],typeName:U.ZodNumber,coerce:t?.coerce||!1,...Y(t)});var wr=class t extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==E.bigint)return this._getInvalidInput(e);let n,i=new Me;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),x(n,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ee.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return x(r,{code:S.invalid_type,expected:E.bigint,received:r.parsedType}),W}gte(e,r){return this.setLimit("min",e,!0,j.toString(r))}gt(e,r){return this.setLimit("min",e,!1,j.toString(r))}lte(e,r){return this.setLimit("max",e,!0,j.toString(r))}lt(e,r){return this.setLimit("max",e,!1,j.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:j.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};wr.create=t=>new wr({checks:[],typeName:U.ZodBigInt,coerce:t?.coerce??!1,...Y(t)});var Tr=class extends K{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==E.boolean){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.boolean,received:n.parsedType}),W}return ze(e.data)}};Tr.create=t=>new Tr({typeName:U.ZodBoolean,coerce:t?.coerce||!1,...Y(t)});var Rr=class t extends K{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==E.date){let s=this._getOrReturnCtx(e);return x(s,{code:S.invalid_type,expected:E.date,received:s.parsedType}),W}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return x(s,{code:S.invalid_date}),W}let n=new Me,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),x(i,{code:S.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),x(i,{code:S.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ee.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:j.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Rr.create=t=>new Rr({checks:[],coerce:t?.coerce||!1,typeName:U.ZodDate,...Y(t)});var En=class extends K{_parse(e){if(this._getType(e)!==E.symbol){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.symbol,received:n.parsedType}),W}return ze(e.data)}};En.create=t=>new En({typeName:U.ZodSymbol,...Y(t)});var kr=class extends K{_parse(e){if(this._getType(e)!==E.undefined){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.undefined,received:n.parsedType}),W}return ze(e.data)}};kr.create=t=>new kr({typeName:U.ZodUndefined,...Y(t)});var Sr=class extends K{_parse(e){if(this._getType(e)!==E.null){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.null,received:n.parsedType}),W}return ze(e.data)}};Sr.create=t=>new Sr({typeName:U.ZodNull,...Y(t)});var ur=class extends K{constructor(){super(...arguments),this._any=!0}_parse(e){return ze(e.data)}};ur.create=t=>new ur({typeName:U.ZodAny,...Y(t)});var Lt=class extends K{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ze(e.data)}};Lt.create=t=>new Lt({typeName:U.ZodUnknown,...Y(t)});var vt=class extends K{_parse(e){let r=this._getOrReturnCtx(e);return x(r,{code:S.invalid_type,expected:E.never,received:r.parsedType}),W}};vt.create=t=>new vt({typeName:U.ZodNever,...Y(t)});var On=class extends K{_parse(e){if(this._getType(e)!==E.undefined){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.void,received:n.parsedType}),W}return ze(e.data)}};On.create=t=>new On({typeName:U.ZodVoid,...Y(t)});var $t=class t extends K{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==E.array)return x(r,{code:S.invalid_type,expected:E.array,received:r.parsedType}),W;if(i.exactLength!==null){let d=r.data.length>i.exactLength.value,h=r.data.length<i.exactLength.value;(d||h)&&(x(r,{code:d?S.too_big:S.too_small,minimum:h?i.exactLength.value:void 0,maximum:d?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(x(r,{code:S.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(x(r,{code:S.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((d,h)=>i.type._parseAsync(new ut(r,d,r.path,h)))).then(d=>Me.mergeArray(n,d));let s=[...r.data].map((d,h)=>i.type._parseSync(new ut(r,d,r.path,h)));return Me.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:j.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:j.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:j.toString(r)}})}nonempty(e){return this.min(1,e)}};$t.create=(t,e)=>new $t({type:t,minLength:null,maxLength:null,exactLength:null,typeName:U.ZodArray,...Y(e)});function Dn(t){if(t instanceof Ke){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=ct.create(Dn(n))}return new Ke({...t._def,shape:()=>e})}else return t instanceof $t?new $t({...t._def,type:Dn(t.element)}):t instanceof ct?ct.create(Dn(t.unwrap())):t instanceof xt?xt.create(Dn(t.unwrap())):t instanceof Pt?Pt.create(t.items.map(e=>Dn(e))):t}var Ke=class t extends K{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ee.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==E.object){let T=this._getOrReturnCtx(e);return x(T,{code:S.invalid_type,expected:E.object,received:T.parsedType}),W}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:d}=this._getCached(),h=[];if(!(this._def.catchall instanceof vt&&this._def.unknownKeys==="strip"))for(let T in i.data)d.includes(T)||h.push(T);let R=[];for(let T of d){let P=s[T],Z=i.data[T];R.push({key:{status:"valid",value:T},value:P._parse(new ut(i,Z,i.path,T)),alwaysSet:T in i.data})}if(this._def.catchall instanceof vt){let T=this._def.unknownKeys;if(T==="passthrough")for(let P of h)R.push({key:{status:"valid",value:P},value:{status:"valid",value:i.data[P]}});else if(T==="strict")h.length>0&&(x(i,{code:S.unrecognized_keys,keys:h}),n.dirty());else if(T!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let T=this._def.catchall;for(let P of h){let Z=i.data[P];R.push({key:{status:"valid",value:P},value:T._parse(new ut(i,Z,i.path,P)),alwaysSet:P in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let T=[];for(let P of R){let Z=await P.key,se=await P.value;T.push({key:Z,value:se,alwaysSet:P.alwaysSet})}return T}).then(T=>Me.mergeObjectSync(n,T)):Me.mergeObjectSync(n,R)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:j.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:U.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of ee.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of ee.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Dn(this)}partial(e){let r={};for(let n of ee.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of ee.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof ct;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return Mf(ee.objectKeys(this.shape))}};Ke.create=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strip",catchall:vt.create(),typeName:U.ZodObject,...Y(e)});Ke.strictCreate=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strict",catchall:vt.create(),typeName:U.ZodObject,...Y(e)});Ke.lazycreate=(t,e)=>new Ke({shape:t,unknownKeys:"strip",catchall:vt.create(),typeName:U.ZodObject,...Y(e)});var Cr=class extends K{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let h of s)if(h.result.status==="valid")return h.result;for(let h of s)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;let d=s.map(h=>new Ye(h.ctx.common.issues));return x(r,{code:S.invalid_union,unionErrors:d}),W}if(r.common.async)return Promise.all(n.map(async s=>{let d={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:d}),ctx:d}})).then(i);{let s,d=[];for(let R of n){let T={...r,common:{...r.common,issues:[]},parent:null},P=R._parseSync({data:r.data,path:r.path,parent:T});if(P.status==="valid")return P;P.status==="dirty"&&!s&&(s={result:P,ctx:T}),T.common.issues.length&&d.push(T.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let h=d.map(R=>new Ye(R));return x(r,{code:S.invalid_union,unionErrors:h}),W}}get options(){return this._def.options}};Cr.create=(t,e)=>new Cr({options:t,typeName:U.ZodUnion,...Y(e)});var At=t=>t instanceof xr?At(t.schema):t instanceof dt?At(t.innerType()):t instanceof Dr?[t.value]:t instanceof Er?t.options:t instanceof Or?ee.objectValues(t.enum):t instanceof Nr?At(t._def.innerType):t instanceof kr?[void 0]:t instanceof Sr?[null]:t instanceof ct?[void 0,...At(t.unwrap())]:t instanceof xt?[null,...At(t.unwrap())]:t instanceof Kn||t instanceof jr?At(t.unwrap()):t instanceof Mr?At(t._def.innerType):[],fs=class t extends K{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==E.object)return x(r,{code:S.invalid_type,expected:E.object,received:r.parsedType}),W;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(x(r,{code:S.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),W)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let d=At(s.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let h of d){if(i.has(h))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(h)}`);i.set(h,s)}}return new t({typeName:U.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Y(n)})}};function cc(t,e){let r=Ct(t),n=Ct(e);if(t===e)return{valid:!0,data:t};if(r===E.object&&n===E.object){let i=ee.objectKeys(e),s=ee.objectKeys(t).filter(h=>i.indexOf(h)!==-1),d={...t,...e};for(let h of s){let R=cc(t[h],e[h]);if(!R.valid)return{valid:!1};d[h]=R.data}return{valid:!0,data:d}}else if(r===E.array&&n===E.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let d=t[s],h=e[s],R=cc(d,h);if(!R.valid)return{valid:!1};i.push(R.data)}return{valid:!0,data:i}}else return r===E.date&&n===E.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Pr=class extends K{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,d)=>{if(ds(s)||ds(d))return W;let h=cc(s.value,d.value);return h.valid?((ls(s)||ls(d))&&r.dirty(),{status:r.value,value:h.data}):(x(n,{code:S.invalid_intersection_types}),W)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,d])=>i(s,d)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pr.create=(t,e,r)=>new Pr({left:t,right:e,typeName:U.ZodIntersection,...Y(r)});var Pt=class t extends K{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==E.array)return x(n,{code:S.invalid_type,expected:E.array,received:n.parsedType}),W;if(n.data.length<this._def.items.length)return x(n,{code:S.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),W;!this._def.rest&&n.data.length>this._def.items.length&&(x(n,{code:S.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((d,h)=>{let R=this._def.items[h]||this._def.rest;return R?R._parse(new ut(n,d,n.path,h)):null}).filter(d=>!!d);return n.common.async?Promise.all(s).then(d=>Me.mergeArray(r,d)):Me.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Pt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pt({items:t,typeName:U.ZodTuple,rest:null,...Y(e)})};var hs=class t extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==E.object)return x(n,{code:S.invalid_type,expected:E.object,received:n.parsedType}),W;let i=[],s=this._def.keyType,d=this._def.valueType;for(let h in n.data)i.push({key:s._parse(new ut(n,h,n.path,h)),value:d._parse(new ut(n,n.data[h],n.path,h)),alwaysSet:h in n.data});return n.common.async?Me.mergeObjectAsync(r,i):Me.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof K?new t({keyType:e,valueType:r,typeName:U.ZodRecord,...Y(n)}):new t({keyType:cr.create(),valueType:e,typeName:U.ZodRecord,...Y(r)})}},Nn=class extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==E.map)return x(n,{code:S.invalid_type,expected:E.map,received:n.parsedType}),W;let i=this._def.keyType,s=this._def.valueType,d=[...n.data.entries()].map(([h,R],T)=>({key:i._parse(new ut(n,h,n.path,[T,"key"])),value:s._parse(new ut(n,R,n.path,[T,"value"]))}));if(n.common.async){let h=new Map;return Promise.resolve().then(async()=>{for(let R of d){let T=await R.key,P=await R.value;if(T.status==="aborted"||P.status==="aborted")return W;(T.status==="dirty"||P.status==="dirty")&&r.dirty(),h.set(T.value,P.value)}return{status:r.value,value:h}})}else{let h=new Map;for(let R of d){let T=R.key,P=R.value;if(T.status==="aborted"||P.status==="aborted")return W;(T.status==="dirty"||P.status==="dirty")&&r.dirty(),h.set(T.value,P.value)}return{status:r.value,value:h}}}};Nn.create=(t,e,r)=>new Nn({valueType:e,keyType:t,typeName:U.ZodMap,...Y(r)});var Mn=class t extends K{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==E.set)return x(n,{code:S.invalid_type,expected:E.set,received:n.parsedType}),W;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(x(n,{code:S.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(x(n,{code:S.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function d(R){let T=new Set;for(let P of R){if(P.status==="aborted")return W;P.status==="dirty"&&r.dirty(),T.add(P.value)}return{status:r.value,value:T}}let h=[...n.data.values()].map((R,T)=>s._parse(new ut(n,R,n.path,T)));return n.common.async?Promise.all(h).then(R=>d(R)):d(h)}min(e,r){return new t({...this._def,minSize:{value:e,message:j.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:j.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Mn.create=(t,e)=>new Mn({valueType:t,minSize:null,maxSize:null,typeName:U.ZodSet,...Y(e)});var ps=class t extends K{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==E.function)return x(r,{code:S.invalid_type,expected:E.function,received:r.parsedType}),W;function n(h,R){return Yn({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Pn(),It].filter(T=>!!T),issueData:{code:S.invalid_arguments,argumentsError:R}})}function i(h,R){return Yn({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Pn(),It].filter(T=>!!T),issueData:{code:S.invalid_return_type,returnTypeError:R}})}let s={errorMap:r.common.contextualErrorMap},d=r.data;if(this._def.returns instanceof dr){let h=this;return ze(async function(...R){let T=new Ye([]),P=await h._def.args.parseAsync(R,s).catch(ce=>{throw T.addIssue(n(R,ce)),T}),Z=await Reflect.apply(d,this,P);return await h._def.returns._def.type.parseAsync(Z,s).catch(ce=>{throw T.addIssue(i(Z,ce)),T})})}else{let h=this;return ze(function(...R){let T=h._def.args.safeParse(R,s);if(!T.success)throw new Ye([n(R,T.error)]);let P=Reflect.apply(d,this,T.data),Z=h._def.returns.safeParse(P,s);if(!Z.success)throw new Ye([i(P,Z.error)]);return Z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Pt.create(e).rest(Lt.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Pt.create([]).rest(Lt.create()),returns:r||Lt.create(),typeName:U.ZodFunction,...Y(n)})}},xr=class extends K{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};xr.create=(t,e)=>new xr({getter:t,typeName:U.ZodLazy,...Y(e)});var Dr=class extends K{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return x(r,{received:r.data,code:S.invalid_literal,expected:this._def.value}),W}return{status:"valid",value:e.data}}get value(){return this._def.value}};Dr.create=(t,e)=>new Dr({value:t,typeName:U.ZodLiteral,...Y(e)});function Mf(t,e){return new Er({values:t,typeName:U.ZodEnum,...Y(e)})}var Er=class t extends K{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return x(r,{expected:ee.joinValues(n),received:r.parsedType,code:S.invalid_type}),W}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return x(r,{received:r.data,code:S.invalid_enum_value,options:n}),W}return ze(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Er.create=Mf;var Or=class extends K{_parse(e){let r=ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==E.string&&n.parsedType!==E.number){let i=ee.objectValues(r);return x(n,{expected:ee.joinValues(i),received:n.parsedType,code:S.invalid_type}),W}if(this._cache||(this._cache=new Set(ee.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=ee.objectValues(r);return x(n,{received:n.data,code:S.invalid_enum_value,options:i}),W}return ze(e.data)}get enum(){return this._def.values}};Or.create=(t,e)=>new Or({values:t,typeName:U.ZodNativeEnum,...Y(e)});var dr=class extends K{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==E.promise&&r.common.async===!1)return x(r,{code:S.invalid_type,expected:E.promise,received:r.parsedType}),W;let n=r.parsedType===E.promise?r.data:Promise.resolve(r.data);return ze(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};dr.create=(t,e)=>new dr({type:t,typeName:U.ZodPromise,...Y(e)});var dt=class extends K{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:d=>{x(n,d),d.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let d=i.transform(n.data,s);if(n.common.async)return Promise.resolve(d).then(async h=>{if(r.value==="aborted")return W;let R=await this._def.schema._parseAsync({data:h,path:n.path,parent:n});return R.status==="aborted"?W:R.status==="dirty"?_r(R.value):r.value==="dirty"?_r(R.value):R});{if(r.value==="aborted")return W;let h=this._def.schema._parseSync({data:d,path:n.path,parent:n});return h.status==="aborted"?W:h.status==="dirty"?_r(h.value):r.value==="dirty"?_r(h.value):h}}if(i.type==="refinement"){let d=h=>{let R=i.refinement(h,s);if(n.common.async)return Promise.resolve(R);if(R instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(n.common.async===!1){let h=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return h.status==="aborted"?W:(h.status==="dirty"&&r.dirty(),d(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(h=>h.status==="aborted"?W:(h.status==="dirty"&&r.dirty(),d(h.value).then(()=>({status:r.value,value:h.value}))))}if(i.type==="transform")if(n.common.async===!1){let d=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ar(d))return W;let h=i.transform(d.value,s);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(d=>ar(d)?Promise.resolve(i.transform(d.value,s)).then(h=>({status:r.value,value:h})):W);ee.assertNever(i)}};dt.create=(t,e,r)=>new dt({schema:t,typeName:U.ZodEffects,effect:e,...Y(r)});dt.createWithPreprocess=(t,e,r)=>new dt({schema:e,effect:{type:"preprocess",transform:t},typeName:U.ZodEffects,...Y(r)});var ct=class extends K{_parse(e){return this._getType(e)===E.undefined?ze(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ct.create=(t,e)=>new ct({innerType:t,typeName:U.ZodOptional,...Y(e)});var xt=class extends K{_parse(e){return this._getType(e)===E.null?ze(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};xt.create=(t,e)=>new xt({innerType:t,typeName:U.ZodNullable,...Y(e)});var Nr=class extends K{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===E.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Nr.create=(t,e)=>new Nr({innerType:t,typeName:U.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Y(e)});var Mr=class extends K{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return xn(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ye(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ye(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Mr.create=(t,e)=>new Mr({innerType:t,typeName:U.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Y(e)});var jn=class extends K{_parse(e){if(this._getType(e)!==E.nan){let n=this._getOrReturnCtx(e);return x(n,{code:S.invalid_type,expected:E.nan,received:n.parsedType}),W}return{status:"valid",value:e.data}}};jn.create=t=>new jn({typeName:U.ZodNaN,...Y(t)});var um=Symbol("zod_brand"),Kn=class extends K{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ei=class t extends K{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?W:s.status==="dirty"?(r.dirty(),_r(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?W:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:U.ZodPipeline})}},jr=class extends K{_parse(e){let r=this._def.innerType._parse(e),n=i=>(ar(i)&&(i.value=Object.freeze(i.value)),i);return xn(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};jr.create=(t,e)=>new jr({innerType:t,typeName:U.ZodReadonly,...Y(e)});function Df(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function jf(t,e={},r){return t?ur.create().superRefine((n,i)=>{let s=t(n);if(s instanceof Promise)return s.then(d=>{if(!d){let h=Df(e,n),R=h.fatal??r??!0;i.addIssue({code:"custom",...h,fatal:R})}});if(!s){let d=Df(e,n),h=d.fatal??r??!0;i.addIssue({code:"custom",...d,fatal:h})}}):ur.create()}var dm={object:Ke.lazycreate},U;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(U||(U={}));var lm=(t,e={message:`Input not instance of ${t.name}`})=>jf(r=>r instanceof t,e),qf=cr.create,If=br.create,fm=jn.create,hm=wr.create,Af=Tr.create,pm=Rr.create,mm=En.create,gm=kr.create,ym=Sr.create,vm=ur.create,_m=Lt.create,bm=vt.create,wm=On.create,Tm=$t.create,Rm=Ke.create,km=Ke.strictCreate,Sm=Cr.create,Cm=fs.create,Pm=Pr.create,xm=Pt.create,Dm=hs.create,Em=Nn.create,Om=Mn.create,Nm=ps.create,Mm=xr.create,jm=Dr.create,qm=Er.create,Im=Or.create,Am=dr.create,Lm=dt.create,$m=ct.create,Fm=xt.create,Wm=dt.createWithPreprocess,Vm=ei.create,zm=()=>qf().optional(),Um=()=>If().optional(),Bm=()=>Af().optional(),Hm={string:t=>cr.create({...t,coerce:!0}),number:t=>br.create({...t,coerce:!0}),boolean:t=>Tr.create({...t,coerce:!0}),bigint:t=>wr.create({...t,coerce:!0}),date:t=>Rr.create({...t,coerce:!0})};var Zm=W;var zf=require("node:util"),Jm=__dirname.endsWith("src"),Gm=Jm?vs.default.join(__dirname,"..","dist","server.js"):vs.default.join(__dirname,"server.js");function Qm(t){let e=vs.default.resolve(t);return e=e.replace(/\\/g,"/"),e.startsWith("/")||(e="/"+e),`file://${e}`}function Xm(){let t=process.env;return!!(t.CI&&(t.GITHUB_ACTIONS||t.GITLAB_CI||t.BITBUCKET_BUILD_NUMBER||t.CIRCLECI||t.TRAVIS))}var Uf=Xm(),fc=()=>Uf?"::group::":"",hc=()=>Uf?"::endgroup::":"",Ym=et.object({files:et.array(et.string(),{required_error:"Missing --files"}),includes:et.array(et.string()).optional().default([]),bindings:et.array(et.string()).optional().default([]),logLevel:et.enum(["none","verbose"]).optional().default("none"),formatting:et.boolean().optional().default(!1),diagnostics:et.boolean().optional().default(!1),outFile:et.string().optional()}),{values:Km}=(0,zf.parseArgs)({options:{files:{type:"string",multiple:!0},includes:{type:"string",multiple:!0},bindings:{type:"string",multiple:!0},logLevel:{type:"string"},formatting:{type:"boolean"},diagnostics:{type:"boolean"},outFile:{type:"string"}},strict:!0}),dc=Ym.safeParse(Km);dc.success||(console.error(`\u274C Invalid CLI input:
67
67
  `,dc.error.format()),process.exit(1));var qr=dc.data,Bf=qr.files,eg=qr.includes,tg=qr.bindings,rg=qr.logLevel,Lf=qr.formatting,$f=qr.diagnostics,Hf=qr.outFile;ig(Bf,rg,eg,tg,Hf).catch(t=>{console.error("Error validating files:",t),process.exit(1)});var Ff=0,ng=Bf.length,ms=new Map,gs=[],qn=[];async function ig(t,e,r,n,i){let s=Wf.default.spawn(Gm,["--stdio"],{stdio:["pipe","pipe","pipe"]});s.stderr.on("data",P=>{console.error("LSP stderr:",P.toString())});let d=(0,Vf.createMessageConnection)(new _s.StreamMessageReader(s.stdout),new _s.StreamMessageWriter(s.stdin));e==="verbose"&&d.onNotification("window/logMessage",P=>{let se={1:"ERROR",2:"WARN",3:"INFO",4:"LOG"}[P.type]||"LOG";console.log(`[LSP ${se}] ${P.message}`)}),d.onRequest("workspace/workspaceFolders",()=>[{uri:`file://${process.cwd()}`,name:"root"}]),d.listen(),d.sendNotification("workspace/didChangeConfiguration",{settings:{devicetree:{defaultIncludePaths:r,defaultBindingType:"Zephyr",defaultZephyrBindings:n,autoChangeContext:!0,allowAdhocContexts:!0,defaultLockRenameEdits:[]}}});let h=[{uri:Qm(process.cwd()),name:"root"}];await d.sendRequest("initialize",{processId:process.pid,rootUri:`file://${process.cwd()}`,capabilities:{},workspaceFolders:h}),await d.sendNotification("initialized");let R=new Set,T=Array.from(new Set(t)).sort((P,Z)=>{let se=ce=>ce.endsWith(".dts")?0:ce.endsWith(".dtsi")?1:2;return se(P)-se(Z)});for(let P of T){Ff++;let Z=ti.default.readFileSync(P,"utf8"),se={uri:`file://${P}`,languageId:"devicetree",version:0,text:Z};d.sendNotification("textDocument/didOpen",{textDocument:se});let ce=await ag(d),Ue=P.endsWith(".overlay")?[ce.mainDtsPath.file]:[...lc(ce.mainDtsPath),...ce.overlays.flatMap(lc)].filter(ue=>!ue.endsWith(".h")&&(0,ti.existsSync)(ue)),Se=ue=>ue===P,we=(ue,de)=>ue?`[${Ff}/${ng}]`:`[${de}/${Ue.length-1}]`.padEnd((Ue.length-1).toString().length*2+3," ");Lf&&await Promise.all(Ue.map(async(ue,de)=>{let O=Se(ue);await sg(d,ue,O,we(O,de),ce),R.add(ue)})),$f&&await Promise.all(Ue.map(async(ue,de)=>{let O=Se(ue);if(P.endsWith(".dts")){let pe=await og(d,ue,O,we(O,de));pe?.length&&qn.push({file:ue,context:ce,message:pe.map($=>`${$.message}: {${JSON.stringify($.range.start)}}-{${JSON.stringify($.range.end)}}`).join(`
68
- `)})}else console.log(`[${we(O,de)}] \u26A0\uFE0F Skipping ${ue} diagnostic check. Check can only be done on full context!`);R.add(ue)})),d.sendNotification("textDocument/didClose",{textDocument:{uri:`file://${P}`}}),await cg(d)}i&&ti.default.writeFileSync(i,Array.from(ms.values()).join(`
68
+ `)})}else console.log(`${O?"":" "}${we(O,de)} \u26A0\uFE0F Skipping ${ue} diagnostic check. Check can only be done on full context!`);R.add(ue)})),d.sendNotification("textDocument/didClose",{textDocument:{uri:`file://${P}`}}),await cg(d)}i&&ti.default.writeFileSync(i,Array.from(ms.values()).join(`
69
69
 
70
70
  `)),console.log("Processed",R.size,"files"),d.dispose(),s.kill(),Lf&&(gs.length?console.log(`${gs.length} of ${R.size} Failed formatting checks`):console.log("All files passed formatting")),$f&&(console.log("Diagnostic issues summary"),qn.length&&(console.log(qn.map(P=>`${fc()}File: ${P.file}
71
71
  Board File: ${P.context.mainDtsPath.file}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dts-linter",
3
- "version": "0.0.0-alpha18",
3
+ "version": "0.0.0-alpha19",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",