@checksum-ai/runtime 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -266,8 +266,8 @@ m2: `).concat(this.mapper2.__debugToString().split(`
266
266
  `:return e.formatting.formatOnEnter(xn,Xn,He)}return[]}n(Ue,"getFormattingEditsAfterKeystroke");function Sr(nn,xn,bn,Fn,Xn,He){He===void 0&&(He=e.emptyOptions),re();var un=Se(nn),Vn=e.createTextSpanFromBounds(xn,bn),Qi=e.formatting.getFormatContext(Xn,V);return e.flatMap(e.deduplicate(Fn,e.equateValues,e.compareValues),function(pt){return Le.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:pt,sourceFile:un,span:Vn,program:ge,host:V,cancellationToken:Le,formatContext:Qi,preferences:He})})}n(Sr,"getCodeFixesAtPosition");function Ee(nn,xn,bn,Fn){Fn===void 0&&(Fn=e.emptyOptions),re(),e.Debug.assert(nn.type==="file");var Xn=Se(nn.fileName),He=e.formatting.getFormatContext(bn,V);return e.codefix.getAllFixes({fixId:xn,sourceFile:Xn,program:ge,host:V,cancellationToken:Le,formatContext:He,preferences:Fn})}n(Ee,"getCombinedCodeFix");function er(nn,xn,bn){var Fn;bn===void 0&&(bn=e.emptyOptions),re(),e.Debug.assert(nn.type==="file");var Xn=Se(nn.fileName),He=e.formatting.getFormatContext(xn,V),un=(Fn=nn.mode)!==null&&Fn!==void 0?Fn:nn.skipDestructiveCodeActions?"SortAndCombine":"All";return e.OrganizeImports.organizeImports(Xn,He,V,ge,bn,un)}n(er,"organizeImports");function Ye(nn,xn,bn,Fn){return Fn===void 0&&(Fn=e.emptyOptions),e.getEditsForFileRename(g(),nn,xn,V,e.formatting.getFormatContext(bn,V),Fn,Fe)}n(Ye,"getEditsForFileRename");function pe(nn,xn){var bn=typeof nn=="string"?xn:nn;return e.isArray(bn)?Promise.all(bn.map(function(Fn){return $e(Fn)})):$e(bn)}n(pe,"applyCodeActionCommand");function $e(nn){var xn=n(function(bn){return e.toPath(bn,Re,Ne)},"getPath");return e.Debug.assertEqual(nn.type,"install package"),V.installPackage?V.installPackage({fileName:xn(nn.file),packageName:nn.packageName}):Promise.reject("Host does not implement `installPackage`")}n($e,"applySingleCodeActionCommand");function or(nn,xn,bn){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(V),me.getCurrentSourceFile(nn),xn,bn)}n(or,"getDocCommentTemplateAtPosition");function Cr(nn,xn,bn){if(bn===60)return!1;var Fn=me.getCurrentSourceFile(nn);if(e.isInString(Fn,xn))return!1;if(e.isInsideJsxElementOrAttribute(Fn,xn))return bn===123;if(e.isInTemplateString(Fn,xn))return!1;switch(bn){case 39:case 34:case 96:return!e.isInComment(Fn,xn)}return!0}n(Cr,"isValidBraceCompletionAtPosition");function gr(nn,xn){var bn=me.getCurrentSourceFile(nn),Fn=e.findPrecedingToken(xn,bn);if(Fn){var Xn=Fn.kind===31&&e.isJsxOpeningElement(Fn.parent)?Fn.parent.parent:e.isJsxText(Fn)&&e.isJsxElement(Fn.parent)?Fn.parent:void 0;if(Xn&&Sn(Xn))return{newText:"</".concat(Xn.openingElement.tagName.getText(bn),">")};var He=Fn.kind===31&&e.isJsxOpeningFragment(Fn.parent)?Fn.parent.parent:e.isJsxText(Fn)&&e.isJsxFragment(Fn.parent)?Fn.parent:void 0;if(He&&qn(He))return{newText:"</>"}}}n(gr,"getJsxClosingTagAtPosition");function Mr(nn,xn){return{lineStarts:nn.getLineStarts(),firstLine:nn.getLineAndCharacterOfPosition(xn.pos).line,lastLine:nn.getLineAndCharacterOfPosition(xn.end).line}}n(Mr,"getLinesForRange");function qr(nn,xn,bn){for(var Fn=me.getCurrentSourceFile(nn),Xn=[],He=Mr(Fn,xn),un=He.lineStarts,Vn=He.firstLine,Qi=He.lastLine,pt=bn||!1,Gi=Number.MAX_VALUE,xi=new e.Map,Et=new RegExp(/\S/),st=e.isInsideJsxElement(Fn,un[Vn]),$i=st?"{/*":"//",ii=Vn;ii<=Qi;ii++){var qa=Fn.text.substring(un[ii],Fn.getLineEndOfPosition(un[ii])),za=Et.exec(qa);za&&(Gi=Math.min(Gi,za.index),xi.set(ii.toString(),za.index),qa.substr(za.index,$i.length)!==$i&&(pt=bn===void 0||bn))}for(var ii=Vn;ii<=Qi;ii++)if(!(Vn!==Qi&&un[ii]===xn.end)){var Wa=xi.get(ii.toString());Wa!==void 0&&(st?Xn.push.apply(Xn,_n(nn,{pos:un[ii]+Gi,end:Fn.getLineEndOfPosition(un[ii])},pt,st)):pt?Xn.push({newText:$i,span:{length:0,start:un[ii]+Gi}}):Fn.text.substr(un[ii]+Wa,$i.length)===$i&&Xn.push({newText:"",span:{length:$i.length,start:un[ii]+Wa}}))}return Xn}n(qr,"toggleLineComment");function _n(nn,xn,bn,Fn){for(var Xn,He=me.getCurrentSourceFile(nn),un=[],Vn=He.text,Qi=!1,pt=bn||!1,Gi=[],xi=xn.pos,Et=Fn!==void 0?Fn:e.isInsideJsxElement(He,xi),st=Et?"{/*":"/*",$i=Et?"*/}":"*/",ii=Et?"\\{\\/\\*":"\\/\\*",qa=Et?"\\*\\/\\}":"\\*\\/";xi<=xn.end;){var za=Vn.substr(xi,st.length)===st?st.length:0,Wa=e.isInComment(He,xi+za);if(Wa)Et&&(Wa.pos--,Wa.end++),Gi.push(Wa.pos),Wa.kind===3&&Gi.push(Wa.end),Qi=!0,xi=Wa.end+1;else{var To=Vn.substring(xi,xn.end).search("(".concat(ii,")|(").concat(qa,")"));pt=bn!==void 0?bn:pt||!e.isTextWhiteSpaceLike(Vn,xi,To===-1?xn.end:xi+To),xi=To===-1?xn.end+1:xi+To+$i.length}}if(pt||!Qi){((Xn=e.isInComment(He,xn.pos))===null||Xn===void 0?void 0:Xn.kind)!==2&&e.insertSorted(Gi,xn.pos,e.compareValues),e.insertSorted(Gi,xn.end,e.compareValues);var ka=Gi[0];Vn.substr(ka,st.length)!==st&&un.push({newText:st,span:{length:0,start:ka}});for(var Do=1;Do<Gi.length-1;Do++)Vn.substr(Gi[Do]-$i.length,$i.length)!==$i&&un.push({newText:$i,span:{length:0,start:Gi[Do]}}),Vn.substr(Gi[Do],st.length)!==st&&un.push({newText:st,span:{length:0,start:Gi[Do]}});un.length%2!==0&&un.push({newText:$i,span:{length:0,start:Gi[Gi.length-1]}})}else for(var Na=0,qi=Gi;Na<qi.length;Na++){var Yi=qi[Na],oo=Yi-$i.length>0?Yi-$i.length:0,za=Vn.substr(oo,$i.length)===$i?$i.length:0;un.push({newText:"",span:{length:st.length,start:Yi-za}})}return un}n(_n,"toggleMultilineComment");function Vr(nn,xn){var bn=me.getCurrentSourceFile(nn),Fn=Mr(bn,xn),Xn=Fn.firstLine,He=Fn.lastLine;return Xn===He&&xn.pos!==xn.end?_n(nn,xn,!0):qr(nn,xn,!0)}n(Vr,"commentSelection");function Wn(nn,xn){var bn=me.getCurrentSourceFile(nn),Fn=[],Xn=xn.pos,He=xn.end;Xn===He&&(He+=e.isInsideJsxElement(bn,Xn)?2:1);for(var un=Xn;un<=He;un++){var Vn=e.isInComment(bn,un);if(Vn){switch(Vn.kind){case 2:Fn.push.apply(Fn,qr(nn,{end:Vn.end,pos:Vn.pos+1},!1));break;case 3:Fn.push.apply(Fn,_n(nn,{end:Vn.end,pos:Vn.pos+1},!1))}un=Vn.end+1}}return Fn}n(Wn,"uncommentSelection");function Sn(nn){var xn=nn.openingElement,bn=nn.closingElement,Fn=nn.parent;return!e.tagNamesAreEquivalent(xn.tagName,bn.tagName)||e.isJsxElement(Fn)&&e.tagNamesAreEquivalent(xn.tagName,Fn.openingElement.tagName)&&Sn(Fn)}n(Sn,"isUnclosedTag");function qn(nn){var xn=nn.closingFragment,bn=nn.parent;return!!(xn.flags&131072)||e.isJsxFragment(bn)&&qn(bn)}n(qn,"isUnclosedFragment");function hn(nn,xn,bn){var Fn=me.getCurrentSourceFile(nn),Xn=e.formatting.getRangeOfEnclosingComment(Fn,xn);return Xn&&(!bn||Xn.kind===3)?e.createTextSpanFromRange(Xn):void 0}n(hn,"getSpanOfEnclosingComment");function Kn(nn,xn){re();var bn=Se(nn);Le.throwIfCancellationRequested();var Fn=bn.text,Xn=[];if(xn.length>0&&!qa(bn.fileName))for(var He=$i(),un=void 0;un=He.exec(Fn);){Le.throwIfCancellationRequested();var Vn=3;e.Debug.assert(un.length===xn.length+Vn);var Qi=un[1],pt=un.index+Qi.length;if(e.isInComment(bn,pt)){for(var Gi=void 0,xi=0;xi<xn.length;xi++)un[xi+Vn]&&(Gi=xn[xi]);if(Gi===void 0)return e.Debug.fail();if(!ii(Fn.charCodeAt(pt+Gi.text.length))){var Et=un[2];Xn.push({descriptor:Gi,message:Et,position:pt})}}}return Xn;function st(za){return za.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function $i(){var za=/(?:\/\/+\s*)/.source,Wa=/(?:\/\*+\s*)/.source,To=/(?:^(?:\s|\*)*)/.source,ka="("+To+"|"+za+"|"+Wa+")",Do="(?:"+e.map(xn,function(_o){return"("+st(_o.text)+")"}).join("|")+")",Na=/(?:$|\*\/)/.source,qi=/(?:.*?)/.source,Yi="("+Do+qi+")",oo=ka+Yi+Na;return new RegExp(oo,"gim")}function ii(za){return za>=97&&za<=122||za>=65&&za<=90||za>=48&&za<=57}function qa(za){return e.stringContains(za,"/node_modules/")}}n(Kn,"getTodoComments");function Ai(nn,xn,bn){return re(),e.Rename.getRenameInfo(ge,Se(nn),xn,bn||{})}n(Ai,"getRenameInfo");function ai(nn,xn,bn,Fn,Xn,He){var un=typeof xn=="number"?[xn,void 0]:[xn.pos,xn.end],Vn=un[0],Qi=un[1];return{file:nn,startPosition:Vn,endPosition:Qi,program:g(),host:V,formatContext:e.formatting.getFormatContext(Fn,V),cancellationToken:Le,preferences:bn,triggerReason:Xn,kind:He}}n(ai,"getRefactorContext");function Ki(nn,xn,bn){return{file:nn,program:g(),host:V,span:xn,preferences:bn,cancellationToken:Le}}n(Ki,"getInlayHintsContext");function Ni(nn,xn){return e.SmartSelectionRange.getSmartSelectionRange(xn,me.getCurrentSourceFile(nn))}n(Ni,"getSmartSelectionRange");function mi(nn,xn,bn,Fn,Xn){bn===void 0&&(bn=e.emptyOptions),re();var He=Se(nn);return e.refactor.getApplicableRefactors(ai(He,xn,bn,e.emptyOptions,Fn,Xn))}n(mi,"getApplicableRefactors");function In(nn,xn,bn,Fn,Xn,He){He===void 0&&(He=e.emptyOptions),re();var un=Se(nn);return e.refactor.getEditsForRefactor(ai(un,bn,He,xn),Fn,Xn)}n(In,"getEditsForRefactor");function Ie(nn,xn){return xn===0?{line:0,character:0}:Fe.toLineColumnOffset(nn,xn)}n(Ie,"toLineColumnOffset");function wr(nn,xn){re();var bn=e.CallHierarchy.resolveCallHierarchyDeclaration(ge,e.getTouchingPropertyName(Se(nn),xn));return bn&&e.mapOneOrMany(bn,function(Fn){return e.CallHierarchy.createCallHierarchyItem(ge,Fn)})}n(wr,"prepareCallHierarchy");function Oe(nn,xn){re();var bn=Se(nn),Fn=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(ge,xn===0?bn:e.getTouchingPropertyName(bn,xn)));return Fn?e.CallHierarchy.getIncomingCalls(ge,Fn,Le):[]}n(Oe,"provideCallHierarchyIncomingCalls");function Dn(nn,xn){re();var bn=Se(nn),Fn=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(ge,xn===0?bn:e.getTouchingPropertyName(bn,xn)));return Fn?e.CallHierarchy.getOutgoingCalls(ge,Fn):[]}n(Dn,"provideCallHierarchyOutgoingCalls");function Un(nn,xn,bn){bn===void 0&&(bn=e.emptyOptions),re();var Fn=Se(nn);return e.InlayHints.provideInlayHints(Ki(Fn,xn,bn))}n(Un,"provideInlayHints");var mn={dispose:Be,cleanupSemanticCache:Ce,getSyntacticDiagnostics:rr,getSemanticDiagnostics:Or,getSuggestionDiagnostics:vr,getCompilerOptionsDiagnostics:ze,getSyntacticClassifications:En,getSemanticClassifications:xr,getEncodedSyntacticClassifications:Pn,getEncodedSemanticClassifications:zr,getCompletionsAtPosition:o,getCompletionEntryDetails:Gr,getCompletionEntrySymbol:fn,getSignatureHelpItems:Br,getQuickInfoAtPosition:pr,getDefinitionAtPosition:Ur,getDefinitionAndBoundSpan:Tr,getImplementationAtPosition:Rr,getTypeDefinitionAtPosition:rn,getReferencesAtPosition:ke,findReferences:Nr,getFileReferences:xe,getOccurrencesAtPosition:gn,getDocumentHighlights:he,getNameOrDottedNameSpan:tn,getBreakpointStatementAtPosition:yn,getNavigateToItems:ur,getRenameInfo:Ai,getSmartSelectionRange:Ni,findRenameLocations:sr,getNavigationBarItems:we,getNavigationTree:Ge,getOutliningSpans:Zn,getTodoComments:Kn,getBraceMatchingAtPosition:br,getIndentationAtPosition:Ir,getFormattingEditsForRange:jr,getFormattingEditsForDocument:cn,getFormattingEditsAfterKeystroke:Ue,getDocCommentTemplateAtPosition:or,isValidBraceCompletionAtPosition:Cr,getJsxClosingTagAtPosition:gr,getSpanOfEnclosingComment:hn,getCodeFixesAtPosition:Sr,getCombinedCodeFix:Ee,applyCodeActionCommand:pe,organizeImports:er,getEditsForFileRename:Ye,getEmitOutput:Lr,getNonBoundSourceFile:Xr,getProgram:g,getCurrentProgram:function(){return ge},getAutoImportProvider:q,updateIsDefinitionOfReferencedSymbols:Te,getApplicableRefactors:mi,getEditsForRefactor:In,toLineColumnOffset:Ie,getSourceMapper:function(){return Fe},clearSourceMapperCache:function(){return Fe.clearCache()},prepareCallHierarchy:wr,provideCallHierarchyIncomingCalls:Oe,provideCallHierarchyOutgoingCalls:Dn,toggleLineComment:qr,toggleMultilineComment:_n,commentSelection:Vr,uncommentSelection:Wn,provideInlayHints:Un};switch(H){case e.LanguageServiceMode.Semantic:break;case e.LanguageServiceMode.PartialSemantic:ae.forEach(function(nn){return mn[nn]=function(){throw new Error("LanguageService Operation: ".concat(nn," not allowed in LanguageServiceMode.PartialSemantic"))}});break;case e.LanguageServiceMode.Syntactic:U.forEach(function(nn){return mn[nn]=function(){throw new Error("LanguageService Operation: ".concat(nn," not allowed in LanguageServiceMode.Syntactic"))}});break;default:e.Debug.assertNever(H)}return mn}n(F,"createLanguageService"),e.createLanguageService=F;function w(V){return V.nameTable||G(V),V.nameTable}n(w,"getNameTable"),e.getNameTable=w;function G(V){var l=V.nameTable=new e.Map;V.forEachChild(n(function I(R){if(e.isIdentifier(R)&&!e.isTagName(R)&&R.escapedText||e.isStringOrNumericLiteralLike(R)&&X(R)){var K=e.getEscapedTextOfIdentifierOrLiteral(R);l.set(K,l.get(K)===void 0?R.pos:-1)}else if(e.isPrivateIdentifier(R)){var K=R.escapedText;l.set(K,l.get(K)===void 0?R.pos:-1)}if(e.forEachChild(R,I),e.hasJSDocNodes(R))for(var H=0,me=R.jsDoc;H<me.length;H++){var ge=me[H];e.forEachChild(ge,I)}},"walk"))}n(G,"initializeNameTable");function X(V){return e.isDeclarationName(V)||V.parent.kind===280||N(V)||e.isLiteralComputedPropertyDeclarationName(V)}n(X,"literalIsName");function ee(V){var l=De(V);return l&&(e.isObjectLiteralExpression(l.parent)||e.isJsxAttributes(l.parent))?l:void 0}n(ee,"getContainingObjectLiteralElement"),e.getContainingObjectLiteralElement=ee;function De(V){switch(V.kind){case 10:case 14:case 8:if(V.parent.kind===164)return e.isObjectLiteralElement(V.parent.parent)?V.parent.parent:void 0;case 79:return e.isObjectLiteralElement(V.parent)&&(V.parent.parent.kind===207||V.parent.parent.kind===289)&&V.parent.name===V?V.parent:void 0}}n(De,"getContainingObjectLiteralElementWorker");function T(V,l){var I=ee(V);if(I){var R=l.getContextualType(I.parent),K=R&&k(I,l,R,!1);if(K&&K.length===1)return e.first(K)}return l.getSymbolAtLocation(V)}n(T,"getSymbolAtLocationForQuickInfo");function k(V,l,I,R){var K=e.getNameFromPropertyName(V.name);if(!K)return e.emptyArray;if(!I.isUnion()){var H=I.getProperty(K);return H?[H]:e.emptyArray}var me=e.mapDefined(I.types,function(ge){return(e.isObjectLiteralExpression(V.parent)||e.isJsxAttributes(V.parent))&&l.isTypeInvalidDueToUnionDiscriminant(ge,V.parent)?void 0:ge.getProperty(K)});if(R&&(me.length===0||me.length===I.types.length)){var H=I.getProperty(K);if(H)return[H]}return me.length===0?e.mapDefined(I.types,function(ge){return ge.getProperty(K)}):me}n(k,"getPropertySymbolsFromContextualType"),e.getPropertySymbolsFromContextualType=k;function N(V){return V&&V.parent&&V.parent.kind===209&&V.parent.argumentExpression===V}n(N,"isArgumentOfElementAccessExpression");function ie(V){if(typeof __dirname<"u")return e.combinePaths(__dirname,e.getDefaultLibFileName(V));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}n(ie,"getDefaultLibFilePath"),e.getDefaultLibFilePath=ie,e.setObjectAllocator(b())})(_r||(_r={}));var _r;(function(e){var a;(function(y){function m(M,h){if(M.isDeclarationFile)return;var B=e.getTokenAtPosition(M,h),ne=M.getLineAndCharacterOfPosition(h).line;if(M.getLineAndCharacterOfPosition(B.getStart(M)).line>ne){var z=e.findPrecedingToken(B.pos,M);if(!z||M.getLineAndCharacterOfPosition(z.getEnd()).line!==ne)return;B=z}if(B.flags&16777216)return;return ue(B);function p(O,L){var _=e.canHaveDecorators(O)?e.findLast(O.modifiers,e.isDecorator):void 0,b=_?e.skipTrivia(M.text,_.end):O.getStart(M);return e.createTextSpanFromBounds(b,(L||O).getEnd())}function v(O,L){return p(O,e.findNextToken(L,L.parent,M))}function fe(O,L){return O&&ne===M.getLineAndCharacterOfPosition(O.getStart(M)).line?ue(O):ue(L)}function le(O,L,_){if(O){var b=O.indexOf(L);if(b>=0){for(var x=b,E=b+1;x>0&&_(O[x-1]);)x--;for(;E<O.length&&_(O[E]);)E++;return e.createTextSpanFromBounds(e.skipTrivia(M.text,O[x].pos),O[E-1].end)}}return p(L)}function se(O){return ue(e.findPrecedingToken(O.pos,M))}function ce(O){return ue(e.findNextToken(O,O.parent,M))}function ue(O){if(O){var L=O.parent;switch(O.kind){case 240:return be(O.declarationList.declarations[0]);case 257:case 169:case 168:return be(O);case 166:return J(O);case 259:case 171:case 170:case 174:case 175:case 173:case 215:case 216:return Y(O);case 238:if(e.isFunctionBlock(O))return C(O);case 265:return j(O);case 295:return j(O.block);case 241:return p(O.expression);case 250:return p(O.getChildAt(0),O.expression);case 244:return v(O,O.expression);case 243:return ue(O.statement);case 256:return p(O.getChildAt(0));case 242:return v(O,O.expression);case 253:return ue(O.statement);case 249:case 248:return p(O.getChildAt(0),O.label);case 245:return U(O);case 246:return v(O,O.expression);case 247:return ae(O);case 252:return v(O,O.expression);case 292:case 293:return ue(O.statements[0]);case 255:return j(O.tryBlock);case 254:return p(O,O.expression);case 274:return p(O,O.expression);case 268:return p(O,O.moduleReference);case 269:return p(O,O.moduleSpecifier);case 275:return p(O,O.moduleSpecifier);case 264:if(e.getModuleInstanceState(O)!==1)return;case 260:case 263:case 302:case 205:return p(O);case 251:return ue(O.statement);case 167:return le(L.modifiers,O,e.isDecorator);case 203:case 204:return F(O);case 261:case 262:return;case 26:case 1:return fe(e.findPrecedingToken(O.pos,M));case 27:return se(O);case 18:return G(O);case 19:return X(O);case 23:return ee(O);case 20:return De(O);case 21:return T(O);case 58:return k(O);case 31:case 29:return N(O);case 115:return ie(O);case 91:case 83:case 96:return ce(O);case 162:return V(O);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(O))return w(O);if((O.kind===79||O.kind===227||O.kind===299||O.kind===300)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(L))return p(O);if(O.kind===223){var _=O,b=_.left,x=_.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(b))return w(b);if(x.kind===63&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(O.parent))return p(O);if(x.kind===27)return ue(b)}if(e.isExpressionNode(O))switch(L.kind){case 243:return se(O);case 167:return ue(O.parent);case 245:case 247:return p(O);case 223:if(O.parent.operatorToken.kind===27)return p(O);break;case 216:if(O.parent.body===O)return p(O);break}switch(O.parent.kind){case 299:if(O.parent.name===O&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(O.parent.parent))return ue(O.parent.initializer);break;case 213:if(O.parent.type===O)return ce(O.parent.type);break;case 257:case 166:{var E=O.parent,P=E.initializer,A=E.type;if(P===O||A===O||e.isAssignmentOperator(O.kind))return se(O);break}case 223:{var b=O.parent.left;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(b)&&O!==b)return se(O);break}default:if(e.isFunctionLike(O.parent)&&O.parent.type===O)return se(O)}return ue(O.parent)}}function ve(l){return e.isVariableDeclarationList(l.parent)&&l.parent.declarations[0]===l?p(e.findPrecedingToken(l.pos,M,l.parent),l):p(l)}n(ve,"textSpanFromVariableDeclaration");function be(l){if(l.parent.parent.kind===246)return ue(l.parent.parent);var I=l.parent;if(e.isBindingPattern(l.name))return F(l.name);if(e.hasOnlyExpressionInitializer(l)&&l.initializer||e.hasSyntacticModifier(l,1)||I.parent.kind===247)return ve(l);if(e.isVariableDeclarationList(l.parent)&&l.parent.declarations[0]!==l)return ue(e.findPrecedingToken(l.pos,M,l.parent))}n(be,"spanInVariableDeclaration");function Z(l){return!!l.initializer||l.dotDotDotToken!==void 0||e.hasSyntacticModifier(l,12)}n(Z,"canHaveSpanInParameterDeclaration");function J(l){if(e.isBindingPattern(l.name))return F(l.name);if(Z(l))return p(l);var I=l.parent,R=I.parameters.indexOf(l);return e.Debug.assert(R!==-1),R!==0?J(I.parameters[R-1]):ue(I.body)}n(J,"spanInParameterDeclaration");function $(l){return e.hasSyntacticModifier(l,1)||l.parent.kind===260&&l.kind!==173}n($,"canFunctionHaveSpanInWholeDeclaration");function Y(l){if(l.body)return $(l)?p(l):ue(l.body)}n(Y,"spanInFunctionDeclaration");function C(l){var I=l.statements.length?l.statements[0]:l.getLastToken();return $(l.parent)?fe(l.parent,I):ue(I)}n(C,"spanInFunctionBlock");function j(l){switch(l.parent.kind){case 264:if(e.getModuleInstanceState(l.parent)!==1)return;case 244:case 242:case 246:return fe(l.parent,l.statements[0]);case 245:case 247:return fe(e.findPrecedingToken(l.pos,M,l.parent),l.statements[0])}return ue(l.statements[0])}n(j,"spanInBlock");function ae(l){if(l.initializer.kind===258){var I=l.initializer;if(I.declarations.length>0)return ue(I.declarations[0])}else return ue(l.initializer)}n(ae,"spanInInitializerOfForLike");function U(l){if(l.initializer)return ae(l);if(l.condition)return p(l.condition);if(l.incrementor)return p(l.incrementor)}n(U,"spanInForStatement");function F(l){var I=e.forEach(l.elements,function(R){return R.kind!==229?R:void 0});return I?ue(I):l.parent.kind===205?p(l.parent):ve(l.parent)}n(F,"spanInBindingPattern");function w(l){e.Debug.assert(l.kind!==204&&l.kind!==203);var I=l.kind===206?l.elements:l.properties,R=e.forEach(I,function(K){return K.kind!==229?K:void 0});return R?ue(R):p(l.parent.kind===223?l.parent:l)}n(w,"spanInArrayLiteralOrObjectLiteralDestructuringPattern");function G(l){switch(l.parent.kind){case 263:var I=l.parent;return fe(e.findPrecedingToken(l.pos,M,l.parent),I.members.length?I.members[0]:I.getLastToken(M));case 260:var R=l.parent;return fe(e.findPrecedingToken(l.pos,M,l.parent),R.members.length?R.members[0]:R.getLastToken(M));case 266:return fe(l.parent.parent,l.parent.clauses[0])}return ue(l.parent)}n(G,"spanInOpenBraceToken");function X(l){switch(l.parent.kind){case 265:if(e.getModuleInstanceState(l.parent.parent)!==1)return;case 263:case 260:return p(l);case 238:if(e.isFunctionBlock(l.parent))return p(l);case 295:return ue(e.lastOrUndefined(l.parent.statements));case 266:var I=l.parent,R=e.lastOrUndefined(I.clauses);return R?ue(e.lastOrUndefined(R.statements)):void 0;case 203:var K=l.parent;return ue(e.lastOrUndefined(K.elements)||K);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(l.parent)){var H=l.parent;return p(e.lastOrUndefined(H.properties)||H)}return ue(l.parent)}}n(X,"spanInCloseBraceToken");function ee(l){switch(l.parent.kind){case 204:var I=l.parent;return p(e.lastOrUndefined(I.elements)||I);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(l.parent)){var R=l.parent;return p(e.lastOrUndefined(R.elements)||R)}return ue(l.parent)}}n(ee,"spanInCloseBracketToken");function De(l){return l.parent.kind===243||l.parent.kind===210||l.parent.kind===211?se(l):l.parent.kind===214?ce(l):ue(l.parent)}n(De,"spanInOpenParenToken");function T(l){switch(l.parent.kind){case 215:case 259:case 216:case 171:case 170:case 174:case 175:case 173:case 244:case 243:case 245:case 247:case 210:case 211:case 214:return se(l);default:return ue(l.parent)}}n(T,"spanInCloseParenToken");function k(l){return e.isFunctionLike(l.parent)||l.parent.kind===299||l.parent.kind===166?se(l):ue(l.parent)}n(k,"spanInColonToken");function N(l){return l.parent.kind===213?ce(l):ue(l.parent)}n(N,"spanInGreaterThanOrLessThanToken");function ie(l){return l.parent.kind===243?v(l,l.parent.expression):ue(l.parent)}n(ie,"spanInWhileKeyword");function V(l){return l.parent.kind===247?ce(l):ue(l.parent)}n(V,"spanInOfKeyword")}}n(m,"spanInSourceFileAtLocation"),y.spanInSourceFileAtLocation=m})(a=e.BreakpointResolver||(e.BreakpointResolver={}))})(_r||(_r={}));var _r;(function(e){function a(y,m,M){var h=[];M=e.fixupCompilerOptions(M,h);var B=e.isArray(y)?y:[y],ne=e.transformNodes(void 0,void 0,e.factory,M,B,m,!0);return ne.diagnostics=e.concatenate(ne.diagnostics,h),ne}n(a,"transform"),e.transform=a})(_r||(_r={}));var jS=function(){return this}(),_r;(function(e){function a(O,L){O&&O.log("*INTERNAL ERROR* - Exception in typescript services: "+L.message)}n(a,"logInternalError");var y=function(){function O(L){this.scriptSnapshotShim=L}return n(O,"ScriptSnapshotShimAdapter"),O.prototype.getText=function(L,_){return this.scriptSnapshotShim.getText(L,_)},O.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},O.prototype.getChangeRange=function(L){var _=L,b=this.scriptSnapshotShim.getChangeRange(_.scriptSnapshotShim);if(b===null)return null;var x=JSON.parse(b);return e.createTextChangeRange(e.createTextSpan(x.span.start,x.span.length),x.newLength)},O.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},O}(),m=function(){function O(L){var _=this;this.shimHost=L,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(b,x){var E=JSON.parse(_.shimHost.getModuleResolutionsForFile(x));return e.map(b,function(P){var A=e.getProperty(E,P);return A?{resolvedFileName:A,extension:e.extensionFromPath(A),isExternalLibraryImport:!1}:void 0})}),"directoryExists"in this.shimHost&&(this.directoryExists=function(b){return _.shimHost.directoryExists(b)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(b,x){var E=JSON.parse(_.shimHost.getTypeReferenceDirectiveResolutionsForFile(x));return e.map(b,function(P){return e.getProperty(E,e.isString(P)?P:P.fileName.toLowerCase())})})}return n(O,"LanguageServiceShimHostAdapter"),O.prototype.log=function(L){this.loggingEnabled&&this.shimHost.log(L)},O.prototype.trace=function(L){this.tracingEnabled&&this.shimHost.trace(L)},O.prototype.error=function(L){this.shimHost.error(L)},O.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},O.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},O.prototype.useCaseSensitiveFileNames=function(){return this.shimHost.useCaseSensitiveFileNames?this.shimHost.useCaseSensitiveFileNames():!1},O.prototype.getCompilationSettings=function(){var L=this.shimHost.getCompilationSettings();if(L===null||L==="")throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var _=JSON.parse(L);return _.allowNonTsExtensions=!0,_},O.prototype.getScriptFileNames=function(){var L=this.shimHost.getScriptFileNames();return JSON.parse(L)},O.prototype.getScriptSnapshot=function(L){var _=this.shimHost.getScriptSnapshot(L);return _&&new y(_)},O.prototype.getScriptKind=function(L){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(L):0},O.prototype.getScriptVersion=function(L){return this.shimHost.getScriptVersion(L)},O.prototype.getLocalizedDiagnosticMessages=function(){var L=this.shimHost.getLocalizedDiagnosticMessages();if(L===null||L==="")return null;try{return JSON.parse(L)}catch(_){return this.log(_.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},O.prototype.getCancellationToken=function(){var L=this.shimHost.getCancellationToken();return new e.ThrottledCancellationToken(L)},O.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},O.prototype.getDirectories=function(L){return JSON.parse(this.shimHost.getDirectories(L))},O.prototype.getDefaultLibFileName=function(L){return this.shimHost.getDefaultLibFileName(JSON.stringify(L))},O.prototype.readDirectory=function(L,_,b,x,E){var P=e.getFileMatcherPatterns(L,b,x,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(L,JSON.stringify(_),JSON.stringify(P.basePaths),P.excludePattern,P.includeFilePattern,P.includeDirectoryPattern,E))},O.prototype.readFile=function(L,_){return this.shimHost.readFile(L,_)},O.prototype.fileExists=function(L){return this.shimHost.fileExists(L)},O}();e.LanguageServiceShimHostAdapter=m;var M=function(){function O(L){var _=this;this.shimHost=L,this.useCaseSensitiveFileNames=this.shimHost.useCaseSensitiveFileNames?this.shimHost.useCaseSensitiveFileNames():!1,"directoryExists"in this.shimHost?this.directoryExists=function(b){return _.shimHost.directoryExists(b)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(b){return _.shimHost.realpath(b)}:this.realpath=void 0}return n(O,"CoreServicesShimHostAdapter"),O.prototype.readDirectory=function(L,_,b,x,E){var P=e.getFileMatcherPatterns(L,b,x,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(L,JSON.stringify(_),JSON.stringify(P.basePaths),P.excludePattern,P.includeFilePattern,P.includeDirectoryPattern,E))},O.prototype.fileExists=function(L){return this.shimHost.fileExists(L)},O.prototype.readFile=function(L){return this.shimHost.readFile(L)},O.prototype.getDirectories=function(L){return JSON.parse(this.shimHost.getDirectories(L))},O}();e.CoreServicesShimHostAdapter=M;function h(O,L,_,b){var x;b&&(O.log(L),x=e.timestamp());var E=_();if(b){var P=e.timestamp();if(O.log("".concat(L," completed in ").concat(P-x," msec")),e.isString(E)){var A=E;A.length>128&&(A=A.substring(0,128)+"..."),O.log(" result.length=".concat(A.length,", result='").concat(JSON.stringify(A),"'"))}}return E}n(h,"simpleForwardCall");function B(O,L,_,b){return ne(O,L,!0,_,b)}n(B,"forwardJSONCall");function ne(O,L,_,b,x){try{var E=h(O,L,b,x);return _?JSON.stringify({result:E}):E}catch(P){return P instanceof e.OperationCanceledException?JSON.stringify({canceled:!0}):(a(O,P),P.description=L,JSON.stringify({error:P}))}}n(ne,"forwardCall");var z=function(){function O(L){this.factory=L,L.registerShim(this)}return n(O,"ShimBase"),O.prototype.dispose=function(L){this.factory.unregisterShim(this)},O}();function p(O,L){return O.map(function(_){return v(_,L)})}n(p,"realizeDiagnostics"),e.realizeDiagnostics=p;function v(O,L){return{message:e.flattenDiagnosticMessageText(O.messageText,L),start:O.start,length:O.length,category:e.diagnosticCategoryName(O),code:O.code,reportsUnnecessary:O.reportsUnnecessary,reportsDeprecated:O.reportsDeprecated}}n(v,"realizeDiagnostic");var fe=function(O){nv(L,O);function L(_,b,x){var E=O.call(this,_)||this;return E.host=b,E.languageService=x,E.logPerformance=!1,E.logger=E.host,E}return n(L,"LanguageServiceShimObject"),L.prototype.forwardJSONCall=function(_,b){return B(this.logger,_,b,this.logPerformance)},L.prototype.dispose=function(_){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,jS&&jS.CollectGarbage&&(jS.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,O.prototype.dispose.call(this,_)},L.prototype.refresh=function(_){this.forwardJSONCall("refresh(".concat(_,")"),function(){return null})},L.prototype.cleanupSemanticCache=function(){var _=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return _.languageService.cleanupSemanticCache(),null})},L.prototype.realizeDiagnostics=function(_){var b=e.getNewLineOrDefaultFromHost(this.host);return p(_,b)},L.prototype.getSyntacticClassifications=function(_,b,x){var E=this;return this.forwardJSONCall("getSyntacticClassifications('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return E.languageService.getSyntacticClassifications(_,e.createTextSpan(b,x))})},L.prototype.getSemanticClassifications=function(_,b,x){var E=this;return this.forwardJSONCall("getSemanticClassifications('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return E.languageService.getSemanticClassifications(_,e.createTextSpan(b,x))})},L.prototype.getEncodedSyntacticClassifications=function(_,b,x){var E=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return le(E.languageService.getEncodedSyntacticClassifications(_,e.createTextSpan(b,x)))})},L.prototype.getEncodedSemanticClassifications=function(_,b,x){var E=this;return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return le(E.languageService.getEncodedSemanticClassifications(_,e.createTextSpan(b,x)))})},L.prototype.getSyntacticDiagnostics=function(_){var b=this;return this.forwardJSONCall("getSyntacticDiagnostics('".concat(_,"')"),function(){var x=b.languageService.getSyntacticDiagnostics(_);return b.realizeDiagnostics(x)})},L.prototype.getSemanticDiagnostics=function(_){var b=this;return this.forwardJSONCall("getSemanticDiagnostics('".concat(_,"')"),function(){var x=b.languageService.getSemanticDiagnostics(_);return b.realizeDiagnostics(x)})},L.prototype.getSuggestionDiagnostics=function(_){var b=this;return this.forwardJSONCall("getSuggestionDiagnostics('".concat(_,"')"),function(){return b.realizeDiagnostics(b.languageService.getSuggestionDiagnostics(_))})},L.prototype.getCompilerOptionsDiagnostics=function(){var _=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",function(){var b=_.languageService.getCompilerOptionsDiagnostics();return _.realizeDiagnostics(b)})},L.prototype.getQuickInfoAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getQuickInfoAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getQuickInfoAtPosition(_,b)})},L.prototype.getNameOrDottedNameSpan=function(_,b,x){var E=this;return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return E.languageService.getNameOrDottedNameSpan(_,b,x)})},L.prototype.getBreakpointStatementAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getBreakpointStatementAtPosition(_,b)})},L.prototype.getSignatureHelpItems=function(_,b,x){var E=this;return this.forwardJSONCall("getSignatureHelpItems('".concat(_,"', ").concat(b,")"),function(){return E.languageService.getSignatureHelpItems(_,b,x)})},L.prototype.getDefinitionAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getDefinitionAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getDefinitionAtPosition(_,b)})},L.prototype.getDefinitionAndBoundSpan=function(_,b){var x=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getDefinitionAndBoundSpan(_,b)})},L.prototype.getTypeDefinitionAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getTypeDefinitionAtPosition(_,b)})},L.prototype.getImplementationAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getImplementationAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getImplementationAtPosition(_,b)})},L.prototype.getRenameInfo=function(_,b,x){var E=this;return this.forwardJSONCall("getRenameInfo('".concat(_,"', ").concat(b,")"),function(){return E.languageService.getRenameInfo(_,b,x)})},L.prototype.getSmartSelectionRange=function(_,b){var x=this;return this.forwardJSONCall("getSmartSelectionRange('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getSmartSelectionRange(_,b)})},L.prototype.findRenameLocations=function(_,b,x,E,P){var A=this;return this.forwardJSONCall("findRenameLocations('".concat(_,"', ").concat(b,", ").concat(x,", ").concat(E,", ").concat(P,")"),function(){return A.languageService.findRenameLocations(_,b,x,E,P)})},L.prototype.getBraceMatchingAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getBraceMatchingAtPosition(_,b)})},L.prototype.isValidBraceCompletionAtPosition=function(_,b,x){var E=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return E.languageService.isValidBraceCompletionAtPosition(_,b,x)})},L.prototype.getSpanOfEnclosingComment=function(_,b,x){var E=this;return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(_,"', ").concat(b,")"),function(){return E.languageService.getSpanOfEnclosingComment(_,b,x)})},L.prototype.getIndentationAtPosition=function(_,b,x){var E=this;return this.forwardJSONCall("getIndentationAtPosition('".concat(_,"', ").concat(b,")"),function(){var P=JSON.parse(x);return E.languageService.getIndentationAtPosition(_,b,P)})},L.prototype.getReferencesAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getReferencesAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getReferencesAtPosition(_,b)})},L.prototype.findReferences=function(_,b){var x=this;return this.forwardJSONCall("findReferences('".concat(_,"', ").concat(b,")"),function(){return x.languageService.findReferences(_,b)})},L.prototype.getFileReferences=function(_){var b=this;return this.forwardJSONCall("getFileReferences('".concat(_,")"),function(){return b.languageService.getFileReferences(_)})},L.prototype.getOccurrencesAtPosition=function(_,b){var x=this;return this.forwardJSONCall("getOccurrencesAtPosition('".concat(_,"', ").concat(b,")"),function(){return x.languageService.getOccurrencesAtPosition(_,b)})},L.prototype.getDocumentHighlights=function(_,b,x){var E=this;return this.forwardJSONCall("getDocumentHighlights('".concat(_,"', ").concat(b,")"),function(){var P=E.languageService.getDocumentHighlights(_,b,JSON.parse(x)),A=e.toFileNameLowerCase(e.normalizeSlashes(_));return e.filter(P,function(ve){return e.toFileNameLowerCase(e.normalizeSlashes(ve.fileName))===A})})},L.prototype.getCompletionsAtPosition=function(_,b,x,E){var P=this;return this.forwardJSONCall("getCompletionsAtPosition('".concat(_,"', ").concat(b,", ").concat(x,", ").concat(E,")"),function(){return P.languageService.getCompletionsAtPosition(_,b,x,E)})},L.prototype.getCompletionEntryDetails=function(_,b,x,E,P,A,ve){var be=this;return this.forwardJSONCall("getCompletionEntryDetails('".concat(_,"', ").concat(b,", '").concat(x,"')"),function(){var Z=E===void 0?void 0:JSON.parse(E);return be.languageService.getCompletionEntryDetails(_,b,x,Z,P,A,ve)})},L.prototype.getFormattingEditsForRange=function(_,b,x,E){var P=this;return this.forwardJSONCall("getFormattingEditsForRange('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){var A=JSON.parse(E);return P.languageService.getFormattingEditsForRange(_,b,x,A)})},L.prototype.getFormattingEditsForDocument=function(_,b){var x=this;return this.forwardJSONCall("getFormattingEditsForDocument('".concat(_,"')"),function(){var E=JSON.parse(b);return x.languageService.getFormattingEditsForDocument(_,E)})},L.prototype.getFormattingEditsAfterKeystroke=function(_,b,x,E){var P=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(_,"', ").concat(b,", '").concat(x,"')"),function(){var A=JSON.parse(E);return P.languageService.getFormattingEditsAfterKeystroke(_,b,x,A)})},L.prototype.getDocCommentTemplateAtPosition=function(_,b,x){var E=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(_,"', ").concat(b,")"),function(){return E.languageService.getDocCommentTemplateAtPosition(_,b,x)})},L.prototype.getNavigateToItems=function(_,b,x){var E=this;return this.forwardJSONCall("getNavigateToItems('".concat(_,"', ").concat(b,", ").concat(x,")"),function(){return E.languageService.getNavigateToItems(_,b,x)})},L.prototype.getNavigationBarItems=function(_){var b=this;return this.forwardJSONCall("getNavigationBarItems('".concat(_,"')"),function(){return b.languageService.getNavigationBarItems(_)})},L.prototype.getNavigationTree=function(_){var b=this;return this.forwardJSONCall("getNavigationTree('".concat(_,"')"),function(){return b.languageService.getNavigationTree(_)})},L.prototype.getOutliningSpans=function(_){var b=this;return this.forwardJSONCall("getOutliningSpans('".concat(_,"')"),function(){return b.languageService.getOutliningSpans(_)})},L.prototype.getTodoComments=function(_,b){var x=this;return this.forwardJSONCall("getTodoComments('".concat(_,"')"),function(){return x.languageService.getTodoComments(_,JSON.parse(b))})},L.prototype.prepareCallHierarchy=function(_,b){var x=this;return this.forwardJSONCall("prepareCallHierarchy('".concat(_,"', ").concat(b,")"),function(){return x.languageService.prepareCallHierarchy(_,b)})},L.prototype.provideCallHierarchyIncomingCalls=function(_,b){var x=this;return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(_,"', ").concat(b,")"),function(){return x.languageService.provideCallHierarchyIncomingCalls(_,b)})},L.prototype.provideCallHierarchyOutgoingCalls=function(_,b){var x=this;return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(_,"', ").concat(b,")"),function(){return x.languageService.provideCallHierarchyOutgoingCalls(_,b)})},L.prototype.provideInlayHints=function(_,b,x){var E=this;return this.forwardJSONCall("provideInlayHints('".concat(_,"', '").concat(JSON.stringify(b),"', ").concat(JSON.stringify(x),")"),function(){return E.languageService.provideInlayHints(_,b,x)})},L.prototype.getEmitOutput=function(_){var b=this;return this.forwardJSONCall("getEmitOutput('".concat(_,"')"),function(){var x=b.languageService.getEmitOutput(_),E=x.diagnostics,P=US(x,["diagnostics"]);return Ri(Ri({},P),{diagnostics:b.realizeDiagnostics(E)})})},L.prototype.getEmitOutputObject=function(_){var b=this;return ne(this.logger,"getEmitOutput('".concat(_,"')"),!1,function(){return b.languageService.getEmitOutput(_)},this.logPerformance)},L.prototype.toggleLineComment=function(_,b){var x=this;return this.forwardJSONCall("toggleLineComment('".concat(_,"', '").concat(JSON.stringify(b),"')"),function(){return x.languageService.toggleLineComment(_,b)})},L.prototype.toggleMultilineComment=function(_,b){var x=this;return this.forwardJSONCall("toggleMultilineComment('".concat(_,"', '").concat(JSON.stringify(b),"')"),function(){return x.languageService.toggleMultilineComment(_,b)})},L.prototype.commentSelection=function(_,b){var x=this;return this.forwardJSONCall("commentSelection('".concat(_,"', '").concat(JSON.stringify(b),"')"),function(){return x.languageService.commentSelection(_,b)})},L.prototype.uncommentSelection=function(_,b){var x=this;return this.forwardJSONCall("uncommentSelection('".concat(_,"', '").concat(JSON.stringify(b),"')"),function(){return x.languageService.uncommentSelection(_,b)})},L}(z);function le(O){return{spans:O.spans.join(","),endOfLineState:O.endOfLineState}}n(le,"convertClassifications");var se=function(O){nv(L,O);function L(_,b){var x=O.call(this,_)||this;return x.logger=b,x.logPerformance=!1,x.classifier=e.createClassifier(),x}return n(L,"ClassifierShimObject"),L.prototype.getEncodedLexicalClassifications=function(_,b,x){var E=this;return x===void 0&&(x=!1),B(this.logger,"getEncodedLexicalClassifications",function(){return le(E.classifier.getEncodedLexicalClassifications(_,b,x))},this.logPerformance)},L.prototype.getClassificationsForLine=function(_,b,x){x===void 0&&(x=!1);for(var E=this.classifier.getClassificationsForLine(_,b,x),P="",A=0,ve=E.entries;A<ve.length;A++){var be=ve[A];P+=be.length+`
267
267
  `,P+=be.classification+`
268
268
  `}return P+=E.finalLexState,P},L}(z),ce=function(O){nv(L,O);function L(_,b,x){var E=O.call(this,_)||this;return E.logger=b,E.host=x,E.logPerformance=!1,E}return n(L,"CoreServicesShimObject"),L.prototype.forwardJSONCall=function(_,b){return B(this.logger,_,b,this.logPerformance)},L.prototype.resolveModuleName=function(_,b,x){var E=this;return this.forwardJSONCall("resolveModuleName('".concat(_,"')"),function(){var P=JSON.parse(x),A=e.resolveModuleName(b,e.normalizeSlashes(_),P,E.host),ve=A.resolvedModule?A.resolvedModule.resolvedFileName:void 0;return A.resolvedModule&&A.resolvedModule.extension!==".ts"&&A.resolvedModule.extension!==".tsx"&&A.resolvedModule.extension!==".d.ts"&&(ve=void 0),{resolvedFileName:ve,failedLookupLocations:A.failedLookupLocations,affectingLocations:A.affectingLocations}})},L.prototype.resolveTypeReferenceDirective=function(_,b,x){var E=this;return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(_,")"),function(){var P=JSON.parse(x),A=e.resolveTypeReferenceDirective(b,e.normalizeSlashes(_),P,E.host);return{resolvedFileName:A.resolvedTypeReferenceDirective?A.resolvedTypeReferenceDirective.resolvedFileName:void 0,primary:A.resolvedTypeReferenceDirective?A.resolvedTypeReferenceDirective.primary:!0,failedLookupLocations:A.failedLookupLocations}})},L.prototype.getPreProcessedFileInfo=function(_,b){var x=this;return this.forwardJSONCall("getPreProcessedFileInfo('".concat(_,"')"),function(){var E=e.preProcessFile(e.getSnapshotText(b),!0,!0);return{referencedFiles:x.convertFileReferences(E.referencedFiles),importedFiles:x.convertFileReferences(E.importedFiles),ambientExternalModules:E.ambientExternalModules,isLibFile:E.isLibFile,typeReferenceDirectives:x.convertFileReferences(E.typeReferenceDirectives),libReferenceDirectives:x.convertFileReferences(E.libReferenceDirectives)}})},L.prototype.getAutomaticTypeDirectiveNames=function(_){var b=this;return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(_,"')"),function(){var x=JSON.parse(_);return e.getAutomaticTypeDirectiveNames(x,b.host)})},L.prototype.convertFileReferences=function(_){if(_){for(var b=[],x=0,E=_;x<E.length;x++){var P=E[x];b.push({path:e.normalizeSlashes(P.fileName),position:P.pos,length:P.end-P.pos})}return b}},L.prototype.getTSConfigFileInfo=function(_,b){var x=this;return this.forwardJSONCall("getTSConfigFileInfo('".concat(_,"')"),function(){var E=e.parseJsonText(_,e.getSnapshotText(b)),P=e.normalizeSlashes(_),A=e.parseJsonSourceFileConfigFileContent(E,x.host,e.getDirectoryPath(P),{},P);return{options:A.options,typeAcquisition:A.typeAcquisition,files:A.fileNames,raw:A.raw,errors:p(Gn(Gn([],E.parseDiagnostics,!0),A.errors,!0),`\r
269
- `)}})},L.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},L.prototype.discoverTypings=function(_){var b=this,x=e.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var E=JSON.parse(_);return b.safeList===void 0&&(b.safeList=e.JsTyping.loadSafeList(b.host,e.toPath(E.safeListPath,E.safeListPath,x))),e.JsTyping.discoverTypings(b.host,function(P){return b.logger.log(P)},E.fileNames,e.toPath(E.projectRootPath,E.projectRootPath,x),b.safeList,E.packageNameToTypingLocation,E.typeAcquisition,E.unresolvedImports,E.typesRegistry,e.emptyOptions)})},L}(z),ue=function(){function O(){this._shims=[]}return n(O,"TypeScriptServicesFactory"),O.prototype.getServicesVersion=function(){return e.servicesVersion},O.prototype.createLanguageServiceShim=function(L){try{this.documentRegistry===void 0&&(this.documentRegistry=e.createDocumentRegistry(L.useCaseSensitiveFileNames&&L.useCaseSensitiveFileNames(),L.getCurrentDirectory()));var _=new m(L),b=e.createLanguageService(_,this.documentRegistry,!1);return new fe(this,L,b)}catch(x){throw a(L,x),x}},O.prototype.createClassifierShim=function(L){try{return new se(this,L)}catch(_){throw a(L,_),_}},O.prototype.createCoreServicesShim=function(L){try{var _=new M(L);return new ce(this,L,_)}catch(b){throw a(L,b),b}},O.prototype.close=function(){e.clear(this._shims),this.documentRegistry=void 0},O.prototype.registerShim=function(L){this._shims.push(L)},O.prototype.unregisterShim=function(L){for(var _=0;_<this._shims.length;_++)if(this._shims[_]===L){delete this._shims[_];return}throw new Error("Invalid operation")},O}();e.TypeScriptServicesFactory=ue})(_r||(_r={}));(function(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,typeof globalThis>"u"&&(window.globalThis=window),delete Object.prototype.__magic__}catch{window.globalThis=window}})();(typeof process>"u"||process.browser)&&(globalThis.TypeScript=globalThis.TypeScript||{},globalThis.TypeScript.Services=globalThis.TypeScript.Services||{},globalThis.TypeScript.Services.TypeScriptServicesFactory=_r.TypeScriptServicesFactory,globalThis.toolsVersion=_r.versionMajorMinor);typeof Ah<"u"&&Ah.exports&&(Ah.exports=_r);var _r;(function(e){function a(M,h,B,ne){if(Object.defineProperty(se,"name",Ri(Ri({},Object.getOwnPropertyDescriptor(se,"name")),{value:M})),ne)for(var z=0,p=Object.keys(ne);z<p.length;z++){var v=p[z],fe=+v;!isNaN(fe)&&e.hasProperty(h,"".concat(fe))&&(h[fe]=e.Debug.deprecate(h[fe],Ri(Ri({},ne[fe]),{name:M})))}var le=y(h,B);return se;function se(){for(var ce=[],ue=0;ue<arguments.length;ue++)ce[ue]=arguments[ue];var O=le(ce),L=O!==void 0?h[O]:void 0;if(typeof L=="function")return L.apply(void 0,ce);throw new TypeError("Invalid arguments")}}n(a,"createOverload"),e.createOverload=a;function y(M,h){return function(B){for(var ne=0;e.hasProperty(M,"".concat(ne))&&e.hasProperty(h,"".concat(ne));ne++){var z=h[ne];if(z(B))return ne}}}n(y,"createBinder");function m(M){return{overload:function(h){return{bind:function(B){return{finish:function(){return a(M,h,B)},deprecate:function(ne){return{finish:function(){return a(M,h,B,ne)}}}}}}}}}n(m,"buildOverload"),e.buildOverload=m})(_r||(_r={}));var _r;(function(e){var a={since:"4.0",warnAfter:"4.1",message:"Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead."};e.createNodeArray=e.Debug.deprecate(e.factory.createNodeArray,a),e.createNumericLiteral=e.Debug.deprecate(e.factory.createNumericLiteral,a),e.createBigIntLiteral=e.Debug.deprecate(e.factory.createBigIntLiteral,a),e.createStringLiteral=e.Debug.deprecate(e.factory.createStringLiteral,a),e.createStringLiteralFromNode=e.Debug.deprecate(e.factory.createStringLiteralFromNode,a),e.createRegularExpressionLiteral=e.Debug.deprecate(e.factory.createRegularExpressionLiteral,a),e.createLoopVariable=e.Debug.deprecate(e.factory.createLoopVariable,a),e.createUniqueName=e.Debug.deprecate(e.factory.createUniqueName,a),e.createPrivateIdentifier=e.Debug.deprecate(e.factory.createPrivateIdentifier,a),e.createSuper=e.Debug.deprecate(e.factory.createSuper,a),e.createThis=e.Debug.deprecate(e.factory.createThis,a),e.createNull=e.Debug.deprecate(e.factory.createNull,a),e.createTrue=e.Debug.deprecate(e.factory.createTrue,a),e.createFalse=e.Debug.deprecate(e.factory.createFalse,a),e.createModifier=e.Debug.deprecate(e.factory.createModifier,a),e.createModifiersFromModifierFlags=e.Debug.deprecate(e.factory.createModifiersFromModifierFlags,a),e.createQualifiedName=e.Debug.deprecate(e.factory.createQualifiedName,a),e.updateQualifiedName=e.Debug.deprecate(e.factory.updateQualifiedName,a),e.createComputedPropertyName=e.Debug.deprecate(e.factory.createComputedPropertyName,a),e.updateComputedPropertyName=e.Debug.deprecate(e.factory.updateComputedPropertyName,a),e.createTypeParameterDeclaration=e.Debug.deprecate(e.factory.createTypeParameterDeclaration,a),e.updateTypeParameterDeclaration=e.Debug.deprecate(e.factory.updateTypeParameterDeclaration,a),e.createParameter=e.Debug.deprecate(e.factory.createParameterDeclaration,a),e.updateParameter=e.Debug.deprecate(e.factory.updateParameterDeclaration,a),e.createDecorator=e.Debug.deprecate(e.factory.createDecorator,a),e.updateDecorator=e.Debug.deprecate(e.factory.updateDecorator,a),e.createProperty=e.Debug.deprecate(e.factory.createPropertyDeclaration,a),e.updateProperty=e.Debug.deprecate(e.factory.updatePropertyDeclaration,a),e.createMethod=e.Debug.deprecate(e.factory.createMethodDeclaration,a),e.updateMethod=e.Debug.deprecate(e.factory.updateMethodDeclaration,a),e.createConstructor=e.Debug.deprecate(e.factory.createConstructorDeclaration,a),e.updateConstructor=e.Debug.deprecate(e.factory.updateConstructorDeclaration,a),e.createGetAccessor=e.Debug.deprecate(e.factory.createGetAccessorDeclaration,a),e.updateGetAccessor=e.Debug.deprecate(e.factory.updateGetAccessorDeclaration,a),e.createSetAccessor=e.Debug.deprecate(e.factory.createSetAccessorDeclaration,a),e.updateSetAccessor=e.Debug.deprecate(e.factory.updateSetAccessorDeclaration,a),e.createCallSignature=e.Debug.deprecate(e.factory.createCallSignature,a),e.updateCallSignature=e.Debug.deprecate(e.factory.updateCallSignature,a),e.createConstructSignature=e.Debug.deprecate(e.factory.createConstructSignature,a),e.updateConstructSignature=e.Debug.deprecate(e.factory.updateConstructSignature,a),e.updateIndexSignature=e.Debug.deprecate(e.factory.updateIndexSignature,a),e.createKeywordTypeNode=e.Debug.deprecate(e.factory.createKeywordTypeNode,a),e.createTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.createTypePredicateNode,a),e.updateTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.updateTypePredicateNode,a),e.createTypeReferenceNode=e.Debug.deprecate(e.factory.createTypeReferenceNode,a),e.updateTypeReferenceNode=e.Debug.deprecate(e.factory.updateTypeReferenceNode,a),e.createFunctionTypeNode=e.Debug.deprecate(e.factory.createFunctionTypeNode,a),e.updateFunctionTypeNode=e.Debug.deprecate(e.factory.updateFunctionTypeNode,a),e.createConstructorTypeNode=e.Debug.deprecate(function(y,m,M){return e.factory.createConstructorTypeNode(void 0,y,m,M)},a),e.updateConstructorTypeNode=e.Debug.deprecate(function(y,m,M,h){return e.factory.updateConstructorTypeNode(y,y.modifiers,m,M,h)},a),e.createTypeQueryNode=e.Debug.deprecate(e.factory.createTypeQueryNode,a),e.updateTypeQueryNode=e.Debug.deprecate(e.factory.updateTypeQueryNode,a),e.createTypeLiteralNode=e.Debug.deprecate(e.factory.createTypeLiteralNode,a),e.updateTypeLiteralNode=e.Debug.deprecate(e.factory.updateTypeLiteralNode,a),e.createArrayTypeNode=e.Debug.deprecate(e.factory.createArrayTypeNode,a),e.updateArrayTypeNode=e.Debug.deprecate(e.factory.updateArrayTypeNode,a),e.createTupleTypeNode=e.Debug.deprecate(e.factory.createTupleTypeNode,a),e.updateTupleTypeNode=e.Debug.deprecate(e.factory.updateTupleTypeNode,a),e.createOptionalTypeNode=e.Debug.deprecate(e.factory.createOptionalTypeNode,a),e.updateOptionalTypeNode=e.Debug.deprecate(e.factory.updateOptionalTypeNode,a),e.createRestTypeNode=e.Debug.deprecate(e.factory.createRestTypeNode,a),e.updateRestTypeNode=e.Debug.deprecate(e.factory.updateRestTypeNode,a),e.createUnionTypeNode=e.Debug.deprecate(e.factory.createUnionTypeNode,a),e.updateUnionTypeNode=e.Debug.deprecate(e.factory.updateUnionTypeNode,a),e.createIntersectionTypeNode=e.Debug.deprecate(e.factory.createIntersectionTypeNode,a),e.updateIntersectionTypeNode=e.Debug.deprecate(e.factory.updateIntersectionTypeNode,a),e.createConditionalTypeNode=e.Debug.deprecate(e.factory.createConditionalTypeNode,a),e.updateConditionalTypeNode=e.Debug.deprecate(e.factory.updateConditionalTypeNode,a),e.createInferTypeNode=e.Debug.deprecate(e.factory.createInferTypeNode,a),e.updateInferTypeNode=e.Debug.deprecate(e.factory.updateInferTypeNode,a),e.createImportTypeNode=e.Debug.deprecate(e.factory.createImportTypeNode,a),e.updateImportTypeNode=e.Debug.deprecate(e.factory.updateImportTypeNode,a),e.createParenthesizedType=e.Debug.deprecate(e.factory.createParenthesizedType,a),e.updateParenthesizedType=e.Debug.deprecate(e.factory.updateParenthesizedType,a),e.createThisTypeNode=e.Debug.deprecate(e.factory.createThisTypeNode,a),e.updateTypeOperatorNode=e.Debug.deprecate(e.factory.updateTypeOperatorNode,a),e.createIndexedAccessTypeNode=e.Debug.deprecate(e.factory.createIndexedAccessTypeNode,a),e.updateIndexedAccessTypeNode=e.Debug.deprecate(e.factory.updateIndexedAccessTypeNode,a),e.createMappedTypeNode=e.Debug.deprecate(e.factory.createMappedTypeNode,a),e.updateMappedTypeNode=e.Debug.deprecate(e.factory.updateMappedTypeNode,a),e.createLiteralTypeNode=e.Debug.deprecate(e.factory.createLiteralTypeNode,a),e.updateLiteralTypeNode=e.Debug.deprecate(e.factory.updateLiteralTypeNode,a),e.createObjectBindingPattern=e.Debug.deprecate(e.factory.createObjectBindingPattern,a),e.updateObjectBindingPattern=e.Debug.deprecate(e.factory.updateObjectBindingPattern,a),e.createArrayBindingPattern=e.Debug.deprecate(e.factory.createArrayBindingPattern,a),e.updateArrayBindingPattern=e.Debug.deprecate(e.factory.updateArrayBindingPattern,a),e.createBindingElement=e.Debug.deprecate(e.factory.createBindingElement,a),e.updateBindingElement=e.Debug.deprecate(e.factory.updateBindingElement,a),e.createArrayLiteral=e.Debug.deprecate(e.factory.createArrayLiteralExpression,a),e.updateArrayLiteral=e.Debug.deprecate(e.factory.updateArrayLiteralExpression,a),e.createObjectLiteral=e.Debug.deprecate(e.factory.createObjectLiteralExpression,a),e.updateObjectLiteral=e.Debug.deprecate(e.factory.updateObjectLiteralExpression,a),e.createPropertyAccess=e.Debug.deprecate(e.factory.createPropertyAccessExpression,a),e.updatePropertyAccess=e.Debug.deprecate(e.factory.updatePropertyAccessExpression,a),e.createPropertyAccessChain=e.Debug.deprecate(e.factory.createPropertyAccessChain,a),e.updatePropertyAccessChain=e.Debug.deprecate(e.factory.updatePropertyAccessChain,a),e.createElementAccess=e.Debug.deprecate(e.factory.createElementAccessExpression,a),e.updateElementAccess=e.Debug.deprecate(e.factory.updateElementAccessExpression,a),e.createElementAccessChain=e.Debug.deprecate(e.factory.createElementAccessChain,a),e.updateElementAccessChain=e.Debug.deprecate(e.factory.updateElementAccessChain,a),e.createCall=e.Debug.deprecate(e.factory.createCallExpression,a),e.updateCall=e.Debug.deprecate(e.factory.updateCallExpression,a),e.createCallChain=e.Debug.deprecate(e.factory.createCallChain,a),e.updateCallChain=e.Debug.deprecate(e.factory.updateCallChain,a),e.createNew=e.Debug.deprecate(e.factory.createNewExpression,a),e.updateNew=e.Debug.deprecate(e.factory.updateNewExpression,a),e.createTypeAssertion=e.Debug.deprecate(e.factory.createTypeAssertion,a),e.updateTypeAssertion=e.Debug.deprecate(e.factory.updateTypeAssertion,a),e.createParen=e.Debug.deprecate(e.factory.createParenthesizedExpression,a),e.updateParen=e.Debug.deprecate(e.factory.updateParenthesizedExpression,a),e.createFunctionExpression=e.Debug.deprecate(e.factory.createFunctionExpression,a),e.updateFunctionExpression=e.Debug.deprecate(e.factory.updateFunctionExpression,a),e.createDelete=e.Debug.deprecate(e.factory.createDeleteExpression,a),e.updateDelete=e.Debug.deprecate(e.factory.updateDeleteExpression,a),e.createTypeOf=e.Debug.deprecate(e.factory.createTypeOfExpression,a),e.updateTypeOf=e.Debug.deprecate(e.factory.updateTypeOfExpression,a),e.createVoid=e.Debug.deprecate(e.factory.createVoidExpression,a),e.updateVoid=e.Debug.deprecate(e.factory.updateVoidExpression,a),e.createAwait=e.Debug.deprecate(e.factory.createAwaitExpression,a),e.updateAwait=e.Debug.deprecate(e.factory.updateAwaitExpression,a),e.createPrefix=e.Debug.deprecate(e.factory.createPrefixUnaryExpression,a),e.updatePrefix=e.Debug.deprecate(e.factory.updatePrefixUnaryExpression,a),e.createPostfix=e.Debug.deprecate(e.factory.createPostfixUnaryExpression,a),e.updatePostfix=e.Debug.deprecate(e.factory.updatePostfixUnaryExpression,a),e.createBinary=e.Debug.deprecate(e.factory.createBinaryExpression,a),e.updateConditional=e.Debug.deprecate(e.factory.updateConditionalExpression,a),e.createTemplateExpression=e.Debug.deprecate(e.factory.createTemplateExpression,a),e.updateTemplateExpression=e.Debug.deprecate(e.factory.updateTemplateExpression,a),e.createTemplateHead=e.Debug.deprecate(e.factory.createTemplateHead,a),e.createTemplateMiddle=e.Debug.deprecate(e.factory.createTemplateMiddle,a),e.createTemplateTail=e.Debug.deprecate(e.factory.createTemplateTail,a),e.createNoSubstitutionTemplateLiteral=e.Debug.deprecate(e.factory.createNoSubstitutionTemplateLiteral,a),e.updateYield=e.Debug.deprecate(e.factory.updateYieldExpression,a),e.createSpread=e.Debug.deprecate(e.factory.createSpreadElement,a),e.updateSpread=e.Debug.deprecate(e.factory.updateSpreadElement,a),e.createOmittedExpression=e.Debug.deprecate(e.factory.createOmittedExpression,a),e.createAsExpression=e.Debug.deprecate(e.factory.createAsExpression,a),e.updateAsExpression=e.Debug.deprecate(e.factory.updateAsExpression,a),e.createNonNullExpression=e.Debug.deprecate(e.factory.createNonNullExpression,a),e.updateNonNullExpression=e.Debug.deprecate(e.factory.updateNonNullExpression,a),e.createNonNullChain=e.Debug.deprecate(e.factory.createNonNullChain,a),e.updateNonNullChain=e.Debug.deprecate(e.factory.updateNonNullChain,a),e.createMetaProperty=e.Debug.deprecate(e.factory.createMetaProperty,a),e.updateMetaProperty=e.Debug.deprecate(e.factory.updateMetaProperty,a),e.createTemplateSpan=e.Debug.deprecate(e.factory.createTemplateSpan,a),e.updateTemplateSpan=e.Debug.deprecate(e.factory.updateTemplateSpan,a),e.createSemicolonClassElement=e.Debug.deprecate(e.factory.createSemicolonClassElement,a),e.createBlock=e.Debug.deprecate(e.factory.createBlock,a),e.updateBlock=e.Debug.deprecate(e.factory.updateBlock,a),e.createVariableStatement=e.Debug.deprecate(e.factory.createVariableStatement,a),e.updateVariableStatement=e.Debug.deprecate(e.factory.updateVariableStatement,a),e.createEmptyStatement=e.Debug.deprecate(e.factory.createEmptyStatement,a),e.createExpressionStatement=e.Debug.deprecate(e.factory.createExpressionStatement,a),e.updateExpressionStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,a),e.createStatement=e.Debug.deprecate(e.factory.createExpressionStatement,a),e.updateStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,a),e.createIf=e.Debug.deprecate(e.factory.createIfStatement,a),e.updateIf=e.Debug.deprecate(e.factory.updateIfStatement,a),e.createDo=e.Debug.deprecate(e.factory.createDoStatement,a),e.updateDo=e.Debug.deprecate(e.factory.updateDoStatement,a),e.createWhile=e.Debug.deprecate(e.factory.createWhileStatement,a),e.updateWhile=e.Debug.deprecate(e.factory.updateWhileStatement,a),e.createFor=e.Debug.deprecate(e.factory.createForStatement,a),e.updateFor=e.Debug.deprecate(e.factory.updateForStatement,a),e.createForIn=e.Debug.deprecate(e.factory.createForInStatement,a),e.updateForIn=e.Debug.deprecate(e.factory.updateForInStatement,a),e.createForOf=e.Debug.deprecate(e.factory.createForOfStatement,a),e.updateForOf=e.Debug.deprecate(e.factory.updateForOfStatement,a),e.createContinue=e.Debug.deprecate(e.factory.createContinueStatement,a),e.updateContinue=e.Debug.deprecate(e.factory.updateContinueStatement,a),e.createBreak=e.Debug.deprecate(e.factory.createBreakStatement,a),e.updateBreak=e.Debug.deprecate(e.factory.updateBreakStatement,a),e.createReturn=e.Debug.deprecate(e.factory.createReturnStatement,a),e.updateReturn=e.Debug.deprecate(e.factory.updateReturnStatement,a),e.createWith=e.Debug.deprecate(e.factory.createWithStatement,a),e.updateWith=e.Debug.deprecate(e.factory.updateWithStatement,a),e.createSwitch=e.Debug.deprecate(e.factory.createSwitchStatement,a),e.updateSwitch=e.Debug.deprecate(e.factory.updateSwitchStatement,a),e.createLabel=e.Debug.deprecate(e.factory.createLabeledStatement,a),e.updateLabel=e.Debug.deprecate(e.factory.updateLabeledStatement,a),e.createThrow=e.Debug.deprecate(e.factory.createThrowStatement,a),e.updateThrow=e.Debug.deprecate(e.factory.updateThrowStatement,a),e.createTry=e.Debug.deprecate(e.factory.createTryStatement,a),e.updateTry=e.Debug.deprecate(e.factory.updateTryStatement,a),e.createDebuggerStatement=e.Debug.deprecate(e.factory.createDebuggerStatement,a),e.createVariableDeclarationList=e.Debug.deprecate(e.factory.createVariableDeclarationList,a),e.updateVariableDeclarationList=e.Debug.deprecate(e.factory.updateVariableDeclarationList,a),e.createFunctionDeclaration=e.Debug.deprecate(e.factory.createFunctionDeclaration,a),e.updateFunctionDeclaration=e.Debug.deprecate(e.factory.updateFunctionDeclaration,a),e.createClassDeclaration=e.Debug.deprecate(e.factory.createClassDeclaration,a),e.updateClassDeclaration=e.Debug.deprecate(e.factory.updateClassDeclaration,a),e.createInterfaceDeclaration=e.Debug.deprecate(e.factory.createInterfaceDeclaration,a),e.updateInterfaceDeclaration=e.Debug.deprecate(e.factory.updateInterfaceDeclaration,a),e.createTypeAliasDeclaration=e.Debug.deprecate(e.factory.createTypeAliasDeclaration,a),e.updateTypeAliasDeclaration=e.Debug.deprecate(e.factory.updateTypeAliasDeclaration,a),e.createEnumDeclaration=e.Debug.deprecate(e.factory.createEnumDeclaration,a),e.updateEnumDeclaration=e.Debug.deprecate(e.factory.updateEnumDeclaration,a),e.createModuleDeclaration=e.Debug.deprecate(e.factory.createModuleDeclaration,a),e.updateModuleDeclaration=e.Debug.deprecate(e.factory.updateModuleDeclaration,a),e.createModuleBlock=e.Debug.deprecate(e.factory.createModuleBlock,a),e.updateModuleBlock=e.Debug.deprecate(e.factory.updateModuleBlock,a),e.createCaseBlock=e.Debug.deprecate(e.factory.createCaseBlock,a),e.updateCaseBlock=e.Debug.deprecate(e.factory.updateCaseBlock,a),e.createNamespaceExportDeclaration=e.Debug.deprecate(e.factory.createNamespaceExportDeclaration,a),e.updateNamespaceExportDeclaration=e.Debug.deprecate(e.factory.updateNamespaceExportDeclaration,a),e.createImportEqualsDeclaration=e.Debug.deprecate(e.factory.createImportEqualsDeclaration,a),e.updateImportEqualsDeclaration=e.Debug.deprecate(e.factory.updateImportEqualsDeclaration,a),e.createImportDeclaration=e.Debug.deprecate(e.factory.createImportDeclaration,a),e.updateImportDeclaration=e.Debug.deprecate(e.factory.updateImportDeclaration,a),e.createNamespaceImport=e.Debug.deprecate(e.factory.createNamespaceImport,a),e.updateNamespaceImport=e.Debug.deprecate(e.factory.updateNamespaceImport,a),e.createNamedImports=e.Debug.deprecate(e.factory.createNamedImports,a),e.updateNamedImports=e.Debug.deprecate(e.factory.updateNamedImports,a),e.createImportSpecifier=e.Debug.deprecate(e.factory.createImportSpecifier,a),e.updateImportSpecifier=e.Debug.deprecate(e.factory.updateImportSpecifier,a),e.createExportAssignment=e.Debug.deprecate(e.factory.createExportAssignment,a),e.updateExportAssignment=e.Debug.deprecate(e.factory.updateExportAssignment,a),e.createNamedExports=e.Debug.deprecate(e.factory.createNamedExports,a),e.updateNamedExports=e.Debug.deprecate(e.factory.updateNamedExports,a),e.createExportSpecifier=e.Debug.deprecate(e.factory.createExportSpecifier,a),e.updateExportSpecifier=e.Debug.deprecate(e.factory.updateExportSpecifier,a),e.createExternalModuleReference=e.Debug.deprecate(e.factory.createExternalModuleReference,a),e.updateExternalModuleReference=e.Debug.deprecate(e.factory.updateExternalModuleReference,a),e.createJSDocTypeExpression=e.Debug.deprecate(e.factory.createJSDocTypeExpression,a),e.createJSDocTypeTag=e.Debug.deprecate(e.factory.createJSDocTypeTag,a),e.createJSDocReturnTag=e.Debug.deprecate(e.factory.createJSDocReturnTag,a),e.createJSDocThisTag=e.Debug.deprecate(e.factory.createJSDocThisTag,a),e.createJSDocComment=e.Debug.deprecate(e.factory.createJSDocComment,a),e.createJSDocParameterTag=e.Debug.deprecate(e.factory.createJSDocParameterTag,a),e.createJSDocClassTag=e.Debug.deprecate(e.factory.createJSDocClassTag,a),e.createJSDocAugmentsTag=e.Debug.deprecate(e.factory.createJSDocAugmentsTag,a),e.createJSDocEnumTag=e.Debug.deprecate(e.factory.createJSDocEnumTag,a),e.createJSDocTemplateTag=e.Debug.deprecate(e.factory.createJSDocTemplateTag,a),e.createJSDocTypedefTag=e.Debug.deprecate(e.factory.createJSDocTypedefTag,a),e.createJSDocCallbackTag=e.Debug.deprecate(e.factory.createJSDocCallbackTag,a),e.createJSDocSignature=e.Debug.deprecate(e.factory.createJSDocSignature,a),e.createJSDocPropertyTag=e.Debug.deprecate(e.factory.createJSDocPropertyTag,a),e.createJSDocTypeLiteral=e.Debug.deprecate(e.factory.createJSDocTypeLiteral,a),e.createJSDocImplementsTag=e.Debug.deprecate(e.factory.createJSDocImplementsTag,a),e.createJSDocAuthorTag=e.Debug.deprecate(e.factory.createJSDocAuthorTag,a),e.createJSDocPublicTag=e.Debug.deprecate(e.factory.createJSDocPublicTag,a),e.createJSDocPrivateTag=e.Debug.deprecate(e.factory.createJSDocPrivateTag,a),e.createJSDocProtectedTag=e.Debug.deprecate(e.factory.createJSDocProtectedTag,a),e.createJSDocReadonlyTag=e.Debug.deprecate(e.factory.createJSDocReadonlyTag,a),e.createJSDocTag=e.Debug.deprecate(e.factory.createJSDocUnknownTag,a),e.createJsxElement=e.Debug.deprecate(e.factory.createJsxElement,a),e.updateJsxElement=e.Debug.deprecate(e.factory.updateJsxElement,a),e.createJsxSelfClosingElement=e.Debug.deprecate(e.factory.createJsxSelfClosingElement,a),e.updateJsxSelfClosingElement=e.Debug.deprecate(e.factory.updateJsxSelfClosingElement,a),e.createJsxOpeningElement=e.Debug.deprecate(e.factory.createJsxOpeningElement,a),e.updateJsxOpeningElement=e.Debug.deprecate(e.factory.updateJsxOpeningElement,a),e.createJsxClosingElement=e.Debug.deprecate(e.factory.createJsxClosingElement,a),e.updateJsxClosingElement=e.Debug.deprecate(e.factory.updateJsxClosingElement,a),e.createJsxFragment=e.Debug.deprecate(e.factory.createJsxFragment,a),e.createJsxText=e.Debug.deprecate(e.factory.createJsxText,a),e.updateJsxText=e.Debug.deprecate(e.factory.updateJsxText,a),e.createJsxOpeningFragment=e.Debug.deprecate(e.factory.createJsxOpeningFragment,a),e.createJsxJsxClosingFragment=e.Debug.deprecate(e.factory.createJsxJsxClosingFragment,a),e.updateJsxFragment=e.Debug.deprecate(e.factory.updateJsxFragment,a),e.createJsxAttribute=e.Debug.deprecate(e.factory.createJsxAttribute,a),e.updateJsxAttribute=e.Debug.deprecate(e.factory.updateJsxAttribute,a),e.createJsxAttributes=e.Debug.deprecate(e.factory.createJsxAttributes,a),e.updateJsxAttributes=e.Debug.deprecate(e.factory.updateJsxAttributes,a),e.createJsxSpreadAttribute=e.Debug.deprecate(e.factory.createJsxSpreadAttribute,a),e.updateJsxSpreadAttribute=e.Debug.deprecate(e.factory.updateJsxSpreadAttribute,a),e.createJsxExpression=e.Debug.deprecate(e.factory.createJsxExpression,a),e.updateJsxExpression=e.Debug.deprecate(e.factory.updateJsxExpression,a),e.createCaseClause=e.Debug.deprecate(e.factory.createCaseClause,a),e.updateCaseClause=e.Debug.deprecate(e.factory.updateCaseClause,a),e.createDefaultClause=e.Debug.deprecate(e.factory.createDefaultClause,a),e.updateDefaultClause=e.Debug.deprecate(e.factory.updateDefaultClause,a),e.createHeritageClause=e.Debug.deprecate(e.factory.createHeritageClause,a),e.updateHeritageClause=e.Debug.deprecate(e.factory.updateHeritageClause,a),e.createCatchClause=e.Debug.deprecate(e.factory.createCatchClause,a),e.updateCatchClause=e.Debug.deprecate(e.factory.updateCatchClause,a),e.createPropertyAssignment=e.Debug.deprecate(e.factory.createPropertyAssignment,a),e.updatePropertyAssignment=e.Debug.deprecate(e.factory.updatePropertyAssignment,a),e.createShorthandPropertyAssignment=e.Debug.deprecate(e.factory.createShorthandPropertyAssignment,a),e.updateShorthandPropertyAssignment=e.Debug.deprecate(e.factory.updateShorthandPropertyAssignment,a),e.createSpreadAssignment=e.Debug.deprecate(e.factory.createSpreadAssignment,a),e.updateSpreadAssignment=e.Debug.deprecate(e.factory.updateSpreadAssignment,a),e.createEnumMember=e.Debug.deprecate(e.factory.createEnumMember,a),e.updateEnumMember=e.Debug.deprecate(e.factory.updateEnumMember,a),e.updateSourceFileNode=e.Debug.deprecate(e.factory.updateSourceFile,a),e.createNotEmittedStatement=e.Debug.deprecate(e.factory.createNotEmittedStatement,a),e.createPartiallyEmittedExpression=e.Debug.deprecate(e.factory.createPartiallyEmittedExpression,a),e.updatePartiallyEmittedExpression=e.Debug.deprecate(e.factory.updatePartiallyEmittedExpression,a),e.createCommaList=e.Debug.deprecate(e.factory.createCommaListExpression,a),e.updateCommaList=e.Debug.deprecate(e.factory.updateCommaListExpression,a),e.createBundle=e.Debug.deprecate(e.factory.createBundle,a),e.updateBundle=e.Debug.deprecate(e.factory.updateBundle,a),e.createImmediatelyInvokedFunctionExpression=e.Debug.deprecate(e.factory.createImmediatelyInvokedFunctionExpression,a),e.createImmediatelyInvokedArrowFunction=e.Debug.deprecate(e.factory.createImmediatelyInvokedArrowFunction,a),e.createVoidZero=e.Debug.deprecate(e.factory.createVoidZero,a),e.createExportDefault=e.Debug.deprecate(e.factory.createExportDefault,a),e.createExternalModuleExport=e.Debug.deprecate(e.factory.createExternalModuleExport,a),e.createNamespaceExport=e.Debug.deprecate(e.factory.createNamespaceExport,a),e.updateNamespaceExport=e.Debug.deprecate(e.factory.updateNamespaceExport,a),e.createToken=e.Debug.deprecate(n(function(m){return e.factory.createToken(m)},"createToken"),a),e.createIdentifier=e.Debug.deprecate(n(function(m){return e.factory.createIdentifier(m,void 0,void 0)},"createIdentifier"),a),e.createTempVariable=e.Debug.deprecate(n(function(m){return e.factory.createTempVariable(m,void 0)},"createTempVariable"),a),e.getGeneratedNameForNode=e.Debug.deprecate(n(function(m){return e.factory.getGeneratedNameForNode(m,void 0)},"getGeneratedNameForNode"),a),e.createOptimisticUniqueName=e.Debug.deprecate(n(function(m){return e.factory.createUniqueName(m,16)},"createOptimisticUniqueName"),a),e.createFileLevelUniqueName=e.Debug.deprecate(n(function(m){return e.factory.createUniqueName(m,48)},"createFileLevelUniqueName"),a),e.createIndexSignature=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.createIndexSignature(m,M,h,B)},"createIndexSignature"),a),e.createTypePredicateNode=e.Debug.deprecate(n(function(m,M){return e.factory.createTypePredicateNode(void 0,m,M)},"createTypePredicateNode"),a),e.updateTypePredicateNode=e.Debug.deprecate(n(function(m,M,h){return e.factory.updateTypePredicateNode(m,void 0,M,h)},"updateTypePredicateNode"),a),e.createLiteral=e.Debug.deprecate(n(function(m){return typeof m=="number"?e.factory.createNumericLiteral(m):typeof m=="object"&&"base10Value"in m?e.factory.createBigIntLiteral(m):typeof m=="boolean"?m?e.factory.createTrue():e.factory.createFalse():typeof m=="string"?e.factory.createStringLiteral(m,void 0):e.factory.createStringLiteralFromNode(m)},"createLiteral"),{since:"4.0",warnAfter:"4.1",message:"Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead."}),e.createMethodSignature=e.Debug.deprecate(n(function(m,M,h,B,ne){return e.factory.createMethodSignature(void 0,B,ne,m,M,h)},"createMethodSignature"),a),e.updateMethodSignature=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateMethodSignature(m,m.modifiers,ne,z,M,h,B)},"updateMethodSignature"),a),e.createTypeOperatorNode=e.Debug.deprecate(n(function(m,M){var h;return M?h=m:(M=m,h=141),e.factory.createTypeOperatorNode(h,M)},"createTypeOperatorNode"),a),e.createTaggedTemplate=e.Debug.deprecate(n(function(m,M,h){var B;return h?B=M:h=M,e.factory.createTaggedTemplateExpression(m,B,h)},"createTaggedTemplate"),a),e.updateTaggedTemplate=e.Debug.deprecate(n(function(m,M,h,B){var ne;return B?ne=h:B=h,e.factory.updateTaggedTemplateExpression(m,M,ne,B)},"updateTaggedTemplate"),a),e.updateBinary=e.Debug.deprecate(n(function(m,M,h,B){return B===void 0&&(B=m.operatorToken),typeof B=="number"&&(B=B===m.operatorToken.kind?m.operatorToken:e.factory.createToken(B)),e.factory.updateBinaryExpression(m,M,B,h)},"updateBinary"),a),e.createConditional=e.Debug.deprecate(n(function(m,M,h,B,ne){return arguments.length===5?e.factory.createConditionalExpression(m,M,h,B,ne):arguments.length===3?e.factory.createConditionalExpression(m,e.factory.createToken(57),M,e.factory.createToken(58),h):e.Debug.fail("Argument count mismatch")},"createConditional"),a),e.createYield=e.Debug.deprecate(n(function(m,M){var h;return M?h=m:M=m,e.factory.createYieldExpression(h,M)},"createYield"),a),e.createClassExpression=e.Debug.deprecate(n(function(m,M,h,B,ne){return e.factory.createClassExpression(void 0,m,M,h,B,ne)},"createClassExpression"),a),e.updateClassExpression=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateClassExpression(m,void 0,M,h,B,ne,z)},"updateClassExpression"),a),e.createPropertySignature=e.Debug.deprecate(n(function(m,M,h,B,ne){var z=e.factory.createPropertySignature(m,M,h,B);return z.initializer=ne,z},"createPropertySignature"),a),e.updatePropertySignature=e.Debug.deprecate(n(function(m,M,h,B,ne,z){var p=e.factory.updatePropertySignature(m,M,h,B,ne);return m.initializer!==z&&(p===m&&(p=e.factory.cloneNode(m)),p.initializer=z),p},"updatePropertySignature"),a),e.createExpressionWithTypeArguments=e.Debug.deprecate(n(function(m,M){return e.factory.createExpressionWithTypeArguments(M,m)},"createExpressionWithTypeArguments"),a),e.updateExpressionWithTypeArguments=e.Debug.deprecate(n(function(m,M,h){return e.factory.updateExpressionWithTypeArguments(m,h,M)},"updateExpressionWithTypeArguments"),a),e.createArrowFunction=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return arguments.length===6?e.factory.createArrowFunction(m,M,h,B,ne,z):arguments.length===5?e.factory.createArrowFunction(m,M,h,B,void 0,ne):e.Debug.fail("Argument count mismatch")},"createArrowFunction"),a),e.updateArrowFunction=e.Debug.deprecate(n(function(m,M,h,B,ne,z,p){return arguments.length===7?e.factory.updateArrowFunction(m,M,h,B,ne,z,p):arguments.length===6?e.factory.updateArrowFunction(m,M,h,B,ne,m.equalsGreaterThanToken,z):e.Debug.fail("Argument count mismatch")},"updateArrowFunction"),a),e.createVariableDeclaration=e.Debug.deprecate(n(function(m,M,h,B){return arguments.length===4?e.factory.createVariableDeclaration(m,M,h,B):arguments.length>=1&&arguments.length<=3?e.factory.createVariableDeclaration(m,void 0,M,h):e.Debug.fail("Argument count mismatch")},"createVariableDeclaration"),a),e.updateVariableDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne){return arguments.length===5?e.factory.updateVariableDeclaration(m,M,h,B,ne):arguments.length===4?e.factory.updateVariableDeclaration(m,M,m.exclamationToken,h,B):e.Debug.fail("Argument count mismatch")},"updateVariableDeclaration"),a),e.createImportClause=e.Debug.deprecate(n(function(m,M,h){return h===void 0&&(h=!1),e.factory.createImportClause(h,m,M)},"createImportClause"),a),e.updateImportClause=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.updateImportClause(m,B,M,h)},"updateImportClause"),a),e.createExportDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne){return ne===void 0&&(ne=!1),e.factory.createExportDeclaration(m,M,ne,h,B)},"createExportDeclaration"),a),e.updateExportDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateExportDeclaration(m,M,h,z,B,ne,m.assertClause)},"updateExportDeclaration"),a),e.createJSDocParamTag=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.createJSDocParameterTag(void 0,m,M,h,!1,B?e.factory.createNodeArray([e.factory.createJSDocText(B)]):void 0)},"createJSDocParamTag"),a),e.createComma=e.Debug.deprecate(n(function(m,M){return e.factory.createComma(m,M)},"createComma"),a),e.createLessThan=e.Debug.deprecate(n(function(m,M){return e.factory.createLessThan(m,M)},"createLessThan"),a),e.createAssignment=e.Debug.deprecate(n(function(m,M){return e.factory.createAssignment(m,M)},"createAssignment"),a),e.createStrictEquality=e.Debug.deprecate(n(function(m,M){return e.factory.createStrictEquality(m,M)},"createStrictEquality"),a),e.createStrictInequality=e.Debug.deprecate(n(function(m,M){return e.factory.createStrictInequality(m,M)},"createStrictInequality"),a),e.createAdd=e.Debug.deprecate(n(function(m,M){return e.factory.createAdd(m,M)},"createAdd"),a),e.createSubtract=e.Debug.deprecate(n(function(m,M){return e.factory.createSubtract(m,M)},"createSubtract"),a),e.createLogicalAnd=e.Debug.deprecate(n(function(m,M){return e.factory.createLogicalAnd(m,M)},"createLogicalAnd"),a),e.createLogicalOr=e.Debug.deprecate(n(function(m,M){return e.factory.createLogicalOr(m,M)},"createLogicalOr"),a),e.createPostfixIncrement=e.Debug.deprecate(n(function(m){return e.factory.createPostfixIncrement(m)},"createPostfixIncrement"),a),e.createLogicalNot=e.Debug.deprecate(n(function(m){return e.factory.createLogicalNot(m)},"createLogicalNot"),a),e.createNode=e.Debug.deprecate(n(function(m,M,h){return M===void 0&&(M=0),h===void 0&&(h=0),e.setTextRangePosEnd(m===308?e.parseBaseNodeFactory.createBaseSourceFileNode(m):m===79?e.parseBaseNodeFactory.createBaseIdentifierNode(m):m===80?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(m):e.isNodeKind(m)?e.parseBaseNodeFactory.createBaseNode(m):e.parseBaseNodeFactory.createBaseTokenNode(m),M,h)},"createNode"),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate(n(function(m){var M=e.factory.cloneNode(m);return e.setTextRange(M,m),e.setParent(M,m.parent),M},"getMutableClone"),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`."})})(_r||(_r={}));var _r;(function(e){e.isTypeAssertion=e.Debug.deprecate(n(function(y){return y.kind===213},"isTypeAssertion"),{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})})(_r||(_r={}));var _r;(function(e){e.isIdentifierOrPrivateIdentifier=e.Debug.deprecate(n(function(y){return e.isMemberName(y)},"isIdentifierOrPrivateIdentifier"),{since:"4.2",warnAfter:"4.3",message:"Use `isMemberName` instead."})})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createConstructorTypeNode,h=m.updateConstructorTypeNode;m.createConstructorTypeNode=e.buildOverload("createConstructorTypeNode").overload({0:function(B,ne,z,p){return M(B,ne,z,p)},1:function(B,ne,z){return M(void 0,B,ne,z)}}).bind({0:function(B){return B.length===4},1:function(B){return B.length===3}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish(),m.updateConstructorTypeNode=e.buildOverload("updateConstructorTypeNode").overload({0:function(B,ne,z,p,v){return h(B,ne,z,p,v)},1:function(B,ne,z,p){return h(B,B.modifiers,ne,z,p)}}).bind({0:function(B){return B.length===5},1:function(B){return B.length===4}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createImportTypeNode,h=m.updateImportTypeNode;m.createImportTypeNode=e.buildOverload("createImportTypeNode").overload({0:function(B,ne,z,p,v){return M(B,ne,z,p,v)},1:function(B,ne,z,p){return M(B,void 0,ne,z,p)}}).bind({0:function(B){var ne=B[1],z=B[2],p=B[3],v=B[4];return(ne===void 0||e.isImportTypeAssertionContainer(ne))&&(z===void 0||!e.isArray(z))&&(p===void 0||e.isArray(p))&&(v===void 0||typeof v=="boolean")},1:function(B){var ne=B[1],z=B[2],p=B[3],v=B[4];return v===void 0&&(ne===void 0||e.isEntityName(ne))&&(z===void 0||e.isArray(z))&&(p===void 0||typeof p=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish(),m.updateImportTypeNode=e.buildOverload("updateImportTypeNode").overload({0:function(B,ne,z,p,v,fe){return h(B,ne,z,p,v,fe)},1:function(B,ne,z,p,v){return h(B,ne,B.assertions,z,p,v)}}).bind({0:function(B){var ne=B[2],z=B[3],p=B[4],v=B[5];return(ne===void 0||e.isImportTypeAssertionContainer(ne))&&(z===void 0||!e.isArray(z))&&(p===void 0||e.isArray(p))&&(v===void 0||typeof v=="boolean")},1:function(B){var ne=B[2],z=B[3],p=B[4],v=B[5];return v===void 0&&(ne===void 0||e.isEntityName(ne))&&(z===void 0||e.isArray(z))&&(p===void 0||typeof p=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createTypeParameterDeclaration,h=m.updateTypeParameterDeclaration;m.createTypeParameterDeclaration=e.buildOverload("createTypeParameterDeclaration").overload({0:function(B,ne,z,p){return M(B,ne,z,p)},1:function(B,ne,z){return M(void 0,B,ne,z)}}).bind({0:function(B){var ne=B[0];return ne===void 0||e.isArray(ne)},1:function(B){var ne=B[0];return ne!==void 0&&!e.isArray(ne)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish(),m.updateTypeParameterDeclaration=e.buildOverload("updateTypeParameterDeclaration").overload({0:function(B,ne,z,p,v){return h(B,ne,z,p,v)},1:function(B,ne,z,p){return h(B,B.modifiers,ne,z,p)}}).bind({0:function(B){var ne=B[1];return ne===void 0||e.isArray(ne)},1:function(B){var ne=B[1];return ne!==void 0&&!e.isArray(ne)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){var a={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter."},y={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter."},m={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters."};function M(B){var ne=B.createParameterDeclaration,z=B.updateParameterDeclaration,p=B.createPropertyDeclaration,v=B.updatePropertyDeclaration,fe=B.createMethodDeclaration,le=B.updateMethodDeclaration,se=B.createConstructorDeclaration,ce=B.updateConstructorDeclaration,ue=B.createGetAccessorDeclaration,O=B.updateGetAccessorDeclaration,L=B.createSetAccessorDeclaration,_=B.updateSetAccessorDeclaration,b=B.createIndexSignature,x=B.updateIndexSignature,E=B.createClassStaticBlockDeclaration,P=B.updateClassStaticBlockDeclaration,A=B.createClassExpression,ve=B.updateClassExpression,be=B.createFunctionDeclaration,Z=B.updateFunctionDeclaration,J=B.createClassDeclaration,$=B.updateClassDeclaration,Y=B.createInterfaceDeclaration,C=B.updateInterfaceDeclaration,j=B.createTypeAliasDeclaration,ae=B.updateTypeAliasDeclaration,U=B.createEnumDeclaration,F=B.updateEnumDeclaration,w=B.createModuleDeclaration,G=B.updateModuleDeclaration,X=B.createImportEqualsDeclaration,ee=B.updateImportEqualsDeclaration,De=B.createImportDeclaration,T=B.updateImportDeclaration,k=B.createExportAssignment,N=B.updateExportAssignment,ie=B.createExportDeclaration,V=B.updateExportDeclaration;B.createParameterDeclaration=e.buildOverload("createParameterDeclaration").overload({0:function(l,I,R,K,H,me){return ne(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return ne(e.concatenate(l,I),R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isBindingName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isDotDotDotToken(R))&&(K===void 0||typeof K=="string"||e.isBindingName(K))&&(H===void 0||e.isQuestionToken(H))&&(me===void 0||e.isTypeNode(me))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:a}).finish(),B.updateParameterDeclaration=e.buildOverload("updateParameterDeclaration").overload({0:function(l,I,R,K,H,me,ge){return z(l,I,R,K,H,me,ge)},1:function(l,I,R,K,H,me,ge,Ke){return z(l,e.concatenate(I,R),K,H,me,ge,Ke)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7];return ge===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isBindingName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isDotDotDotToken(R))&&(K===void 0||typeof K=="string"||e.isBindingName(K))&&(H===void 0||e.isQuestionToken(H))&&(me===void 0||e.isTypeNode(me))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:a}).finish(),B.createPropertyDeclaration=e.buildOverload("createPropertyDeclaration").overload({0:function(l,I,R,K,H){return p(l,I,R,K,H)},1:function(l,I,R,K,H,me){return p(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isQuestionOrExclamationToken(R))&&(K===void 0||e.isTypeNode(K))&&(H===void 0||e.isExpression(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||e.isQuestionOrExclamationToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))}}).deprecate({1:a}).finish(),B.updatePropertyDeclaration=e.buildOverload("updatePropertyDeclaration").overload({0:function(l,I,R,K,H,me){return v(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return v(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isQuestionOrExclamationToken(R))&&(K===void 0||e.isTypeNode(K))&&(H===void 0||e.isExpression(H))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||e.isQuestionOrExclamationToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))}}).deprecate({1:a}).finish(),B.createMethodDeclaration=e.buildOverload("createMethodDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke){return fe(l,I,R,K,H,me,ge,Ke)},1:function(l,I,R,K,H,me,ge,Ke,je){return fe(e.concatenate(l,I),R,K,H,me,ge,Ke,je)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7],je=l[8];return je===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isArray(H))&&(me===void 0||!e.some(me,e.isTypeParameterDeclaration))&&(ge===void 0||!e.isArray(ge))&&(Ke===void 0||e.isBlock(Ke))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7],je=l[8];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isAsteriskToken(R))&&(K===void 0||typeof K=="string"||e.isPropertyName(K))&&(H===void 0||!e.isArray(H))&&(me===void 0||!e.some(me,e.isParameter))&&(ge===void 0||e.isArray(ge))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:a}).finish(),B.updateMethodDeclaration=e.buildOverload("updateMethodDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke,je){return le(l,I,R,K,H,me,ge,Ke,je)},1:function(l,I,R,K,H,me,ge,Ke,je,Le){return le(l,e.concatenate(I,R),K,H,me,ge,Ke,je,Le)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8],je=l[9];return je===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isArray(H))&&(me===void 0||!e.some(me,e.isTypeParameterDeclaration))&&(ge===void 0||!e.isArray(ge))&&(Ke===void 0||e.isBlock(Ke))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8],je=l[9];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isAsteriskToken(R))&&(K===void 0||typeof K=="string"||e.isPropertyName(K))&&(H===void 0||!e.isArray(H))&&(me===void 0||!e.some(me,e.isParameter))&&(ge===void 0||e.isArray(ge))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:a}).finish(),B.createConstructorDeclaration=e.buildOverload("createConstructorDeclaration").overload({0:function(l,I,R){return se(l,I,R)},1:function(l,I,R,K){return se(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||!e.some(I,e.isDecorator))&&(R===void 0||!e.some(R,e.isModifier))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||!e.some(I,e.isModifier))&&(R===void 0||!e.some(R,e.isParameter))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:y}).finish(),B.updateConstructorDeclaration=e.buildOverload("updateConstructorDeclaration").overload({0:function(l,I,R,K){return ce(l,I,R,K)},1:function(l,I,R,K,H){return ce(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||!e.some(I,e.isDecorator))&&(R===void 0||!e.some(R,e.isModifier))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||!e.some(I,e.isModifier))&&(R===void 0||!e.some(R,e.isParameter))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:y}).finish(),B.createGetAccessorDeclaration=e.buildOverload("createGetAccessorDeclaration").overload({0:function(l,I,R,K,H){return ue(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ue(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isBlock(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isBlock(me))}}).deprecate({1:a}).finish(),B.updateGetAccessorDeclaration=e.buildOverload("updateGetAccessorDeclaration").overload({0:function(l,I,R,K,H,me){return O(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return O(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isBlock(H))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isBlock(me))}}).deprecate({1:a}).finish(),B.createSetAccessorDeclaration=e.buildOverload("createSetAccessorDeclaration").overload({0:function(l,I,R,K){return L(l,I,R,K)},1:function(l,I,R,K,H){return L(e.concatenate(l,I),R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:a}).finish(),B.updateSetAccessorDeclaration=e.buildOverload("updateSetAccessorDeclaration").overload({0:function(l,I,R,K,H){return _(l,I,R,K,H)},1:function(l,I,R,K,H,me){return _(l,e.concatenate(I,R),K,H,me)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5];return H===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:a}).finish(),B.createIndexSignature=e.buildOverload("createIndexSignature").overload({0:function(l,I,R){return b(l,I,R)},1:function(l,I,R,K){return b(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||e.every(R,e.isParameter))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.every(R,e.isModifier))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))}}).deprecate({1:y}).finish(),B.updateIndexSignature=e.buildOverload("updateIndexSignature").overload({0:function(l,I,R,K){return x(l,I,R,K)},1:function(l,I,R,K,H){return x(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||e.every(R,e.isParameter))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.every(R,e.isModifier))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))}}).deprecate({1:y}).finish(),B.createClassStaticBlockDeclaration=e.buildOverload("createClassStaticBlockDeclaration").overload({0:function(l){return E(l)},1:function(l,I,R){return E(R)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2];return R===void 0&&K===void 0&&(I===void 0||!e.isArray(I))},1:function(l){var I=l[0],R=l[1],K=l[2];return(I===void 0||e.isArray(I))&&(R===void 0||e.isArray(I))&&(K===void 0||e.isBlock(K))}}).deprecate({1:m}).finish(),B.updateClassStaticBlockDeclaration=e.buildOverload("updateClassStaticBlockDeclaration").overload({0:function(l,I){return P(l,I)},1:function(l,I,R,K){return P(l,K)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3];return R===void 0&&K===void 0&&(I===void 0||!e.isArray(I))},1:function(l){var I=l[1],R=l[2],K=l[3];return(I===void 0||e.isArray(I))&&(R===void 0||e.isArray(I))&&(K===void 0||e.isBlock(K))}}).deprecate({1:m}).finish(),B.createClassExpression=e.buildOverload("createClassExpression").overload({0:function(l,I,R,K,H){return A(l,I,R,K,H)},1:function(l,I,R,K,H,me){return A(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:y}).finish(),B.updateClassExpression=e.buildOverload("updateClassExpression").overload({0:function(l,I,R,K,H,me){return ve(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return ve(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:y}).finish(),B.createFunctionDeclaration=e.buildOverload("createFunctionDeclaration").overload({0:function(l,I,R,K,H,me,ge){return be(l,I,R,K,H,me,ge)},1:function(l,I,R,K,H,me,ge,Ke){return be(I,R,K,H,me,ge,Ke)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7];return Ke===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isIdentifier(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isParameter))&&(me===void 0||!e.isArray(me))&&(ge===void 0||e.isBlock(ge))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R!="string"&&e.isAsteriskToken(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.isArray(me))&&(ge===void 0||e.isTypeNode(ge))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:y}).finish(),B.updateFunctionDeclaration=e.buildOverload("updateFunctionDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke){return Z(l,I,R,K,H,me,ge,Ke)},1:function(l,I,R,K,H,me,ge,Ke,je){return Z(l,R,K,H,me,ge,Ke,je)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8];return Ke===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isIdentifier(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isParameter))&&(me===void 0||!e.isArray(me))&&(ge===void 0||e.isBlock(ge))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R!="string"&&e.isAsteriskToken(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.isArray(me))&&(ge===void 0||e.isTypeNode(ge))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:y}).finish(),B.createClassDeclaration=e.buildOverload("createClassDeclaration").overload({0:function(l,I,R,K,H){return J(l,I,R,K,H)},1:function(l,I,R,K,H,me){return J(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(){return!0}}).deprecate({1:a}).finish(),B.updateClassDeclaration=e.buildOverload("updateClassDeclaration").overload({0:function(l,I,R,K,H,me){return $(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return $(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:a}).finish(),B.createInterfaceDeclaration=e.buildOverload("createInterfaceDeclaration").overload({0:function(l,I,R,K,H){return Y(l,I,R,K,H)},1:function(l,I,R,K,H,me){return Y(I,R,K,H,me)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.every(me,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))}}).deprecate({1:y}).finish(),B.updateInterfaceDeclaration=e.buildOverload("updateInterfaceDeclaration").overload({0:function(l,I,R,K,H,me){return C(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return C(l,R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.every(me,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))}}).deprecate({1:y}).finish(),B.createTypeAliasDeclaration=e.buildOverload("createTypeAliasDeclaration").overload({0:function(l,I,R,K){return j(l,I,R,K)},1:function(l,I,R,K,H){return j(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||!e.isArray(H))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))&&(me===void 0||e.isTypeNode(me))}}).deprecate({1:y}).finish(),B.updateTypeAliasDeclaration=e.buildOverload("updateTypeAliasDeclaration").overload({0:function(l,I,R,K,H){return ae(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ae(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||!e.isArray(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))&&(me===void 0||e.isTypeNode(me))}}).deprecate({1:y}).finish(),B.createEnumDeclaration=e.buildOverload("createEnumDeclaration").overload({0:function(l,I,R){return U(l,I,R)},1:function(l,I,R,K){return U(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))}}).deprecate({1:y}).finish(),B.updateEnumDeclaration=e.buildOverload("updateEnumDeclaration").overload({0:function(l,I,R,K){return F(l,I,R,K)},1:function(l,I,R,K,H){return F(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))}}).deprecate({1:y}).finish(),B.createModuleDeclaration=e.buildOverload("createModuleDeclaration").overload({0:function(l,I,R,K){return w(l,I,R,K)},1:function(l,I,R,K,H){return w(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&R!==void 0&&!e.isArray(R)&&(K===void 0||e.isModuleBody(K))&&(H===void 0||typeof H=="number")},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isModuleName(K)&&(H===void 0||typeof H=="object")&&(me===void 0||typeof me=="number")}}).deprecate({1:y}).finish(),B.updateModuleDeclaration=e.buildOverload("updateModuleDeclaration").overload({0:function(l,I,R,K){return G(l,I,R,K)},1:function(l,I,R,K,H){return G(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isModuleBody(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isModuleName(K)&&(H===void 0||e.isModuleBody(H))}}).deprecate({1:y}).finish(),B.createImportEqualsDeclaration=e.buildOverload("createImportEqualsDeclaration").overload({0:function(l,I,R,K){return X(l,I,R,K)},1:function(l,I,R,K,H){return X(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K!="boolean"&&typeof H!="string"},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&(typeof H=="string"||e.isIdentifier(H))&&me!==void 0&&e.isModuleReference(me)}}).deprecate({1:y}).finish(),B.updateImportEqualsDeclaration=e.buildOverload("updateImportEqualsDeclaration").overload({0:function(l,I,R,K,H){return ee(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ee(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K!="boolean"&&typeof H!="string"},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&(typeof H=="string"||e.isIdentifier(H))&&me!==void 0&&e.isModuleReference(me)}}).deprecate({1:y}).finish(),B.createImportDeclaration=e.buildOverload("createImportDeclaration").overload({0:function(l,I,R,K){return De(l,I,R,K)},1:function(l,I,R,K,H){return De(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&K!==void 0&&e.isExpression(K)&&(H===void 0||e.isAssertClause(H))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||e.isImportClause(K))&&H!==void 0&&e.isExpression(H)&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:y}).finish(),B.updateImportDeclaration=e.buildOverload("updateImportDeclaration").overload({0:function(l,I,R,K,H){return T(l,I,R,K,H)},1:function(l,I,R,K,H,me){return T(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isExpression(K))&&(H===void 0||e.isAssertClause(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||e.isImportClause(K))&&H!==void 0&&e.isExpression(H)&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:y}).finish(),B.createExportAssignment=e.buildOverload("createExportAssignment").overload({0:function(l,I,R){return k(l,I,R)},1:function(l,I,R,K){return k(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K=="object"},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&H!==void 0&&e.isExpression(H)}}).deprecate({1:y}).finish(),B.updateExportAssignment=e.buildOverload("updateExportAssignment").overload({0:function(l,I,R){return N(l,I,R)},1:function(l,I,R,K){return N(l,R,K)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3];return K===void 0&&(I===void 0||e.every(I,e.isModifier))&&R!==void 0&&!e.isArray(R)},1:function(l){var I=l[1],R=l[2],K=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isExpression(K)}}).deprecate({1:y}).finish(),B.createExportDeclaration=e.buildOverload("createExportDeclaration").overload({0:function(l,I,R,K,H){return ie(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ie(I,R,K,H,me)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&typeof R=="boolean"&&typeof K!="boolean"&&(H===void 0||e.isExpression(H))&&(me===void 0||e.isAssertClause(me))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&typeof K=="boolean"&&(H===void 0||e.isNamedExportBindings(H))&&(me===void 0||e.isExpression(me))&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:y}).finish(),B.updateExportDeclaration=e.buildOverload("updateExportDeclaration").overload({0:function(l,I,R,K,H,me){return V(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return V(l,R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&typeof R=="boolean"&&typeof K!="boolean"&&(H===void 0||e.isExpression(H))&&(me===void 0||e.isAssertClause(me))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&typeof K=="boolean"&&(H===void 0||e.isNamedExportBindings(H))&&(me===void 0||e.isExpression(me))&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:y}).finish()}n(M,"patchNodeFactory");var h=e.createNodeFactory;e.createNodeFactory=function(B,ne){var z=h(B,ne);return M(z),z},M(e.factory)})(_r||(_r={}));var _r;(function(e){typeof console<"u"&&(e.Debug.loggingHost={log:function(a,y){switch(a){case e.LogLevel.Error:return console.error(y);case e.LogLevel.Warning:return console.warn(y);case e.LogLevel.Info:return console.log(y);case e.LogLevel.Verbose:return console.log(y)}}})})(_r||(_r={}))});var KF={};nF(KF,{RunMode:()=>Ym,getChecksumConfig:()=>mS,getLogin:()=>F1,init:()=>HF});module.exports=iF(KF);var bh=(m=>(m[m.Element=0]="Element",m[m.VisibleElement=1]="VisibleElement",m[m.AtPointElement=2]="AtPointElement",m))(bh||{});var C6=require("path");var Ym=(m=>(m.Normal="normal",m.Heal="heal",m.Refactor="refactor",m))(Ym||{});var k1=(z=>(z.Locator="locator",z.GetByRole="getByRole",z.GetByText="getByText",z.GetByLabel="getByLabel",z.GetByPlaceholder="getByPlaceholder",z.GetByAltText="getByAltText",z.GetByTitle="getByTitle",z.GetByTestId="getByTestId",z))(k1||{}),A1=(h=>(h.First="first",h.Last="last",h.Nth="nth",h.Filter="filter",h.Or="or",h))(A1||{});var Yp=E1(require("path")),P1=require("fs");var Sh=n(e=>new Promise(a=>setTimeout(a,e)),"awaitSleep"),uS=n(async(e,a=1e3,y="action hang guard timed out")=>{let m="guard-timed-out",M=n(async()=>(await Sh(a+1e3),m),"guard"),h=await Promise.race([e,M()]);if(typeof h=="string"&&h===m)throw new Error(y);return h},"guardReturn");function lS(e=5,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let y="";for(let m=e;m>0;--m)y+=a[Math.floor(Math.random()*a.length)];return y}n(lS,"randomString");async function I1(e,a){let y=dS(e,a),{ungzip:m}=fS(),M=await m((0,P1.readFileSync)(y));return JSON.parse(M)}n(I1,"getESRAMapForTestId");function Hv(e){return Yp.join(Yp.dirname(e),"..")}n(Hv,"getTestBaseDir");function dS(e,a){return Yp.join(tF(e),`${a}.checksum.esra`)}n(dS,"getESRAFilePath");function tF(e){return Yp.join(pS(e),"esra")}n(tF,"getESRAFolderPath");function y6(e,a){return Yp.join(pS(e),"har",a)}n(y6,"getHARFolderPath");function h6(e,a){return Yp.join(pS(e),"trace",`${a}.playwright-trace.zip`)}n(h6,"getTraceFilePath");function pS(e){return Yp.join(e,"test-data")}n(pS,"getTestDataPath");function aF(){return{uploadAgentHOST:"localhost",uploadAgentPort:3e3}}n(aF,"getUploadAgentDefaultConfig");var N1=n(async e=>{try{await uS(e,5e3)}catch{}},"guardAwait"),gS=n(e=>{let a=/\/\/.*/,y=/\/\*[\s\S]*?\*\//g;return e.replace(a,"").replace(y,"")},"stripJavascriptComments");async function w1(e,a){_u("Fetching selection data..");let m=n(async h=>a.evaluate(async B=>await window.checksum.testRunner.getSelectionDataForSelector(B),h),"getSelectionDataForSelector"),M=await m(e);if(M||(_u("Failed, waiting for network idle..."),await N1(a.waitForLoadState("networkidle")),M=await m(e),M)||(_u("Failed, waiting for element to be visible..."),await N1(a.locator(e).waitFor({state:"visible"})),M=await m(e),M)||(_u("Failed, will wait 5000ms..."),await Sh(5e3),M=await m(e),M))return M}n(w1,"selectionDataForSelector");async function O1(e,a,y,m=6e4){return a in e?uS(e[a](...y),m,"Execution timeout"):e}n(O1,"executePlaywrightMethodWithTimeout");var D6=!1;function b6(e){D6=e}n(b6,"setLogToConsole");function _u(...e){D6&&console.log(...e)}n(_u,"log");function _S(){return Yp.join(__dirname,"..","..","..","checksum")}n(_S,"checksumFolder");function F1(e){try{let a=require(`${_S()}/login.ts`).default;return async y=>{await a(y,e)}}catch(a){throw console.warn("Could not find checksum login file. Please set login.ts file in your checksum folder"),a}}n(F1,"getLogin");var Gv;function S6(){if(Gv)return Gv;let e;try{let a=(0,P1.existsSync)(`${_S()}/checksum.config.tmp.ts`)?"checksum.config.tmp.ts":"checksum.config.ts";e=require(`${_S()}/${a}`).default}catch{console.warn("Could not find checksum config file, will run with defaults"),e=mS()}return e}n(S6,"loadChecksumConfig");function mS(e={}){return Gv={...{apiKey:void 0,runMode:"normal",baseURL:void 0,apiURL:void 0,username:void 0,password:void 0,options:{useChecksumSelectors:!0,useChecksumAI:!1,newAssertionsEnabled:!0,useMockData:!1,printLogs:!1,writeTraceFile:!1},...aF()},...e},(!Gv.username||!Gv.password)&&console.warn("Username and/or password missing in config file"),Gv}n(mS,"getChecksumConfig");var Tg=class{constructor(a,y,m={generateSelectionData:!1}){this.page=a;this.phaseSetter=y;this.options=m;this.page=a,this.phaseSetter=y}addMetadata(a){}async execute(a,y,m){return O1(a,y,m)}async executeWithSelectors(a,y,m,M=void 0,h={}){for(let{selector:B,tag:ne}of a){this.phaseSetter({phase:M,payload:{selector:B,...h}});let z=this.page.locator(B);this.log(`Running with selector=${B})`);let p=!1;["check","uncheck"].includes(y)&&ne!=="input"&&(p=!0);let v=this.generateSelectionDataForSelector(B);if(await this.execute(z,p?"click":y,m)===!1){this.log("Fallback selector timeout");continue}return v}}async generateSelectionDataForSelector(a){let{generateSelectionData:y}=this.options;if(!y)return{selector:a,generatedLocator:void 0,esraMetadata:void 0};try{let m=await w1(a,this.page);if(!m)throw new Error(`[generateSelectionDataForSelector] Failed to generate selection data for selector ${a}`);return m}catch(m){throw this.log(m.message),m}}log(...a){_u(...a)}};n(Tg,"AbstractFallback");var M1=require("path");var Kv=class extends Tg{constructor(){super(...arguments);this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"}}init(y){return this.esraData={...this.esraData,minSelectionScore:.5,...y},this}async resolve(y){try{let{method:m,args:M}=y,{checksumId:h}=this.esraData,B=await this.getActionIdToESRAMap();if(!(h in B)){let v=`No ESRA metadata found for id ${h}`;throw new Error(v)}let ne=await this.getTestIdsForLocator(B[h]),{elementDataMap:z}=await this.getSelectors(ne),p=await this.executeWithSelectors(Object.values(z),m,M,"esra-action");if(p)return[p];throw new Error("Exhausted ESRA selectors")}catch(m){this.log(m.message);return}}async getActionIdToESRAMap(){try{this.actionIdToESRAMap||(this.actionIdToESRAMap=await I1((0,M1.join)((0,M1.dirname)(this.esraData.fileName),".."),this.esraData.testId))}catch(y){return super.log("Could not read ESRA metadata file, ",y),{}}return this.actionIdToESRAMap}async getSelectors(y){let m=[],M={};if(!y)return{selectors:m,elementDataMap:M};for(let h in Object.keys(bh)){let B=y.testIds[this.locatorTypeEnumToFieldMap[h]];if(!B)continue;let ne=`[data-checksum-testid="${B}"]`;m.push(ne),M[ne]={...y.elementData[this.locatorTypeEnumToFieldMap[h]],selector:y.selectors[this.locatorTypeEnumToFieldMap[h]]}}for(let h in Object.keys(bh)){let B=y.selectors[this.locatorTypeEnumToFieldMap[h]];B&&(m.push(B),M[B]={...y.elementData[this.locatorTypeEnumToFieldMap[h]],selector:B})}return this.log("Selectors for ESRA metadata:",m),{selectors:m,elementDataMap:M}}async getTestIdsForLocator(y,m={}){let{cachedSelector:M=void 0,retriesLeft:h=3,retryMaxTimeout:B=3e3,staticMetadata:ne}=m;this.phaseSetter({phase:"esra-search"});let z=await this.page.evaluate(async({esraMetadata:p,cachedSelector:v,staticMetadata:fe,minSelectionScore:le})=>await window.checksum.testRunner.getMatchingElementSelectionData(p,{minSelectionScore:le,cachedSelector:v,staticMetadata:fe}),{esraMetadata:y,cachedSelector:M,staticMetadata:ne,minSelectionScore:this.esraData.minSelectionScore});if(!z){if(h>0)return this.log("[getTestIdsForLocator] no match found, waiting and retrying..."),await Sh(B/h),this.getTestIdsForLocator(y,{...m,retriesLeft:h-1});this.log("[getTestIdsForLocator] failed to locate")}return z}toString(){return`Checksum Selector (${this.esraData.checksumId})`}};n(Kv,"ESRAfallback");var Qv=class extends Tg{init(){return this}async resolve(a){try{let{locator:y,method:m,args:M}=a;if(!["check","uncheck"].includes(m))return;this.phaseSetter({phase:"force"});let h=!1;for(let ne of Array.from(M))if(typeof ne=="object"){ne.force=!0,h=!0;break}if(h||(M=Array.from(M),M.push({force:!0})),await this.execute(y,m,M)!==!1)return[{selector:y._selector,generatedLocator:void 0,esraMetadata:void 0}];this.log("Locator timed out, ")}catch(y){this.log("initiateFallbackSequence exception, ",y);return}}toString(){return"Force Fallback"}};n(Qv,"ForceFallback");var Gf=class extends Tg{constructor(){super(...arguments);this.config={llm:{persistChecksumIds:!1}};this.runningChecksumIdIndex=[0];this.steps=[];this.selectionData=[];this.finish=!1;this.actionsCounter=1;this.mockServer=!1}init(y){let{goal:m,apiKey:M,apiUrl:h}=y;return Gf.goal=m,Gf.apiKey=M,h&&(Gf.API_BASE_URL=h),this}async resolve(){try{if(await this.initSession(),!await this.iterate()){this.log("[LLMFallback] LLMFallback failed");return}return this.selectionData}catch(y){this.log("[LLMFallback] Error resolving",y);return}}async iterate(){let y=!1,m=Gf.CLIENT_MAX_ITERATIONS;do{let{reducedHTML:M,flashingHTML:h,elementsForNodeInterpretation:B}=await this.page.evaluate(async([z])=>window.checksum.testGenerator.reduceHTML({overrideInteractableElementsSelectors:z}),[[void 0]]),ne=await this.getNextAction({reducedHTML:M,flashingHTML:h,elementsForNodeInterpretation:B,hasPreviousActionFailed:y});if(ne.thought==="finish")return this.log("[LLMFallback] Received finish step"),this.steps.length>0;if(["failed","fail"].includes(ne.thought))return this.log("[LLMFallback] Received failed signal, will quit"),!1;ne={...ne,...await this.getPlaywrightLocatorForChecksumId(ne.action.checksumid)};try{let z=await this.executeWithSelectors([{...ne,tag:null}],ne.action.type,["fill","navigate"].includes(ne.action.type)?[ne.action.value]:[],"llm-action",{thought:ne.thought});if(z)y=!1,this.selectionData.push({...z,method:{name:ne.action.type,args:["fill","navigate"].includes(ne.action.type)?[ne.action.value]:[]},comment:ne.thought});else throw new Error("Action failed")}catch(z){this.log("[LLMFallback] Error while executing selector",z.message),y=!0;continue}if(this.steps.push(ne),--m<=0){this.log("[LLMFallback] Maximum repeatition reached");break}}while(!0);return!1}async getNextAction({reducedHTML:y,flashingHTML:m,hasPreviousActionFailed:M,elementsForNodeInterpretation:h}){let{apiKey:B}=Gf;if(this.mockServer)return this.finish?{thought:"finish"}:(--this.actionsCounter===0&&(this.finish=!0),{thought:"mock-thought",action:{type:"click",checksumid:"10"}});let ne={reduction:{reducedHTML:y,flashingHTML:m,elementsForNodeInterpretation:h},currentURL:this.page.url()};try{let p=await(await fetch(`${Gf.API_BASE_URL}/iterate`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:Gf.apiKey},body:JSON.stringify({appName:B,sessionId:this.sessionId,iterationData:ne,hasPreviousActionFailed:M})})).json();return this.log("[LLMFallback] Received next action",p),p}catch(z){throw this.log("[LLMFallback] Error calling iterate",z),z}}async initSession(){let{apiKey:y,goal:m,thoughts:M}=Gf;if(this.log("[LLMFallback] Calling init session...",{appName:y,goal:m,thoughts:M}),this.mockServer){this.sessionId="mock-session-id";return}let h={storyTitle:m,thoughtsAndActions:{previous:M.slice(0,Math.max(M.length-1,0)).map(B=>({thought:B})),failing:{thought:M[M.length-1]},next:[]}};this.phaseSetter({phase:"llm-prompt",payload:{thought:h.thoughtsAndActions.failing.thought}});try{let B=await fetch(`${Gf.API_BASE_URL}/init`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:Gf.apiKey},body:JSON.stringify({appName:y,data:h})});this.sessionId=await B.text(),this.log("[LLMFallback] Session ID",this.sessionId)}catch(B){throw this.log("[LLMFallback] Error calling init session",B),B}}addMetadata(y){Gf.thoughts.push(y.thought)}async getPlaywrightLocatorForChecksumId(y){return!y||isNaN(Number(y))?(this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id : ${y},,,`),{selector:y}):(!this.config.llm.persistChecksumIds&&this.runningChecksumIdIndex.length>1&&Number(y)<this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-2]&&this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id, possibly from previous prompt: ${y},
270
- current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async M=>window.checksum.testGenerator.getSelectorForChecksumId(M),y))}getFailedThought(){return Gf.thoughts[Gf.thoughts.length-1]}toString(){return`Checksum AI Selector ${this.getFailedThought()}`}},hp=Gf;n(hp,"AIFallback"),hp.API_BASE_URL="https://api.checksum.ai/client-api/runtime/ai-fallback",hp.CLIENT_MAX_ITERATIONS=10,hp.thoughts=[];var x6=E1(require("path")),T6=require("fs");var oF="checksum-playwright-runtime.js",sF=__dirname+"/checksumlib.js";var $p=class{constructor(a,y="normal",m,M,h,B,ne){this.page=a;this.runMode=y;this.testIdSelector=m;this.codeMirror=M;this.options=h;this.apiKey=B;this.apiURL=ne;this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"};this.minSelectionScore=.5;this.phasePayload=void 0;this.locatorStack=[];this.fallbacks=[];this.checksumStepStack=[];this.phaseMap={};this.setPhase=a=>{let{phase:y,payload:m,clear:M}=a;M&&(this.phase=void 0,this.phasePayload=void 0),y&&(this.phase=y),m&&(this.phasePayload=m)};this.registerPageEvents(),this.resetFallbacks(),this.proxy=new Proxy(this,{get:n(function(p,v){return p.getPageMethod(v)},"get")}),b6(h.printLogs)}async prepareAPIMock(){let a={GET:0,POST:0,PUT:0,DELETE:0},y=x6.join(y6(Hv(this.testInfo.file),this.checksumTestId),"test.har");if(!(0,T6.existsSync)(y)){_u(`Could not find har file ${y} for test`);return}await this.page.routeFromHAR(y,{url:"*/**",notFound:"fallback",update:!1});let m=this.page._routes[0].handler;await this.page.route("**/*",M=>{let h=M.request().headers(),B=M.request().method();h["Checksum-Id"]=(++a[B]).toString(),M.request()._applyFallbackOverrides({headers:h}),m(M)})}registerPageEvents(){this.page.on("framenavigated",async a=>{a===this.page.mainFrame()&&(this.navigationPromise=new Promise((y,m)=>this.loadScript().then(y).catch(m)))}),this.page.context().tracing.start({screenshots:!0,snapshots:!0})}getPageMethod(a){return this.phase=void 0,typeof this[a]=="function"?this[a].bind(this):!Object.values(k1).includes(a)||!this.testInfo?this.page[a]:(this.locatorStack.length===0&&(this.pageInitialCallInTestFile=this.getFirstStackTraceFromTestFile()),this.pushToLocatorStack([{type:a,base:this.page,line:this.pageInitialCallInTestFile.line}]),n(function(m,M){try{return this.executeLocator(m,M)}catch(h){throw this.popLocatorChain(),h}},"Page").bind(this))}static async init(a,y,{runMode:m="normal",testIdSelector:M=void 0,apiKey:h,apiURL:B,options:ne={}}){return new $p(a,m,M,y,{useChecksumSelectors:!0,useChecksumAI:!0,newAssertionsEnabled:!0,writeTraceFile:!0,useMockData:!1,printLogs:!1,...ne},h,B).proxy}popLocatorChain(){return this.locatorStack.pop()}async initWithTest(a){this.testInfo=a,this.phase="script",this.setupStepInterceptors()}async onTestComplete(){if(this.options.writeTraceFile){let a=h6(Hv(this.testInfo.file),this.checksumTestId);return await this.page.context().tracing.stop({path:a}),a}}async testId(a){this.checksumTestId=a,(this.options.useMockData||this.runMode==="refactor")&&await this.prepareAPIMock()}checksumSelector(a){return this.options.useChecksumSelectors&&(this.fallbacks.push(this.constructFallback(Kv).init({checksumId:a,fileName:this.testInfo.file,testId:this.checksumTestId})),this.sortFallbacks()),this.checksumStepId=a,this.proxy}checksumAI(...a){if(a.length===0)throw new Error("checksumAI missing arguments");if(!this.options.useChecksumAI)return this.proxy;let{apiKey:y,apiURL:m}=this;if(this.fallbacks.push(this.constructFallback(hp).init({goal:this.testInfo.title,apiKey:y,apiURL:m})),this.sortFallbacks(),this.fallbacks.filter(M=>M instanceof hp).forEach(M=>M.addMetadata({thought:a[0]})),this.checksumStepInitialCallInTestFile=this.getFirstStackTraceFromTestFile(),a.length===1)return this.proxy;if(typeof a[1]!="function")throw new Error("Second argument for withChecksumStep must be a function");this.checksumStepStack.push(a[0]);try{console.log("=== running test function");let M=this;return n(async function(){await a[1](),console.log("==== done running test function"),M.checksumStepStack.pop()},"Page")()}catch(M){console.log(M),this.checksumStepStack.pop()}}async loadScript(){try{return this.navigationPromise&&await this.navigationPromise,await this.page.addScriptTag({path:sF}),await this.page.evaluate(async({initModules:a,ESRAselectionRules:y})=>{window.checksum.testRunner.init(y,[],a)},{ESRAselectionRules:{testIdSelector:this.testIdSelector},initModules:{assertionGenerator:!0}}),_u(`[init] init script loaded for ${this.page.url()}`),!0}catch{return!1}}pushToLocatorStack(a){this.locatorStack.push(a)}getCurrentLocatorChain(){if(this.locatorStack.length)return this.locatorStack[this.locatorStack.length-1]}getCurrentLocatorInChain(){let a=this.getCurrentLocatorChain();return a==null?void 0:a[a.length-1]}getMessage(a,{initialSelector:y,selector:m,thought:M}={}){switch(a){case"script":return"Firing up checksum";case"initial":return`${y} failed, trying some checksum magic...`;case"force":return"check/uncheck methods failed, falling back to click action";case"esra-search":return"Checksum is looking for potential alternatives to resolve the issue...";case"esra-action":return`AI: use selector ${m}`;case"llm-prompt":return`Checksum is trying to achieve step "${M}" using AI...`;case"llm-action":return`AI: "${M}" using selector "${m}"`;case"fail":return`Checksum couldn't resolve the issue executing ${y}`}}onFallbackSuccess(){let a=this.testInfo._steps[this.testInfo._steps.length-1];a&&!a.endWallTime&&a.complete({error:{message:`Failed to resolve ${this.initialLocatorTitle}`,stack:""}})}setupStepInterceptors(){let a=["checksum-page.ts","checksum-test-extension.ts","checksum-playwright-runtime.js","code-mirror.ts","utils.ts","fallback/esra-fallback.ts","fallback/force-fallback.ts","fallback/llm-fallback.ts"].map(B=>(0,C6.join)(__dirname,B)),y={},m=n(B=>{var z,p,v;return y[B.stepId]!==void 0?y[B.stepId]:B.location&&!a.includes(B.location.file)?!1:!!(B.stepId.includes(".evaluate@")||B.stepId.includes(".addScriptTag@")||(z=B.title)!=null&&z.includes("evaluate")||(p=B.title)!=null&&p.includes("addScriptTag")||(v=B.title)!=null&&v.includes("waitForLoadState")||B.category==="fixture")},"shouldFilterStep"),M=this.testInfo._onStepBegin;this.testInfo._onStepBegin=B=>{if(!this.phase&&m(B)){y[B.stepId]=!0;return}return y[B.stepId]=!1,this.phase==="initial"&&(this.initialLocatorTitle=B.title,B.location=this.pageInitialCallInTestFile),B.title.startsWith("proxy.")&&(B.title=B.title.replace("proxy.","page.")),this.phase&&this.phase!=="initial"&&(this.phaseMap[B.stepId]={phase:this.phase,payload:this.phasePayload,initialLocatorTitle:this.initialLocatorTitle},B.location=void 0,B.title=this.getMessage(this.phase,{initialSelector:this.initialLocatorTitle,...this.phasePayload})),this.phase=void 0,this.phasePayload=void 0,M(B)};let h=this.testInfo._onStepEnd;this.testInfo._onStepEnd=B=>{if(!y[B.stepId]){if(this.phaseMap[B.stepId]){let{phase:ne,initialLocatorTitle:z,payload:p}=this.phaseMap[B.stepId];ne==="fail"&&(B.error={message:`Failed to resolve ${z}`,stack:""})}return h(B)}}}getFirstStackTraceFromTestFile(){let a=this.getTestFileStackTrace()[0];if(!a)throw new Error(`Could not find test file location from stack trace ${$p.getStackTrace()}`);let m=[/\((.*):(\d+):(\d+)\)$/,/.*at (.*):(\d+):(\d+)$/].map(ne=>ne.exec(a)).find(ne=>ne!==null);if(!m)throw new Error(`Could not find test file location from stack trace ${a}`);let[,M,h,B]=m;return{file:M,line:parseInt(h),column:parseInt(B)}}getTestFileStackTrace(){return $p.getStackTrace().filter(y=>y.includes(this.testInfo.file))}isCalledDirectlyFromTestFunction(){let a=this.getTestFileStackTrace();if(a.length!==1+this.checksumStepStack.length)return!1;let y=a[0],m=/.*at (.*):(\d+):(\d+)$/;return this.checksumStepStack.length===0&&!m.exec(y)?!1:!this.isCalledThroughMethodInAnotherFile(y)}isCalledThroughMethodInAnotherFile(a){let y=$p.getStackTrace(),m=["node:internal","/node_modules/@playwright"],M=y.indexOf(a)-1;for(;M>=0&&m.some(B=>y[M].includes(B));)M--;let h=y[M];return!h.includes("checksum-page.ts")&&!h.includes(oF)}static getStackTrace(){return new Error().stack.split(`
269
+ `)}})},L.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},L.prototype.discoverTypings=function(_){var b=this,x=e.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var E=JSON.parse(_);return b.safeList===void 0&&(b.safeList=e.JsTyping.loadSafeList(b.host,e.toPath(E.safeListPath,E.safeListPath,x))),e.JsTyping.discoverTypings(b.host,function(P){return b.logger.log(P)},E.fileNames,e.toPath(E.projectRootPath,E.projectRootPath,x),b.safeList,E.packageNameToTypingLocation,E.typeAcquisition,E.unresolvedImports,E.typesRegistry,e.emptyOptions)})},L}(z),ue=function(){function O(){this._shims=[]}return n(O,"TypeScriptServicesFactory"),O.prototype.getServicesVersion=function(){return e.servicesVersion},O.prototype.createLanguageServiceShim=function(L){try{this.documentRegistry===void 0&&(this.documentRegistry=e.createDocumentRegistry(L.useCaseSensitiveFileNames&&L.useCaseSensitiveFileNames(),L.getCurrentDirectory()));var _=new m(L),b=e.createLanguageService(_,this.documentRegistry,!1);return new fe(this,L,b)}catch(x){throw a(L,x),x}},O.prototype.createClassifierShim=function(L){try{return new se(this,L)}catch(_){throw a(L,_),_}},O.prototype.createCoreServicesShim=function(L){try{var _=new M(L);return new ce(this,L,_)}catch(b){throw a(L,b),b}},O.prototype.close=function(){e.clear(this._shims),this.documentRegistry=void 0},O.prototype.registerShim=function(L){this._shims.push(L)},O.prototype.unregisterShim=function(L){for(var _=0;_<this._shims.length;_++)if(this._shims[_]===L){delete this._shims[_];return}throw new Error("Invalid operation")},O}();e.TypeScriptServicesFactory=ue})(_r||(_r={}));(function(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,typeof globalThis>"u"&&(window.globalThis=window),delete Object.prototype.__magic__}catch{window.globalThis=window}})();(typeof process>"u"||process.browser)&&(globalThis.TypeScript=globalThis.TypeScript||{},globalThis.TypeScript.Services=globalThis.TypeScript.Services||{},globalThis.TypeScript.Services.TypeScriptServicesFactory=_r.TypeScriptServicesFactory,globalThis.toolsVersion=_r.versionMajorMinor);typeof Ah<"u"&&Ah.exports&&(Ah.exports=_r);var _r;(function(e){function a(M,h,B,ne){if(Object.defineProperty(se,"name",Ri(Ri({},Object.getOwnPropertyDescriptor(se,"name")),{value:M})),ne)for(var z=0,p=Object.keys(ne);z<p.length;z++){var v=p[z],fe=+v;!isNaN(fe)&&e.hasProperty(h,"".concat(fe))&&(h[fe]=e.Debug.deprecate(h[fe],Ri(Ri({},ne[fe]),{name:M})))}var le=y(h,B);return se;function se(){for(var ce=[],ue=0;ue<arguments.length;ue++)ce[ue]=arguments[ue];var O=le(ce),L=O!==void 0?h[O]:void 0;if(typeof L=="function")return L.apply(void 0,ce);throw new TypeError("Invalid arguments")}}n(a,"createOverload"),e.createOverload=a;function y(M,h){return function(B){for(var ne=0;e.hasProperty(M,"".concat(ne))&&e.hasProperty(h,"".concat(ne));ne++){var z=h[ne];if(z(B))return ne}}}n(y,"createBinder");function m(M){return{overload:function(h){return{bind:function(B){return{finish:function(){return a(M,h,B)},deprecate:function(ne){return{finish:function(){return a(M,h,B,ne)}}}}}}}}}n(m,"buildOverload"),e.buildOverload=m})(_r||(_r={}));var _r;(function(e){var a={since:"4.0",warnAfter:"4.1",message:"Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead."};e.createNodeArray=e.Debug.deprecate(e.factory.createNodeArray,a),e.createNumericLiteral=e.Debug.deprecate(e.factory.createNumericLiteral,a),e.createBigIntLiteral=e.Debug.deprecate(e.factory.createBigIntLiteral,a),e.createStringLiteral=e.Debug.deprecate(e.factory.createStringLiteral,a),e.createStringLiteralFromNode=e.Debug.deprecate(e.factory.createStringLiteralFromNode,a),e.createRegularExpressionLiteral=e.Debug.deprecate(e.factory.createRegularExpressionLiteral,a),e.createLoopVariable=e.Debug.deprecate(e.factory.createLoopVariable,a),e.createUniqueName=e.Debug.deprecate(e.factory.createUniqueName,a),e.createPrivateIdentifier=e.Debug.deprecate(e.factory.createPrivateIdentifier,a),e.createSuper=e.Debug.deprecate(e.factory.createSuper,a),e.createThis=e.Debug.deprecate(e.factory.createThis,a),e.createNull=e.Debug.deprecate(e.factory.createNull,a),e.createTrue=e.Debug.deprecate(e.factory.createTrue,a),e.createFalse=e.Debug.deprecate(e.factory.createFalse,a),e.createModifier=e.Debug.deprecate(e.factory.createModifier,a),e.createModifiersFromModifierFlags=e.Debug.deprecate(e.factory.createModifiersFromModifierFlags,a),e.createQualifiedName=e.Debug.deprecate(e.factory.createQualifiedName,a),e.updateQualifiedName=e.Debug.deprecate(e.factory.updateQualifiedName,a),e.createComputedPropertyName=e.Debug.deprecate(e.factory.createComputedPropertyName,a),e.updateComputedPropertyName=e.Debug.deprecate(e.factory.updateComputedPropertyName,a),e.createTypeParameterDeclaration=e.Debug.deprecate(e.factory.createTypeParameterDeclaration,a),e.updateTypeParameterDeclaration=e.Debug.deprecate(e.factory.updateTypeParameterDeclaration,a),e.createParameter=e.Debug.deprecate(e.factory.createParameterDeclaration,a),e.updateParameter=e.Debug.deprecate(e.factory.updateParameterDeclaration,a),e.createDecorator=e.Debug.deprecate(e.factory.createDecorator,a),e.updateDecorator=e.Debug.deprecate(e.factory.updateDecorator,a),e.createProperty=e.Debug.deprecate(e.factory.createPropertyDeclaration,a),e.updateProperty=e.Debug.deprecate(e.factory.updatePropertyDeclaration,a),e.createMethod=e.Debug.deprecate(e.factory.createMethodDeclaration,a),e.updateMethod=e.Debug.deprecate(e.factory.updateMethodDeclaration,a),e.createConstructor=e.Debug.deprecate(e.factory.createConstructorDeclaration,a),e.updateConstructor=e.Debug.deprecate(e.factory.updateConstructorDeclaration,a),e.createGetAccessor=e.Debug.deprecate(e.factory.createGetAccessorDeclaration,a),e.updateGetAccessor=e.Debug.deprecate(e.factory.updateGetAccessorDeclaration,a),e.createSetAccessor=e.Debug.deprecate(e.factory.createSetAccessorDeclaration,a),e.updateSetAccessor=e.Debug.deprecate(e.factory.updateSetAccessorDeclaration,a),e.createCallSignature=e.Debug.deprecate(e.factory.createCallSignature,a),e.updateCallSignature=e.Debug.deprecate(e.factory.updateCallSignature,a),e.createConstructSignature=e.Debug.deprecate(e.factory.createConstructSignature,a),e.updateConstructSignature=e.Debug.deprecate(e.factory.updateConstructSignature,a),e.updateIndexSignature=e.Debug.deprecate(e.factory.updateIndexSignature,a),e.createKeywordTypeNode=e.Debug.deprecate(e.factory.createKeywordTypeNode,a),e.createTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.createTypePredicateNode,a),e.updateTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.updateTypePredicateNode,a),e.createTypeReferenceNode=e.Debug.deprecate(e.factory.createTypeReferenceNode,a),e.updateTypeReferenceNode=e.Debug.deprecate(e.factory.updateTypeReferenceNode,a),e.createFunctionTypeNode=e.Debug.deprecate(e.factory.createFunctionTypeNode,a),e.updateFunctionTypeNode=e.Debug.deprecate(e.factory.updateFunctionTypeNode,a),e.createConstructorTypeNode=e.Debug.deprecate(function(y,m,M){return e.factory.createConstructorTypeNode(void 0,y,m,M)},a),e.updateConstructorTypeNode=e.Debug.deprecate(function(y,m,M,h){return e.factory.updateConstructorTypeNode(y,y.modifiers,m,M,h)},a),e.createTypeQueryNode=e.Debug.deprecate(e.factory.createTypeQueryNode,a),e.updateTypeQueryNode=e.Debug.deprecate(e.factory.updateTypeQueryNode,a),e.createTypeLiteralNode=e.Debug.deprecate(e.factory.createTypeLiteralNode,a),e.updateTypeLiteralNode=e.Debug.deprecate(e.factory.updateTypeLiteralNode,a),e.createArrayTypeNode=e.Debug.deprecate(e.factory.createArrayTypeNode,a),e.updateArrayTypeNode=e.Debug.deprecate(e.factory.updateArrayTypeNode,a),e.createTupleTypeNode=e.Debug.deprecate(e.factory.createTupleTypeNode,a),e.updateTupleTypeNode=e.Debug.deprecate(e.factory.updateTupleTypeNode,a),e.createOptionalTypeNode=e.Debug.deprecate(e.factory.createOptionalTypeNode,a),e.updateOptionalTypeNode=e.Debug.deprecate(e.factory.updateOptionalTypeNode,a),e.createRestTypeNode=e.Debug.deprecate(e.factory.createRestTypeNode,a),e.updateRestTypeNode=e.Debug.deprecate(e.factory.updateRestTypeNode,a),e.createUnionTypeNode=e.Debug.deprecate(e.factory.createUnionTypeNode,a),e.updateUnionTypeNode=e.Debug.deprecate(e.factory.updateUnionTypeNode,a),e.createIntersectionTypeNode=e.Debug.deprecate(e.factory.createIntersectionTypeNode,a),e.updateIntersectionTypeNode=e.Debug.deprecate(e.factory.updateIntersectionTypeNode,a),e.createConditionalTypeNode=e.Debug.deprecate(e.factory.createConditionalTypeNode,a),e.updateConditionalTypeNode=e.Debug.deprecate(e.factory.updateConditionalTypeNode,a),e.createInferTypeNode=e.Debug.deprecate(e.factory.createInferTypeNode,a),e.updateInferTypeNode=e.Debug.deprecate(e.factory.updateInferTypeNode,a),e.createImportTypeNode=e.Debug.deprecate(e.factory.createImportTypeNode,a),e.updateImportTypeNode=e.Debug.deprecate(e.factory.updateImportTypeNode,a),e.createParenthesizedType=e.Debug.deprecate(e.factory.createParenthesizedType,a),e.updateParenthesizedType=e.Debug.deprecate(e.factory.updateParenthesizedType,a),e.createThisTypeNode=e.Debug.deprecate(e.factory.createThisTypeNode,a),e.updateTypeOperatorNode=e.Debug.deprecate(e.factory.updateTypeOperatorNode,a),e.createIndexedAccessTypeNode=e.Debug.deprecate(e.factory.createIndexedAccessTypeNode,a),e.updateIndexedAccessTypeNode=e.Debug.deprecate(e.factory.updateIndexedAccessTypeNode,a),e.createMappedTypeNode=e.Debug.deprecate(e.factory.createMappedTypeNode,a),e.updateMappedTypeNode=e.Debug.deprecate(e.factory.updateMappedTypeNode,a),e.createLiteralTypeNode=e.Debug.deprecate(e.factory.createLiteralTypeNode,a),e.updateLiteralTypeNode=e.Debug.deprecate(e.factory.updateLiteralTypeNode,a),e.createObjectBindingPattern=e.Debug.deprecate(e.factory.createObjectBindingPattern,a),e.updateObjectBindingPattern=e.Debug.deprecate(e.factory.updateObjectBindingPattern,a),e.createArrayBindingPattern=e.Debug.deprecate(e.factory.createArrayBindingPattern,a),e.updateArrayBindingPattern=e.Debug.deprecate(e.factory.updateArrayBindingPattern,a),e.createBindingElement=e.Debug.deprecate(e.factory.createBindingElement,a),e.updateBindingElement=e.Debug.deprecate(e.factory.updateBindingElement,a),e.createArrayLiteral=e.Debug.deprecate(e.factory.createArrayLiteralExpression,a),e.updateArrayLiteral=e.Debug.deprecate(e.factory.updateArrayLiteralExpression,a),e.createObjectLiteral=e.Debug.deprecate(e.factory.createObjectLiteralExpression,a),e.updateObjectLiteral=e.Debug.deprecate(e.factory.updateObjectLiteralExpression,a),e.createPropertyAccess=e.Debug.deprecate(e.factory.createPropertyAccessExpression,a),e.updatePropertyAccess=e.Debug.deprecate(e.factory.updatePropertyAccessExpression,a),e.createPropertyAccessChain=e.Debug.deprecate(e.factory.createPropertyAccessChain,a),e.updatePropertyAccessChain=e.Debug.deprecate(e.factory.updatePropertyAccessChain,a),e.createElementAccess=e.Debug.deprecate(e.factory.createElementAccessExpression,a),e.updateElementAccess=e.Debug.deprecate(e.factory.updateElementAccessExpression,a),e.createElementAccessChain=e.Debug.deprecate(e.factory.createElementAccessChain,a),e.updateElementAccessChain=e.Debug.deprecate(e.factory.updateElementAccessChain,a),e.createCall=e.Debug.deprecate(e.factory.createCallExpression,a),e.updateCall=e.Debug.deprecate(e.factory.updateCallExpression,a),e.createCallChain=e.Debug.deprecate(e.factory.createCallChain,a),e.updateCallChain=e.Debug.deprecate(e.factory.updateCallChain,a),e.createNew=e.Debug.deprecate(e.factory.createNewExpression,a),e.updateNew=e.Debug.deprecate(e.factory.updateNewExpression,a),e.createTypeAssertion=e.Debug.deprecate(e.factory.createTypeAssertion,a),e.updateTypeAssertion=e.Debug.deprecate(e.factory.updateTypeAssertion,a),e.createParen=e.Debug.deprecate(e.factory.createParenthesizedExpression,a),e.updateParen=e.Debug.deprecate(e.factory.updateParenthesizedExpression,a),e.createFunctionExpression=e.Debug.deprecate(e.factory.createFunctionExpression,a),e.updateFunctionExpression=e.Debug.deprecate(e.factory.updateFunctionExpression,a),e.createDelete=e.Debug.deprecate(e.factory.createDeleteExpression,a),e.updateDelete=e.Debug.deprecate(e.factory.updateDeleteExpression,a),e.createTypeOf=e.Debug.deprecate(e.factory.createTypeOfExpression,a),e.updateTypeOf=e.Debug.deprecate(e.factory.updateTypeOfExpression,a),e.createVoid=e.Debug.deprecate(e.factory.createVoidExpression,a),e.updateVoid=e.Debug.deprecate(e.factory.updateVoidExpression,a),e.createAwait=e.Debug.deprecate(e.factory.createAwaitExpression,a),e.updateAwait=e.Debug.deprecate(e.factory.updateAwaitExpression,a),e.createPrefix=e.Debug.deprecate(e.factory.createPrefixUnaryExpression,a),e.updatePrefix=e.Debug.deprecate(e.factory.updatePrefixUnaryExpression,a),e.createPostfix=e.Debug.deprecate(e.factory.createPostfixUnaryExpression,a),e.updatePostfix=e.Debug.deprecate(e.factory.updatePostfixUnaryExpression,a),e.createBinary=e.Debug.deprecate(e.factory.createBinaryExpression,a),e.updateConditional=e.Debug.deprecate(e.factory.updateConditionalExpression,a),e.createTemplateExpression=e.Debug.deprecate(e.factory.createTemplateExpression,a),e.updateTemplateExpression=e.Debug.deprecate(e.factory.updateTemplateExpression,a),e.createTemplateHead=e.Debug.deprecate(e.factory.createTemplateHead,a),e.createTemplateMiddle=e.Debug.deprecate(e.factory.createTemplateMiddle,a),e.createTemplateTail=e.Debug.deprecate(e.factory.createTemplateTail,a),e.createNoSubstitutionTemplateLiteral=e.Debug.deprecate(e.factory.createNoSubstitutionTemplateLiteral,a),e.updateYield=e.Debug.deprecate(e.factory.updateYieldExpression,a),e.createSpread=e.Debug.deprecate(e.factory.createSpreadElement,a),e.updateSpread=e.Debug.deprecate(e.factory.updateSpreadElement,a),e.createOmittedExpression=e.Debug.deprecate(e.factory.createOmittedExpression,a),e.createAsExpression=e.Debug.deprecate(e.factory.createAsExpression,a),e.updateAsExpression=e.Debug.deprecate(e.factory.updateAsExpression,a),e.createNonNullExpression=e.Debug.deprecate(e.factory.createNonNullExpression,a),e.updateNonNullExpression=e.Debug.deprecate(e.factory.updateNonNullExpression,a),e.createNonNullChain=e.Debug.deprecate(e.factory.createNonNullChain,a),e.updateNonNullChain=e.Debug.deprecate(e.factory.updateNonNullChain,a),e.createMetaProperty=e.Debug.deprecate(e.factory.createMetaProperty,a),e.updateMetaProperty=e.Debug.deprecate(e.factory.updateMetaProperty,a),e.createTemplateSpan=e.Debug.deprecate(e.factory.createTemplateSpan,a),e.updateTemplateSpan=e.Debug.deprecate(e.factory.updateTemplateSpan,a),e.createSemicolonClassElement=e.Debug.deprecate(e.factory.createSemicolonClassElement,a),e.createBlock=e.Debug.deprecate(e.factory.createBlock,a),e.updateBlock=e.Debug.deprecate(e.factory.updateBlock,a),e.createVariableStatement=e.Debug.deprecate(e.factory.createVariableStatement,a),e.updateVariableStatement=e.Debug.deprecate(e.factory.updateVariableStatement,a),e.createEmptyStatement=e.Debug.deprecate(e.factory.createEmptyStatement,a),e.createExpressionStatement=e.Debug.deprecate(e.factory.createExpressionStatement,a),e.updateExpressionStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,a),e.createStatement=e.Debug.deprecate(e.factory.createExpressionStatement,a),e.updateStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,a),e.createIf=e.Debug.deprecate(e.factory.createIfStatement,a),e.updateIf=e.Debug.deprecate(e.factory.updateIfStatement,a),e.createDo=e.Debug.deprecate(e.factory.createDoStatement,a),e.updateDo=e.Debug.deprecate(e.factory.updateDoStatement,a),e.createWhile=e.Debug.deprecate(e.factory.createWhileStatement,a),e.updateWhile=e.Debug.deprecate(e.factory.updateWhileStatement,a),e.createFor=e.Debug.deprecate(e.factory.createForStatement,a),e.updateFor=e.Debug.deprecate(e.factory.updateForStatement,a),e.createForIn=e.Debug.deprecate(e.factory.createForInStatement,a),e.updateForIn=e.Debug.deprecate(e.factory.updateForInStatement,a),e.createForOf=e.Debug.deprecate(e.factory.createForOfStatement,a),e.updateForOf=e.Debug.deprecate(e.factory.updateForOfStatement,a),e.createContinue=e.Debug.deprecate(e.factory.createContinueStatement,a),e.updateContinue=e.Debug.deprecate(e.factory.updateContinueStatement,a),e.createBreak=e.Debug.deprecate(e.factory.createBreakStatement,a),e.updateBreak=e.Debug.deprecate(e.factory.updateBreakStatement,a),e.createReturn=e.Debug.deprecate(e.factory.createReturnStatement,a),e.updateReturn=e.Debug.deprecate(e.factory.updateReturnStatement,a),e.createWith=e.Debug.deprecate(e.factory.createWithStatement,a),e.updateWith=e.Debug.deprecate(e.factory.updateWithStatement,a),e.createSwitch=e.Debug.deprecate(e.factory.createSwitchStatement,a),e.updateSwitch=e.Debug.deprecate(e.factory.updateSwitchStatement,a),e.createLabel=e.Debug.deprecate(e.factory.createLabeledStatement,a),e.updateLabel=e.Debug.deprecate(e.factory.updateLabeledStatement,a),e.createThrow=e.Debug.deprecate(e.factory.createThrowStatement,a),e.updateThrow=e.Debug.deprecate(e.factory.updateThrowStatement,a),e.createTry=e.Debug.deprecate(e.factory.createTryStatement,a),e.updateTry=e.Debug.deprecate(e.factory.updateTryStatement,a),e.createDebuggerStatement=e.Debug.deprecate(e.factory.createDebuggerStatement,a),e.createVariableDeclarationList=e.Debug.deprecate(e.factory.createVariableDeclarationList,a),e.updateVariableDeclarationList=e.Debug.deprecate(e.factory.updateVariableDeclarationList,a),e.createFunctionDeclaration=e.Debug.deprecate(e.factory.createFunctionDeclaration,a),e.updateFunctionDeclaration=e.Debug.deprecate(e.factory.updateFunctionDeclaration,a),e.createClassDeclaration=e.Debug.deprecate(e.factory.createClassDeclaration,a),e.updateClassDeclaration=e.Debug.deprecate(e.factory.updateClassDeclaration,a),e.createInterfaceDeclaration=e.Debug.deprecate(e.factory.createInterfaceDeclaration,a),e.updateInterfaceDeclaration=e.Debug.deprecate(e.factory.updateInterfaceDeclaration,a),e.createTypeAliasDeclaration=e.Debug.deprecate(e.factory.createTypeAliasDeclaration,a),e.updateTypeAliasDeclaration=e.Debug.deprecate(e.factory.updateTypeAliasDeclaration,a),e.createEnumDeclaration=e.Debug.deprecate(e.factory.createEnumDeclaration,a),e.updateEnumDeclaration=e.Debug.deprecate(e.factory.updateEnumDeclaration,a),e.createModuleDeclaration=e.Debug.deprecate(e.factory.createModuleDeclaration,a),e.updateModuleDeclaration=e.Debug.deprecate(e.factory.updateModuleDeclaration,a),e.createModuleBlock=e.Debug.deprecate(e.factory.createModuleBlock,a),e.updateModuleBlock=e.Debug.deprecate(e.factory.updateModuleBlock,a),e.createCaseBlock=e.Debug.deprecate(e.factory.createCaseBlock,a),e.updateCaseBlock=e.Debug.deprecate(e.factory.updateCaseBlock,a),e.createNamespaceExportDeclaration=e.Debug.deprecate(e.factory.createNamespaceExportDeclaration,a),e.updateNamespaceExportDeclaration=e.Debug.deprecate(e.factory.updateNamespaceExportDeclaration,a),e.createImportEqualsDeclaration=e.Debug.deprecate(e.factory.createImportEqualsDeclaration,a),e.updateImportEqualsDeclaration=e.Debug.deprecate(e.factory.updateImportEqualsDeclaration,a),e.createImportDeclaration=e.Debug.deprecate(e.factory.createImportDeclaration,a),e.updateImportDeclaration=e.Debug.deprecate(e.factory.updateImportDeclaration,a),e.createNamespaceImport=e.Debug.deprecate(e.factory.createNamespaceImport,a),e.updateNamespaceImport=e.Debug.deprecate(e.factory.updateNamespaceImport,a),e.createNamedImports=e.Debug.deprecate(e.factory.createNamedImports,a),e.updateNamedImports=e.Debug.deprecate(e.factory.updateNamedImports,a),e.createImportSpecifier=e.Debug.deprecate(e.factory.createImportSpecifier,a),e.updateImportSpecifier=e.Debug.deprecate(e.factory.updateImportSpecifier,a),e.createExportAssignment=e.Debug.deprecate(e.factory.createExportAssignment,a),e.updateExportAssignment=e.Debug.deprecate(e.factory.updateExportAssignment,a),e.createNamedExports=e.Debug.deprecate(e.factory.createNamedExports,a),e.updateNamedExports=e.Debug.deprecate(e.factory.updateNamedExports,a),e.createExportSpecifier=e.Debug.deprecate(e.factory.createExportSpecifier,a),e.updateExportSpecifier=e.Debug.deprecate(e.factory.updateExportSpecifier,a),e.createExternalModuleReference=e.Debug.deprecate(e.factory.createExternalModuleReference,a),e.updateExternalModuleReference=e.Debug.deprecate(e.factory.updateExternalModuleReference,a),e.createJSDocTypeExpression=e.Debug.deprecate(e.factory.createJSDocTypeExpression,a),e.createJSDocTypeTag=e.Debug.deprecate(e.factory.createJSDocTypeTag,a),e.createJSDocReturnTag=e.Debug.deprecate(e.factory.createJSDocReturnTag,a),e.createJSDocThisTag=e.Debug.deprecate(e.factory.createJSDocThisTag,a),e.createJSDocComment=e.Debug.deprecate(e.factory.createJSDocComment,a),e.createJSDocParameterTag=e.Debug.deprecate(e.factory.createJSDocParameterTag,a),e.createJSDocClassTag=e.Debug.deprecate(e.factory.createJSDocClassTag,a),e.createJSDocAugmentsTag=e.Debug.deprecate(e.factory.createJSDocAugmentsTag,a),e.createJSDocEnumTag=e.Debug.deprecate(e.factory.createJSDocEnumTag,a),e.createJSDocTemplateTag=e.Debug.deprecate(e.factory.createJSDocTemplateTag,a),e.createJSDocTypedefTag=e.Debug.deprecate(e.factory.createJSDocTypedefTag,a),e.createJSDocCallbackTag=e.Debug.deprecate(e.factory.createJSDocCallbackTag,a),e.createJSDocSignature=e.Debug.deprecate(e.factory.createJSDocSignature,a),e.createJSDocPropertyTag=e.Debug.deprecate(e.factory.createJSDocPropertyTag,a),e.createJSDocTypeLiteral=e.Debug.deprecate(e.factory.createJSDocTypeLiteral,a),e.createJSDocImplementsTag=e.Debug.deprecate(e.factory.createJSDocImplementsTag,a),e.createJSDocAuthorTag=e.Debug.deprecate(e.factory.createJSDocAuthorTag,a),e.createJSDocPublicTag=e.Debug.deprecate(e.factory.createJSDocPublicTag,a),e.createJSDocPrivateTag=e.Debug.deprecate(e.factory.createJSDocPrivateTag,a),e.createJSDocProtectedTag=e.Debug.deprecate(e.factory.createJSDocProtectedTag,a),e.createJSDocReadonlyTag=e.Debug.deprecate(e.factory.createJSDocReadonlyTag,a),e.createJSDocTag=e.Debug.deprecate(e.factory.createJSDocUnknownTag,a),e.createJsxElement=e.Debug.deprecate(e.factory.createJsxElement,a),e.updateJsxElement=e.Debug.deprecate(e.factory.updateJsxElement,a),e.createJsxSelfClosingElement=e.Debug.deprecate(e.factory.createJsxSelfClosingElement,a),e.updateJsxSelfClosingElement=e.Debug.deprecate(e.factory.updateJsxSelfClosingElement,a),e.createJsxOpeningElement=e.Debug.deprecate(e.factory.createJsxOpeningElement,a),e.updateJsxOpeningElement=e.Debug.deprecate(e.factory.updateJsxOpeningElement,a),e.createJsxClosingElement=e.Debug.deprecate(e.factory.createJsxClosingElement,a),e.updateJsxClosingElement=e.Debug.deprecate(e.factory.updateJsxClosingElement,a),e.createJsxFragment=e.Debug.deprecate(e.factory.createJsxFragment,a),e.createJsxText=e.Debug.deprecate(e.factory.createJsxText,a),e.updateJsxText=e.Debug.deprecate(e.factory.updateJsxText,a),e.createJsxOpeningFragment=e.Debug.deprecate(e.factory.createJsxOpeningFragment,a),e.createJsxJsxClosingFragment=e.Debug.deprecate(e.factory.createJsxJsxClosingFragment,a),e.updateJsxFragment=e.Debug.deprecate(e.factory.updateJsxFragment,a),e.createJsxAttribute=e.Debug.deprecate(e.factory.createJsxAttribute,a),e.updateJsxAttribute=e.Debug.deprecate(e.factory.updateJsxAttribute,a),e.createJsxAttributes=e.Debug.deprecate(e.factory.createJsxAttributes,a),e.updateJsxAttributes=e.Debug.deprecate(e.factory.updateJsxAttributes,a),e.createJsxSpreadAttribute=e.Debug.deprecate(e.factory.createJsxSpreadAttribute,a),e.updateJsxSpreadAttribute=e.Debug.deprecate(e.factory.updateJsxSpreadAttribute,a),e.createJsxExpression=e.Debug.deprecate(e.factory.createJsxExpression,a),e.updateJsxExpression=e.Debug.deprecate(e.factory.updateJsxExpression,a),e.createCaseClause=e.Debug.deprecate(e.factory.createCaseClause,a),e.updateCaseClause=e.Debug.deprecate(e.factory.updateCaseClause,a),e.createDefaultClause=e.Debug.deprecate(e.factory.createDefaultClause,a),e.updateDefaultClause=e.Debug.deprecate(e.factory.updateDefaultClause,a),e.createHeritageClause=e.Debug.deprecate(e.factory.createHeritageClause,a),e.updateHeritageClause=e.Debug.deprecate(e.factory.updateHeritageClause,a),e.createCatchClause=e.Debug.deprecate(e.factory.createCatchClause,a),e.updateCatchClause=e.Debug.deprecate(e.factory.updateCatchClause,a),e.createPropertyAssignment=e.Debug.deprecate(e.factory.createPropertyAssignment,a),e.updatePropertyAssignment=e.Debug.deprecate(e.factory.updatePropertyAssignment,a),e.createShorthandPropertyAssignment=e.Debug.deprecate(e.factory.createShorthandPropertyAssignment,a),e.updateShorthandPropertyAssignment=e.Debug.deprecate(e.factory.updateShorthandPropertyAssignment,a),e.createSpreadAssignment=e.Debug.deprecate(e.factory.createSpreadAssignment,a),e.updateSpreadAssignment=e.Debug.deprecate(e.factory.updateSpreadAssignment,a),e.createEnumMember=e.Debug.deprecate(e.factory.createEnumMember,a),e.updateEnumMember=e.Debug.deprecate(e.factory.updateEnumMember,a),e.updateSourceFileNode=e.Debug.deprecate(e.factory.updateSourceFile,a),e.createNotEmittedStatement=e.Debug.deprecate(e.factory.createNotEmittedStatement,a),e.createPartiallyEmittedExpression=e.Debug.deprecate(e.factory.createPartiallyEmittedExpression,a),e.updatePartiallyEmittedExpression=e.Debug.deprecate(e.factory.updatePartiallyEmittedExpression,a),e.createCommaList=e.Debug.deprecate(e.factory.createCommaListExpression,a),e.updateCommaList=e.Debug.deprecate(e.factory.updateCommaListExpression,a),e.createBundle=e.Debug.deprecate(e.factory.createBundle,a),e.updateBundle=e.Debug.deprecate(e.factory.updateBundle,a),e.createImmediatelyInvokedFunctionExpression=e.Debug.deprecate(e.factory.createImmediatelyInvokedFunctionExpression,a),e.createImmediatelyInvokedArrowFunction=e.Debug.deprecate(e.factory.createImmediatelyInvokedArrowFunction,a),e.createVoidZero=e.Debug.deprecate(e.factory.createVoidZero,a),e.createExportDefault=e.Debug.deprecate(e.factory.createExportDefault,a),e.createExternalModuleExport=e.Debug.deprecate(e.factory.createExternalModuleExport,a),e.createNamespaceExport=e.Debug.deprecate(e.factory.createNamespaceExport,a),e.updateNamespaceExport=e.Debug.deprecate(e.factory.updateNamespaceExport,a),e.createToken=e.Debug.deprecate(n(function(m){return e.factory.createToken(m)},"createToken"),a),e.createIdentifier=e.Debug.deprecate(n(function(m){return e.factory.createIdentifier(m,void 0,void 0)},"createIdentifier"),a),e.createTempVariable=e.Debug.deprecate(n(function(m){return e.factory.createTempVariable(m,void 0)},"createTempVariable"),a),e.getGeneratedNameForNode=e.Debug.deprecate(n(function(m){return e.factory.getGeneratedNameForNode(m,void 0)},"getGeneratedNameForNode"),a),e.createOptimisticUniqueName=e.Debug.deprecate(n(function(m){return e.factory.createUniqueName(m,16)},"createOptimisticUniqueName"),a),e.createFileLevelUniqueName=e.Debug.deprecate(n(function(m){return e.factory.createUniqueName(m,48)},"createFileLevelUniqueName"),a),e.createIndexSignature=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.createIndexSignature(m,M,h,B)},"createIndexSignature"),a),e.createTypePredicateNode=e.Debug.deprecate(n(function(m,M){return e.factory.createTypePredicateNode(void 0,m,M)},"createTypePredicateNode"),a),e.updateTypePredicateNode=e.Debug.deprecate(n(function(m,M,h){return e.factory.updateTypePredicateNode(m,void 0,M,h)},"updateTypePredicateNode"),a),e.createLiteral=e.Debug.deprecate(n(function(m){return typeof m=="number"?e.factory.createNumericLiteral(m):typeof m=="object"&&"base10Value"in m?e.factory.createBigIntLiteral(m):typeof m=="boolean"?m?e.factory.createTrue():e.factory.createFalse():typeof m=="string"?e.factory.createStringLiteral(m,void 0):e.factory.createStringLiteralFromNode(m)},"createLiteral"),{since:"4.0",warnAfter:"4.1",message:"Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead."}),e.createMethodSignature=e.Debug.deprecate(n(function(m,M,h,B,ne){return e.factory.createMethodSignature(void 0,B,ne,m,M,h)},"createMethodSignature"),a),e.updateMethodSignature=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateMethodSignature(m,m.modifiers,ne,z,M,h,B)},"updateMethodSignature"),a),e.createTypeOperatorNode=e.Debug.deprecate(n(function(m,M){var h;return M?h=m:(M=m,h=141),e.factory.createTypeOperatorNode(h,M)},"createTypeOperatorNode"),a),e.createTaggedTemplate=e.Debug.deprecate(n(function(m,M,h){var B;return h?B=M:h=M,e.factory.createTaggedTemplateExpression(m,B,h)},"createTaggedTemplate"),a),e.updateTaggedTemplate=e.Debug.deprecate(n(function(m,M,h,B){var ne;return B?ne=h:B=h,e.factory.updateTaggedTemplateExpression(m,M,ne,B)},"updateTaggedTemplate"),a),e.updateBinary=e.Debug.deprecate(n(function(m,M,h,B){return B===void 0&&(B=m.operatorToken),typeof B=="number"&&(B=B===m.operatorToken.kind?m.operatorToken:e.factory.createToken(B)),e.factory.updateBinaryExpression(m,M,B,h)},"updateBinary"),a),e.createConditional=e.Debug.deprecate(n(function(m,M,h,B,ne){return arguments.length===5?e.factory.createConditionalExpression(m,M,h,B,ne):arguments.length===3?e.factory.createConditionalExpression(m,e.factory.createToken(57),M,e.factory.createToken(58),h):e.Debug.fail("Argument count mismatch")},"createConditional"),a),e.createYield=e.Debug.deprecate(n(function(m,M){var h;return M?h=m:M=m,e.factory.createYieldExpression(h,M)},"createYield"),a),e.createClassExpression=e.Debug.deprecate(n(function(m,M,h,B,ne){return e.factory.createClassExpression(void 0,m,M,h,B,ne)},"createClassExpression"),a),e.updateClassExpression=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateClassExpression(m,void 0,M,h,B,ne,z)},"updateClassExpression"),a),e.createPropertySignature=e.Debug.deprecate(n(function(m,M,h,B,ne){var z=e.factory.createPropertySignature(m,M,h,B);return z.initializer=ne,z},"createPropertySignature"),a),e.updatePropertySignature=e.Debug.deprecate(n(function(m,M,h,B,ne,z){var p=e.factory.updatePropertySignature(m,M,h,B,ne);return m.initializer!==z&&(p===m&&(p=e.factory.cloneNode(m)),p.initializer=z),p},"updatePropertySignature"),a),e.createExpressionWithTypeArguments=e.Debug.deprecate(n(function(m,M){return e.factory.createExpressionWithTypeArguments(M,m)},"createExpressionWithTypeArguments"),a),e.updateExpressionWithTypeArguments=e.Debug.deprecate(n(function(m,M,h){return e.factory.updateExpressionWithTypeArguments(m,h,M)},"updateExpressionWithTypeArguments"),a),e.createArrowFunction=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return arguments.length===6?e.factory.createArrowFunction(m,M,h,B,ne,z):arguments.length===5?e.factory.createArrowFunction(m,M,h,B,void 0,ne):e.Debug.fail("Argument count mismatch")},"createArrowFunction"),a),e.updateArrowFunction=e.Debug.deprecate(n(function(m,M,h,B,ne,z,p){return arguments.length===7?e.factory.updateArrowFunction(m,M,h,B,ne,z,p):arguments.length===6?e.factory.updateArrowFunction(m,M,h,B,ne,m.equalsGreaterThanToken,z):e.Debug.fail("Argument count mismatch")},"updateArrowFunction"),a),e.createVariableDeclaration=e.Debug.deprecate(n(function(m,M,h,B){return arguments.length===4?e.factory.createVariableDeclaration(m,M,h,B):arguments.length>=1&&arguments.length<=3?e.factory.createVariableDeclaration(m,void 0,M,h):e.Debug.fail("Argument count mismatch")},"createVariableDeclaration"),a),e.updateVariableDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne){return arguments.length===5?e.factory.updateVariableDeclaration(m,M,h,B,ne):arguments.length===4?e.factory.updateVariableDeclaration(m,M,m.exclamationToken,h,B):e.Debug.fail("Argument count mismatch")},"updateVariableDeclaration"),a),e.createImportClause=e.Debug.deprecate(n(function(m,M,h){return h===void 0&&(h=!1),e.factory.createImportClause(h,m,M)},"createImportClause"),a),e.updateImportClause=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.updateImportClause(m,B,M,h)},"updateImportClause"),a),e.createExportDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne){return ne===void 0&&(ne=!1),e.factory.createExportDeclaration(m,M,ne,h,B)},"createExportDeclaration"),a),e.updateExportDeclaration=e.Debug.deprecate(n(function(m,M,h,B,ne,z){return e.factory.updateExportDeclaration(m,M,h,z,B,ne,m.assertClause)},"updateExportDeclaration"),a),e.createJSDocParamTag=e.Debug.deprecate(n(function(m,M,h,B){return e.factory.createJSDocParameterTag(void 0,m,M,h,!1,B?e.factory.createNodeArray([e.factory.createJSDocText(B)]):void 0)},"createJSDocParamTag"),a),e.createComma=e.Debug.deprecate(n(function(m,M){return e.factory.createComma(m,M)},"createComma"),a),e.createLessThan=e.Debug.deprecate(n(function(m,M){return e.factory.createLessThan(m,M)},"createLessThan"),a),e.createAssignment=e.Debug.deprecate(n(function(m,M){return e.factory.createAssignment(m,M)},"createAssignment"),a),e.createStrictEquality=e.Debug.deprecate(n(function(m,M){return e.factory.createStrictEquality(m,M)},"createStrictEquality"),a),e.createStrictInequality=e.Debug.deprecate(n(function(m,M){return e.factory.createStrictInequality(m,M)},"createStrictInequality"),a),e.createAdd=e.Debug.deprecate(n(function(m,M){return e.factory.createAdd(m,M)},"createAdd"),a),e.createSubtract=e.Debug.deprecate(n(function(m,M){return e.factory.createSubtract(m,M)},"createSubtract"),a),e.createLogicalAnd=e.Debug.deprecate(n(function(m,M){return e.factory.createLogicalAnd(m,M)},"createLogicalAnd"),a),e.createLogicalOr=e.Debug.deprecate(n(function(m,M){return e.factory.createLogicalOr(m,M)},"createLogicalOr"),a),e.createPostfixIncrement=e.Debug.deprecate(n(function(m){return e.factory.createPostfixIncrement(m)},"createPostfixIncrement"),a),e.createLogicalNot=e.Debug.deprecate(n(function(m){return e.factory.createLogicalNot(m)},"createLogicalNot"),a),e.createNode=e.Debug.deprecate(n(function(m,M,h){return M===void 0&&(M=0),h===void 0&&(h=0),e.setTextRangePosEnd(m===308?e.parseBaseNodeFactory.createBaseSourceFileNode(m):m===79?e.parseBaseNodeFactory.createBaseIdentifierNode(m):m===80?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(m):e.isNodeKind(m)?e.parseBaseNodeFactory.createBaseNode(m):e.parseBaseNodeFactory.createBaseTokenNode(m),M,h)},"createNode"),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate(n(function(m){var M=e.factory.cloneNode(m);return e.setTextRange(M,m),e.setParent(M,m.parent),M},"getMutableClone"),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`."})})(_r||(_r={}));var _r;(function(e){e.isTypeAssertion=e.Debug.deprecate(n(function(y){return y.kind===213},"isTypeAssertion"),{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})})(_r||(_r={}));var _r;(function(e){e.isIdentifierOrPrivateIdentifier=e.Debug.deprecate(n(function(y){return e.isMemberName(y)},"isIdentifierOrPrivateIdentifier"),{since:"4.2",warnAfter:"4.3",message:"Use `isMemberName` instead."})})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createConstructorTypeNode,h=m.updateConstructorTypeNode;m.createConstructorTypeNode=e.buildOverload("createConstructorTypeNode").overload({0:function(B,ne,z,p){return M(B,ne,z,p)},1:function(B,ne,z){return M(void 0,B,ne,z)}}).bind({0:function(B){return B.length===4},1:function(B){return B.length===3}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish(),m.updateConstructorTypeNode=e.buildOverload("updateConstructorTypeNode").overload({0:function(B,ne,z,p,v){return h(B,ne,z,p,v)},1:function(B,ne,z,p){return h(B,B.modifiers,ne,z,p)}}).bind({0:function(B){return B.length===5},1:function(B){return B.length===4}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createImportTypeNode,h=m.updateImportTypeNode;m.createImportTypeNode=e.buildOverload("createImportTypeNode").overload({0:function(B,ne,z,p,v){return M(B,ne,z,p,v)},1:function(B,ne,z,p){return M(B,void 0,ne,z,p)}}).bind({0:function(B){var ne=B[1],z=B[2],p=B[3],v=B[4];return(ne===void 0||e.isImportTypeAssertionContainer(ne))&&(z===void 0||!e.isArray(z))&&(p===void 0||e.isArray(p))&&(v===void 0||typeof v=="boolean")},1:function(B){var ne=B[1],z=B[2],p=B[3],v=B[4];return v===void 0&&(ne===void 0||e.isEntityName(ne))&&(z===void 0||e.isArray(z))&&(p===void 0||typeof p=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish(),m.updateImportTypeNode=e.buildOverload("updateImportTypeNode").overload({0:function(B,ne,z,p,v,fe){return h(B,ne,z,p,v,fe)},1:function(B,ne,z,p,v){return h(B,ne,B.assertions,z,p,v)}}).bind({0:function(B){var ne=B[2],z=B[3],p=B[4],v=B[5];return(ne===void 0||e.isImportTypeAssertionContainer(ne))&&(z===void 0||!e.isArray(z))&&(p===void 0||e.isArray(p))&&(v===void 0||typeof v=="boolean")},1:function(B){var ne=B[2],z=B[3],p=B[4],v=B[5];return v===void 0&&(ne===void 0||e.isEntityName(ne))&&(z===void 0||e.isArray(z))&&(p===void 0||typeof p=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){function a(m){var M=m.createTypeParameterDeclaration,h=m.updateTypeParameterDeclaration;m.createTypeParameterDeclaration=e.buildOverload("createTypeParameterDeclaration").overload({0:function(B,ne,z,p){return M(B,ne,z,p)},1:function(B,ne,z){return M(void 0,B,ne,z)}}).bind({0:function(B){var ne=B[0];return ne===void 0||e.isArray(ne)},1:function(B){var ne=B[0];return ne!==void 0&&!e.isArray(ne)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish(),m.updateTypeParameterDeclaration=e.buildOverload("updateTypeParameterDeclaration").overload({0:function(B,ne,z,p,v){return h(B,ne,z,p,v)},1:function(B,ne,z,p){return h(B,B.modifiers,ne,z,p)}}).bind({0:function(B){var ne=B[1];return ne===void 0||e.isArray(ne)},1:function(B){var ne=B[1];return ne!==void 0&&!e.isArray(ne)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish()}n(a,"patchNodeFactory");var y=e.createNodeFactory;e.createNodeFactory=function(m,M){var h=y(m,M);return a(h),h},a(e.factory)})(_r||(_r={}));var _r;(function(e){var a={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter."},y={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter."},m={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters."};function M(B){var ne=B.createParameterDeclaration,z=B.updateParameterDeclaration,p=B.createPropertyDeclaration,v=B.updatePropertyDeclaration,fe=B.createMethodDeclaration,le=B.updateMethodDeclaration,se=B.createConstructorDeclaration,ce=B.updateConstructorDeclaration,ue=B.createGetAccessorDeclaration,O=B.updateGetAccessorDeclaration,L=B.createSetAccessorDeclaration,_=B.updateSetAccessorDeclaration,b=B.createIndexSignature,x=B.updateIndexSignature,E=B.createClassStaticBlockDeclaration,P=B.updateClassStaticBlockDeclaration,A=B.createClassExpression,ve=B.updateClassExpression,be=B.createFunctionDeclaration,Z=B.updateFunctionDeclaration,J=B.createClassDeclaration,$=B.updateClassDeclaration,Y=B.createInterfaceDeclaration,C=B.updateInterfaceDeclaration,j=B.createTypeAliasDeclaration,ae=B.updateTypeAliasDeclaration,U=B.createEnumDeclaration,F=B.updateEnumDeclaration,w=B.createModuleDeclaration,G=B.updateModuleDeclaration,X=B.createImportEqualsDeclaration,ee=B.updateImportEqualsDeclaration,De=B.createImportDeclaration,T=B.updateImportDeclaration,k=B.createExportAssignment,N=B.updateExportAssignment,ie=B.createExportDeclaration,V=B.updateExportDeclaration;B.createParameterDeclaration=e.buildOverload("createParameterDeclaration").overload({0:function(l,I,R,K,H,me){return ne(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return ne(e.concatenate(l,I),R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isBindingName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isDotDotDotToken(R))&&(K===void 0||typeof K=="string"||e.isBindingName(K))&&(H===void 0||e.isQuestionToken(H))&&(me===void 0||e.isTypeNode(me))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:a}).finish(),B.updateParameterDeclaration=e.buildOverload("updateParameterDeclaration").overload({0:function(l,I,R,K,H,me,ge){return z(l,I,R,K,H,me,ge)},1:function(l,I,R,K,H,me,ge,Ke){return z(l,e.concatenate(I,R),K,H,me,ge,Ke)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7];return ge===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isBindingName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isDotDotDotToken(R))&&(K===void 0||typeof K=="string"||e.isBindingName(K))&&(H===void 0||e.isQuestionToken(H))&&(me===void 0||e.isTypeNode(me))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:a}).finish(),B.createPropertyDeclaration=e.buildOverload("createPropertyDeclaration").overload({0:function(l,I,R,K,H){return p(l,I,R,K,H)},1:function(l,I,R,K,H,me){return p(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isQuestionOrExclamationToken(R))&&(K===void 0||e.isTypeNode(K))&&(H===void 0||e.isExpression(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||e.isQuestionOrExclamationToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))}}).deprecate({1:a}).finish(),B.updatePropertyDeclaration=e.buildOverload("updatePropertyDeclaration").overload({0:function(l,I,R,K,H,me){return v(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return v(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isQuestionOrExclamationToken(R))&&(K===void 0||e.isTypeNode(K))&&(H===void 0||e.isExpression(H))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||e.isQuestionOrExclamationToken(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isExpression(me))}}).deprecate({1:a}).finish(),B.createMethodDeclaration=e.buildOverload("createMethodDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke){return fe(l,I,R,K,H,me,ge,Ke)},1:function(l,I,R,K,H,me,ge,Ke,je){return fe(e.concatenate(l,I),R,K,H,me,ge,Ke,je)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7],je=l[8];return je===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isArray(H))&&(me===void 0||!e.some(me,e.isTypeParameterDeclaration))&&(ge===void 0||!e.isArray(ge))&&(Ke===void 0||e.isBlock(Ke))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7],je=l[8];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isAsteriskToken(R))&&(K===void 0||typeof K=="string"||e.isPropertyName(K))&&(H===void 0||!e.isArray(H))&&(me===void 0||!e.some(me,e.isParameter))&&(ge===void 0||e.isArray(ge))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:a}).finish(),B.updateMethodDeclaration=e.buildOverload("updateMethodDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke,je){return le(l,I,R,K,H,me,ge,Ke,je)},1:function(l,I,R,K,H,me,ge,Ke,je,Le){return le(l,e.concatenate(I,R),K,H,me,ge,Ke,je,Le)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8],je=l[9];return je===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isPropertyName(R))&&(K===void 0||typeof K=="object"&&e.isQuestionToken(K))&&(H===void 0||e.isArray(H))&&(me===void 0||!e.some(me,e.isTypeParameterDeclaration))&&(ge===void 0||!e.isArray(ge))&&(Ke===void 0||e.isBlock(Ke))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8],je=l[9];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R=="object"&&e.isAsteriskToken(R))&&(K===void 0||typeof K=="string"||e.isPropertyName(K))&&(H===void 0||!e.isArray(H))&&(me===void 0||!e.some(me,e.isParameter))&&(ge===void 0||e.isArray(ge))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:a}).finish(),B.createConstructorDeclaration=e.buildOverload("createConstructorDeclaration").overload({0:function(l,I,R){return se(l,I,R)},1:function(l,I,R,K){return se(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||!e.some(I,e.isDecorator))&&(R===void 0||!e.some(R,e.isModifier))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||!e.some(I,e.isModifier))&&(R===void 0||!e.some(R,e.isParameter))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:y}).finish(),B.updateConstructorDeclaration=e.buildOverload("updateConstructorDeclaration").overload({0:function(l,I,R,K){return ce(l,I,R,K)},1:function(l,I,R,K,H){return ce(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||!e.some(I,e.isDecorator))&&(R===void 0||!e.some(R,e.isModifier))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||!e.some(I,e.isModifier))&&(R===void 0||!e.some(R,e.isParameter))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:y}).finish(),B.createGetAccessorDeclaration=e.buildOverload("createGetAccessorDeclaration").overload({0:function(l,I,R,K,H){return ue(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ue(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isBlock(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isBlock(me))}}).deprecate({1:a}).finish(),B.updateGetAccessorDeclaration=e.buildOverload("updateGetAccessorDeclaration").overload({0:function(l,I,R,K,H,me){return O(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return O(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isBlock(H))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))&&(me===void 0||e.isBlock(me))}}).deprecate({1:a}).finish(),B.createSetAccessorDeclaration=e.buildOverload("createSetAccessorDeclaration").overload({0:function(l,I,R,K){return L(l,I,R,K)},1:function(l,I,R,K,H){return L(e.concatenate(l,I),R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:a}).finish(),B.updateSetAccessorDeclaration=e.buildOverload("updateSetAccessorDeclaration").overload({0:function(l,I,R,K,H){return _(l,I,R,K,H)},1:function(l,I,R,K,H,me){return _(l,e.concatenate(I,R),K,H,me)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5];return H===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isBlock(H))}}).deprecate({1:a}).finish(),B.createIndexSignature=e.buildOverload("createIndexSignature").overload({0:function(l,I,R){return b(l,I,R)},1:function(l,I,R,K){return b(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||e.every(R,e.isParameter))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.every(R,e.isModifier))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))}}).deprecate({1:y}).finish(),B.updateIndexSignature=e.buildOverload("updateIndexSignature").overload({0:function(l,I,R,K){return x(l,I,R,K)},1:function(l,I,R,K,H){return x(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||e.every(R,e.isParameter))&&(K===void 0||!e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.every(R,e.isModifier))&&(K===void 0||e.isArray(K))&&(H===void 0||e.isTypeNode(H))}}).deprecate({1:y}).finish(),B.createClassStaticBlockDeclaration=e.buildOverload("createClassStaticBlockDeclaration").overload({0:function(l){return E(l)},1:function(l,I,R){return E(R)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2];return R===void 0&&K===void 0&&(I===void 0||!e.isArray(I))},1:function(l){var I=l[0],R=l[1],K=l[2];return(I===void 0||e.isArray(I))&&(R===void 0||e.isArray(I))&&(K===void 0||e.isBlock(K))}}).deprecate({1:m}).finish(),B.updateClassStaticBlockDeclaration=e.buildOverload("updateClassStaticBlockDeclaration").overload({0:function(l,I){return P(l,I)},1:function(l,I,R,K){return P(l,K)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3];return R===void 0&&K===void 0&&(I===void 0||!e.isArray(I))},1:function(l){var I=l[1],R=l[2],K=l[3];return(I===void 0||e.isArray(I))&&(R===void 0||e.isArray(I))&&(K===void 0||e.isBlock(K))}}).deprecate({1:m}).finish(),B.createClassExpression=e.buildOverload("createClassExpression").overload({0:function(l,I,R,K,H){return A(l,I,R,K,H)},1:function(l,I,R,K,H,me){return A(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:y}).finish(),B.updateClassExpression=e.buildOverload("updateClassExpression").overload({0:function(l,I,R,K,H,me){return ve(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return ve(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:y}).finish(),B.createFunctionDeclaration=e.buildOverload("createFunctionDeclaration").overload({0:function(l,I,R,K,H,me,ge){return be(l,I,R,K,H,me,ge)},1:function(l,I,R,K,H,me,ge,Ke){return be(I,R,K,H,me,ge,Ke)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7];return Ke===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||typeof R=="string"||e.isIdentifier(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isParameter))&&(me===void 0||!e.isArray(me))&&(ge===void 0||e.isBlock(ge))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6],Ke=l[7];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R!="string"&&e.isAsteriskToken(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.isArray(me))&&(ge===void 0||e.isTypeNode(ge))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:y}).finish(),B.updateFunctionDeclaration=e.buildOverload("updateFunctionDeclaration").overload({0:function(l,I,R,K,H,me,ge,Ke){return Z(l,I,R,K,H,me,ge,Ke)},1:function(l,I,R,K,H,me,ge,Ke,je){return Z(l,R,K,H,me,ge,Ke,je)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8];return Ke===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isIdentifier(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isParameter))&&(me===void 0||!e.isArray(me))&&(ge===void 0||e.isBlock(ge))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6],ge=l[7],Ke=l[8];return(I===void 0||e.isArray(I))&&(R===void 0||typeof R!="string"&&e.isAsteriskToken(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.isArray(me))&&(ge===void 0||e.isTypeNode(ge))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:y}).finish(),B.createClassDeclaration=e.buildOverload("createClassDeclaration").overload({0:function(l,I,R,K,H){return J(l,I,R,K,H)},1:function(l,I,R,K,H,me){return J(e.concatenate(l,I),R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(){return!0}}).deprecate({1:a}).finish(),B.updateClassDeclaration=e.buildOverload("updateClassDeclaration").overload({0:function(l,I,R,K,H,me){return $(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return $(l,e.concatenate(I,R),K,H,me,ge)}}).bind({0:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return me===void 0&&(I===void 0||!e.isArray(I))&&(R===void 0||e.isArray(R))&&(K===void 0||e.every(K,e.isHeritageClause))&&(H===void 0||e.every(H,e.isClassElement))},1:function(l){var I=l[2],R=l[3],K=l[4],H=l[5],me=l[6];return(I===void 0||e.isArray(I))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.isArray(me))}}).deprecate({1:a}).finish(),B.createInterfaceDeclaration=e.buildOverload("createInterfaceDeclaration").overload({0:function(l,I,R,K,H){return Y(l,I,R,K,H)},1:function(l,I,R,K,H,me){return Y(I,R,K,H,me)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.every(me,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))}}).deprecate({1:y}).finish(),B.updateInterfaceDeclaration=e.buildOverload("updateInterfaceDeclaration").overload({0:function(l,I,R,K,H,me){return C(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return C(l,R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||e.every(H,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(me===void 0||e.every(me,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))}}).deprecate({1:y}).finish(),B.createTypeAliasDeclaration=e.buildOverload("createTypeAliasDeclaration").overload({0:function(l,I,R,K){return j(l,I,R,K)},1:function(l,I,R,K,H){return j(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||!e.isArray(H))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))&&(me===void 0||e.isTypeNode(me))}}).deprecate({1:y}).finish(),B.updateTypeAliasDeclaration=e.buildOverload("updateTypeAliasDeclaration").overload({0:function(l,I,R,K,H){return ae(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ae(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))&&(H===void 0||!e.isArray(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))&&(me===void 0||e.isTypeNode(me))}}).deprecate({1:y}).finish(),B.createEnumDeclaration=e.buildOverload("createEnumDeclaration").overload({0:function(l,I,R){return U(l,I,R)},1:function(l,I,R,K){return U(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))}}).deprecate({1:y}).finish(),B.updateEnumDeclaration=e.buildOverload("updateEnumDeclaration").overload({0:function(l,I,R,K){return F(l,I,R,K)},1:function(l,I,R,K,H){return F(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isArray(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||!e.isArray(K))&&(H===void 0||e.isArray(H))}}).deprecate({1:y}).finish(),B.createModuleDeclaration=e.buildOverload("createModuleDeclaration").overload({0:function(l,I,R,K){return w(l,I,R,K)},1:function(l,I,R,K,H){return w(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&R!==void 0&&!e.isArray(R)&&(K===void 0||e.isModuleBody(K))&&(H===void 0||typeof H=="number")},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isModuleName(K)&&(H===void 0||typeof H=="object")&&(me===void 0||typeof me=="number")}}).deprecate({1:y}).finish(),B.updateModuleDeclaration=e.buildOverload("updateModuleDeclaration").overload({0:function(l,I,R,K){return G(l,I,R,K)},1:function(l,I,R,K,H){return G(l,R,K,H)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isModuleBody(K))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isModuleName(K)&&(H===void 0||e.isModuleBody(H))}}).deprecate({1:y}).finish(),B.createImportEqualsDeclaration=e.buildOverload("createImportEqualsDeclaration").overload({0:function(l,I,R,K){return X(l,I,R,K)},1:function(l,I,R,K,H){return X(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K!="boolean"&&typeof H!="string"},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&(typeof H=="string"||e.isIdentifier(H))&&me!==void 0&&e.isModuleReference(me)}}).deprecate({1:y}).finish(),B.updateImportEqualsDeclaration=e.buildOverload("updateImportEqualsDeclaration").overload({0:function(l,I,R,K,H){return ee(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ee(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K!="boolean"&&typeof H!="string"},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&(typeof H=="string"||e.isIdentifier(H))&&me!==void 0&&e.isModuleReference(me)}}).deprecate({1:y}).finish(),B.createImportDeclaration=e.buildOverload("createImportDeclaration").overload({0:function(l,I,R,K){return De(l,I,R,K)},1:function(l,I,R,K,H){return De(I,R,K,H)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&K!==void 0&&e.isExpression(K)&&(H===void 0||e.isAssertClause(H))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||e.isImportClause(K))&&H!==void 0&&e.isExpression(H)&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:y}).finish(),B.updateImportDeclaration=e.buildOverload("updateImportDeclaration").overload({0:function(l,I,R,K,H){return T(l,I,R,K,H)},1:function(l,I,R,K,H,me){return T(l,R,K,H,me)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return me===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||!e.isArray(R))&&(K===void 0||e.isExpression(K))&&(H===void 0||e.isAssertClause(H))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||e.isImportClause(K))&&H!==void 0&&e.isExpression(H)&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:y}).finish(),B.createExportAssignment=e.buildOverload("createExportAssignment").overload({0:function(l,I,R){return k(l,I,R)},1:function(l,I,R,K){return k(I,R,K)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return H===void 0&&(I===void 0||e.every(I,e.isModifier))&&(R===void 0||typeof R=="boolean")&&typeof K=="object"},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&(K===void 0||typeof K=="boolean")&&H!==void 0&&e.isExpression(H)}}).deprecate({1:y}).finish(),B.updateExportAssignment=e.buildOverload("updateExportAssignment").overload({0:function(l,I,R){return N(l,I,R)},1:function(l,I,R,K){return N(l,R,K)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3];return K===void 0&&(I===void 0||e.every(I,e.isModifier))&&R!==void 0&&!e.isArray(R)},1:function(l){var I=l[1],R=l[2],K=l[3];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&K!==void 0&&e.isExpression(K)}}).deprecate({1:y}).finish(),B.createExportDeclaration=e.buildOverload("createExportDeclaration").overload({0:function(l,I,R,K,H){return ie(l,I,R,K,H)},1:function(l,I,R,K,H,me){return ie(I,R,K,H,me)}}).bind({0:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&typeof R=="boolean"&&typeof K!="boolean"&&(H===void 0||e.isExpression(H))&&(me===void 0||e.isAssertClause(me))},1:function(l){var I=l[0],R=l[1],K=l[2],H=l[3],me=l[4],ge=l[5];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&typeof K=="boolean"&&(H===void 0||e.isNamedExportBindings(H))&&(me===void 0||e.isExpression(me))&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:y}).finish(),B.updateExportDeclaration=e.buildOverload("updateExportDeclaration").overload({0:function(l,I,R,K,H,me){return V(l,I,R,K,H,me)},1:function(l,I,R,K,H,me,ge){return V(l,R,K,H,me,ge)}}).bind({0:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return ge===void 0&&(I===void 0||e.every(I,e.isModifier))&&typeof R=="boolean"&&typeof K!="boolean"&&(H===void 0||e.isExpression(H))&&(me===void 0||e.isAssertClause(me))},1:function(l){var I=l[1],R=l[2],K=l[3],H=l[4],me=l[5],ge=l[6];return(I===void 0||e.every(I,e.isDecorator))&&(R===void 0||e.isArray(R))&&typeof K=="boolean"&&(H===void 0||e.isNamedExportBindings(H))&&(me===void 0||e.isExpression(me))&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:y}).finish()}n(M,"patchNodeFactory");var h=e.createNodeFactory;e.createNodeFactory=function(B,ne){var z=h(B,ne);return M(z),z},M(e.factory)})(_r||(_r={}));var _r;(function(e){typeof console<"u"&&(e.Debug.loggingHost={log:function(a,y){switch(a){case e.LogLevel.Error:return console.error(y);case e.LogLevel.Warning:return console.warn(y);case e.LogLevel.Info:return console.log(y);case e.LogLevel.Verbose:return console.log(y)}}})})(_r||(_r={}))});var KF={};nF(KF,{RunMode:()=>Ym,getChecksumConfig:()=>mS,getLogin:()=>F1,init:()=>HF});module.exports=iF(KF);var bh=(m=>(m[m.Element=0]="Element",m[m.VisibleElement=1]="VisibleElement",m[m.AtPointElement=2]="AtPointElement",m))(bh||{});var C6=require("path");var Ym=(m=>(m.Normal="normal",m.Heal="heal",m.Refactor="refactor",m))(Ym||{});var k1=(z=>(z.Locator="locator",z.GetByRole="getByRole",z.GetByText="getByText",z.GetByLabel="getByLabel",z.GetByPlaceholder="getByPlaceholder",z.GetByAltText="getByAltText",z.GetByTitle="getByTitle",z.GetByTestId="getByTestId",z))(k1||{}),A1=(h=>(h.First="first",h.Last="last",h.Nth="nth",h.Filter="filter",h.Or="or",h))(A1||{});var Yp=E1(require("path")),P1=require("fs");var Sh=n(e=>new Promise(a=>setTimeout(a,e)),"awaitSleep"),uS=n(async(e,a=1e3,y="action hang guard timed out")=>{let m="guard-timed-out",M=n(async()=>(await Sh(a+1e3),m),"guard"),h=await Promise.race([e,M()]);if(typeof h=="string"&&h===m)throw new Error(y);return h},"guardReturn");function lS(e=5,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let y="";for(let m=e;m>0;--m)y+=a[Math.floor(Math.random()*a.length)];return y}n(lS,"randomString");async function I1(e,a){let y=dS(e,a),{ungzip:m}=fS(),M=await m((0,P1.readFileSync)(y));return JSON.parse(M)}n(I1,"getESRAMapForTestId");function Hv(e){return Yp.join(Yp.dirname(e),"..")}n(Hv,"getTestBaseDir");function dS(e,a){return Yp.join(tF(e),`${a}.checksum.esra`)}n(dS,"getESRAFilePath");function tF(e){return Yp.join(pS(e),"esra")}n(tF,"getESRAFolderPath");function y6(e,a){return Yp.join(pS(e),"har",a)}n(y6,"getHARFolderPath");function h6(e,a){return Yp.join(pS(e),"trace",`${a}.playwright-trace.zip`)}n(h6,"getTraceFilePath");function pS(e){return Yp.join(e,"test-data")}n(pS,"getTestDataPath");function aF(){return{uploadAgentHOST:"localhost",uploadAgentPort:3e3}}n(aF,"getUploadAgentDefaultConfig");var N1=n(async e=>{try{await uS(e,5e3)}catch{}},"guardAwait"),gS=n(e=>{let a=/\/\/.*/,y=/\/\*[\s\S]*?\*\//g;return e.replace(a,"").replace(y,"")},"stripJavascriptComments");async function w1(e,a){_u("Fetching selection data..");let m=n(async h=>a.evaluate(async B=>await window.checksum.testRunner.getSelectionDataForSelector(B),h),"getSelectionDataForSelector"),M=await m(e);if(M||(_u("Failed, waiting for network idle..."),await N1(a.waitForLoadState("networkidle")),M=await m(e),M)||(_u("Failed, waiting for element to be visible..."),await N1(a.locator(e).waitFor({state:"visible"})),M=await m(e),M)||(_u("Failed, will wait 5000ms..."),await Sh(5e3),M=await m(e),M))return M}n(w1,"selectionDataForSelector");async function O1(e,a,y,m=6e4){return a in e?uS(e[a](...y),m,"Execution timeout"):e}n(O1,"executePlaywrightMethodWithTimeout");var D6=!1;function b6(e){D6=e}n(b6,"setLogToConsole");function _u(...e){D6&&console.log(...e)}n(_u,"log");function _S(){return Yp.join(__dirname,"..","..","..","checksum")}n(_S,"checksumFolder");function F1(e){try{let a=require(`${_S()}/login.ts`).default;return async y=>{await a(y,e)}}catch(a){throw console.warn("Could not find checksum login file. Please set login.ts file in your checksum folder"),a}}n(F1,"getLogin");var Gv;function S6(){if(Gv)return Gv;let e;try{let a=(0,P1.existsSync)(`${_S()}/checksum.config.tmp.ts`)?"checksum.config.tmp.ts":"checksum.config.ts";e=require(`${_S()}/${a}`).default}catch{console.warn("Could not find checksum config file, will run with defaults"),e=mS()}return e}n(S6,"loadChecksumConfig");function mS(e={}){return Gv={...{apiKey:void 0,runMode:"normal",baseURL:void 0,apiURL:void 0,username:void 0,password:void 0,options:{useChecksumSelectors:!0,useChecksumAI:!1,newAssertionsEnabled:!0,useMockData:!1,printLogs:!1,writeTraceFile:!1},...aF()},...e},(!Gv.username||!Gv.password)&&console.warn("Username and/or password missing in config file"),Gv}n(mS,"getChecksumConfig");var Tg=class{constructor(a,y,m={generateSelectionData:!1}){this.page=a;this.phaseSetter=y;this.options=m;this.page=a,this.phaseSetter=y}addMetadata(a){}async execute(a,y,m){return O1(a,y,m)}async executeWithSelectors(a,y,m,M=void 0,h={}){for(let{selector:B,tag:ne}of a){this.phaseSetter({phase:M,payload:{selector:B,...h}});let z=this.page.locator(B);this.log(`Running with selector=${B})`);let p=!1;["check","uncheck"].includes(y)&&ne!=="input"&&(p=!0);let v=this.generateSelectionDataForSelector(B);if(await this.execute(z,p?"click":y,m)===!1){this.log("Fallback selector timeout");continue}return v}}async generateSelectionDataForSelector(a){let{generateSelectionData:y}=this.options;if(!y)return{selector:a,generatedLocator:void 0,esraMetadata:void 0};try{let m=await w1(a,this.page);if(!m)throw new Error(`[generateSelectionDataForSelector] Failed to generate selection data for selector ${a}`);return m}catch(m){throw this.log(m.message),m}}log(...a){_u(...a)}};n(Tg,"AbstractFallback");var M1=require("path");var Kv=class extends Tg{constructor(){super(...arguments);this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"}}init(y){return this.esraData={...this.esraData,minSelectionScore:.5,...y},this}async resolve(y){try{let{method:m,args:M}=y,{checksumId:h}=this.esraData,B=await this.getActionIdToESRAMap();if(!(h in B)){let v=`No ESRA metadata found for id ${h}`;throw new Error(v)}let ne=await this.getTestIdsForLocator(B[h]),{elementDataMap:z}=await this.getSelectors(ne),p=await this.executeWithSelectors(Object.values(z),m,M,"esra-action");if(p)return[p];throw new Error("Exhausted ESRA selectors")}catch(m){this.log(m.message);return}}async getActionIdToESRAMap(){try{this.actionIdToESRAMap||(this.actionIdToESRAMap=await I1((0,M1.join)((0,M1.dirname)(this.esraData.fileName),".."),this.esraData.testId))}catch(y){return super.log("Could not read ESRA metadata file, ",y),{}}return this.actionIdToESRAMap}async getSelectors(y){let m=[],M={};if(!y)return{selectors:m,elementDataMap:M};for(let h in Object.keys(bh)){let B=y.testIds[this.locatorTypeEnumToFieldMap[h]];if(!B)continue;let ne=`[data-checksum-testid="${B}"]`;m.push(ne),M[ne]={...y.elementData[this.locatorTypeEnumToFieldMap[h]],selector:y.selectors[this.locatorTypeEnumToFieldMap[h]]}}for(let h in Object.keys(bh)){let B=y.selectors[this.locatorTypeEnumToFieldMap[h]];B&&(m.push(B),M[B]={...y.elementData[this.locatorTypeEnumToFieldMap[h]],selector:B})}return this.log("Selectors for ESRA metadata:",m),{selectors:m,elementDataMap:M}}async getTestIdsForLocator(y,m={}){let{cachedSelector:M=void 0,retriesLeft:h=3,retryMaxTimeout:B=3e3,staticMetadata:ne}=m;this.phaseSetter({phase:"esra-search"});let z=await this.page.evaluate(async({esraMetadata:p,cachedSelector:v,staticMetadata:fe,minSelectionScore:le})=>await window.checksum.testRunner.getMatchingElementSelectionData(p,{minSelectionScore:le,cachedSelector:v,staticMetadata:fe}),{esraMetadata:y,cachedSelector:M,staticMetadata:ne,minSelectionScore:this.esraData.minSelectionScore});if(!z){if(h>0)return this.log("[getTestIdsForLocator] no match found, waiting and retrying..."),await Sh(B/h),this.getTestIdsForLocator(y,{...m,retriesLeft:h-1});this.log("[getTestIdsForLocator] failed to locate")}return z}toString(){return`Checksum Selector (${this.esraData.checksumId})`}};n(Kv,"ESRAfallback");var Qv=class extends Tg{init(){return this}async resolve(a){try{let{locator:y,method:m,args:M}=a;if(!["check","uncheck"].includes(m))return;this.phaseSetter({phase:"force"});let h=!1;for(let ne of Array.from(M))if(typeof ne=="object"){ne.force=!0,h=!0;break}if(h||(M=Array.from(M),M.push({force:!0})),await this.execute(y,m,M)!==!1)return[{selector:y._selector,generatedLocator:void 0,esraMetadata:void 0}];this.log("Locator timed out, ")}catch(y){this.log("initiateFallbackSequence exception, ",y);return}}toString(){return null}};n(Qv,"ForceFallback");var Gf=class extends Tg{constructor(){super(...arguments);this.config={llm:{persistChecksumIds:!1}};this.runningChecksumIdIndex=[0];this.steps=[];this.selectionData=[];this.finish=!1;this.actionsCounter=1;this.mockServer=!1}init(y){let{goal:m,apiKey:M,apiUrl:h}=y;return Gf.goal=m,Gf.apiKey=M,h&&(Gf.API_BASE_URL=h),this}async resolve(){try{if(await this.initSession(),!await this.iterate()){this.log("[LLMFallback] LLMFallback failed");return}return this.selectionData}catch(y){this.log("[LLMFallback] Error resolving",y);return}}async iterate(){let y=!1,m=Gf.CLIENT_MAX_ITERATIONS;do{let{reducedHTML:M,flashingHTML:h,elementsForNodeInterpretation:B}=await this.page.evaluate(async([z])=>window.checksum.testGenerator.reduceHTML({overrideInteractableElementsSelectors:z}),[[void 0]]),ne=await this.getNextAction({reducedHTML:M,flashingHTML:h,elementsForNodeInterpretation:B,hasPreviousActionFailed:y});if(ne.thought==="finish")return this.log("[LLMFallback] Received finish step"),this.steps.length>0;if(["failed","fail"].includes(ne.thought))return this.log("[LLMFallback] Received failed signal, will quit"),!1;ne={...ne,...await this.getPlaywrightLocatorForChecksumId(ne.action.checksumid)};try{let z=await this.executeWithSelectors([{...ne,tag:null}],ne.action.type,["fill","navigate"].includes(ne.action.type)?[ne.action.value]:[],"llm-action",{thought:ne.thought});if(z)y=!1,this.selectionData.push({...z,method:{name:ne.action.type,args:["fill","navigate"].includes(ne.action.type)?[ne.action.value]:[]},comment:ne.thought});else throw new Error("Action failed")}catch(z){this.log("[LLMFallback] Error while executing selector",z.message),y=!0;continue}if(this.steps.push(ne),--m<=0){this.log("[LLMFallback] Maximum repeatition reached");break}}while(!0);return!1}async getNextAction({reducedHTML:y,flashingHTML:m,hasPreviousActionFailed:M,elementsForNodeInterpretation:h}){let{apiKey:B}=Gf;if(this.mockServer)return this.finish?{thought:"finish"}:(--this.actionsCounter===0&&(this.finish=!0),{thought:"mock-thought",action:{type:"click",checksumid:"10"}});let ne={reduction:{reducedHTML:y,flashingHTML:m,elementsForNodeInterpretation:h},currentURL:this.page.url()};try{let p=await(await fetch(`${Gf.API_BASE_URL}/iterate`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:Gf.apiKey},body:JSON.stringify({appName:B,sessionId:this.sessionId,iterationData:ne,hasPreviousActionFailed:M})})).json();return this.log("[LLMFallback] Received next action",p),p}catch(z){throw this.log("[LLMFallback] Error calling iterate",z),z}}async initSession(){let{apiKey:y,goal:m,thoughts:M}=Gf;if(this.log("[LLMFallback] Calling init session...",{appName:y,goal:m,thoughts:M}),this.mockServer){this.sessionId="mock-session-id";return}let h={storyTitle:m,thoughtsAndActions:{previous:M.slice(0,Math.max(M.length-1,0)).map(B=>({thought:B})),failing:{thought:M[M.length-1]},next:[]}};this.phaseSetter({phase:"llm-prompt",payload:{thought:h.thoughtsAndActions.failing.thought}});try{let B=await fetch(`${Gf.API_BASE_URL}/init`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:Gf.apiKey},body:JSON.stringify({appName:y,data:h})});this.sessionId=await B.text(),this.log("[LLMFallback] Session ID",this.sessionId)}catch(B){throw this.log("[LLMFallback] Error calling init session",B),B}}addMetadata(y){Gf.thoughts.push(y.thought)}async getPlaywrightLocatorForChecksumId(y){return!y||isNaN(Number(y))?(this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id : ${y},,,`),{selector:y}):(!this.config.llm.persistChecksumIds&&this.runningChecksumIdIndex.length>1&&Number(y)<this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-2]&&this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id, possibly from previous prompt: ${y},
270
+ current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async M=>window.checksum.testGenerator.getSelectorForChecksumId(M),y))}getFailedThought(){return Gf.thoughts[Gf.thoughts.length-1]}toString(){return`Checksum AI Selector ${this.getFailedThought()}`}},hp=Gf;n(hp,"AIFallback"),hp.API_BASE_URL="https://api.checksum.ai/client-api/runtime/ai-fallback",hp.CLIENT_MAX_ITERATIONS=10,hp.thoughts=[];var x6=E1(require("path")),T6=require("fs");var oF="checksum-playwright-runtime.js",sF=__dirname+"/checksumlib.js";var $p=class{constructor(a,y="normal",m,M,h,B,ne){this.page=a;this.runMode=y;this.testIdSelector=m;this.codeMirror=M;this.options=h;this.apiKey=B;this.apiURL=ne;this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"};this.minSelectionScore=.5;this.phasePayload=void 0;this.locatorStack=[];this.fallbacks=[];this.checksumStepStack=[];this.phaseMap={};this.setPhase=a=>{let{phase:y,payload:m,clear:M}=a;M&&(this.phase=void 0,this.phasePayload=void 0),y&&(this.phase=y),m&&(this.phasePayload=m)};this.registerPageEvents(),this.resetFallbacks(),this.proxy=new Proxy(this,{get:n(function(p,v){return p.getPageMethod(v)},"get")}),b6(h.printLogs)}async prepareAPIMock(){let a={GET:0,POST:0,PUT:0,DELETE:0},y=x6.join(y6(Hv(this.testInfo.file),this.checksumTestId),"test.har");if(!(0,T6.existsSync)(y)){_u(`Could not find har file ${y} for test`);return}await this.page.routeFromHAR(y,{url:"*/**",notFound:"fallback",update:!1});let m=this.page._routes[0].handler;await this.page.route("**/*",M=>{let h=M.request().headers(),B=M.request().method();h["Checksum-Id"]=(++a[B]).toString(),M.request()._applyFallbackOverrides({headers:h}),m(M)})}registerPageEvents(){this.page.on("framenavigated",async a=>{a===this.page.mainFrame()&&(this.navigationPromise=new Promise((y,m)=>this.loadScript().then(y).catch(m)))}),this.page.context().tracing.start({screenshots:!0,snapshots:!0})}getPageMethod(a){return this.phase=void 0,typeof this[a]=="function"?this[a].bind(this):!Object.values(k1).includes(a)||!this.testInfo?this.page[a]:(this.locatorStack.length===0&&(this.pageInitialCallInTestFile=this.getFirstStackTraceFromTestFile()),this.pushToLocatorStack([{type:a,base:this.page,line:this.pageInitialCallInTestFile.line}]),n(function(m,M){try{return this.executeLocator(m,M)}catch(h){throw this.popLocatorChain(),h}},"Page").bind(this))}static async init(a,y,{runMode:m="normal",testIdSelector:M=void 0,apiKey:h,apiURL:B,options:ne={}}){return new $p(a,m,M,y,{useChecksumSelectors:!0,useChecksumAI:!0,newAssertionsEnabled:!0,writeTraceFile:!0,useMockData:!1,printLogs:!1,...ne},h,B).proxy}popLocatorChain(){return this.locatorStack.pop()}async initWithTest(a){this.testInfo=a,this.phase="script",this.setupStepInterceptors()}async onTestComplete(){if(this.options.writeTraceFile){let a=h6(Hv(this.testInfo.file),this.checksumTestId);return await this.page.context().tracing.stop({path:a}),a}}async testId(a){this.checksumTestId=a,(this.options.useMockData||this.runMode==="refactor")&&await this.prepareAPIMock()}checksumSelector(a){return this.options.useChecksumSelectors&&(this.fallbacks.push(this.constructFallback(Kv).init({checksumId:a,fileName:this.testInfo.file,testId:this.checksumTestId})),this.sortFallbacks()),this.checksumStepId=a,this.proxy}checksumAI(...a){if(a.length===0)throw new Error("checksumAI missing arguments");if(!this.options.useChecksumAI)return this.proxy;let{apiKey:y,apiURL:m}=this;if(this.fallbacks.push(this.constructFallback(hp).init({goal:this.testInfo.title,apiKey:y,apiURL:m})),this.sortFallbacks(),this.fallbacks.filter(M=>M instanceof hp).forEach(M=>M.addMetadata({thought:a[0]})),this.checksumStepInitialCallInTestFile=this.getFirstStackTraceFromTestFile(),a.length===1)return this.proxy;if(typeof a[1]!="function")throw new Error("Second argument for withChecksumStep must be a function");this.checksumStepStack.push(a[0]);try{console.log("=== running test function");let M=this;return n(async function(){await a[1](),console.log("==== done running test function"),M.checksumStepStack.pop()},"Page")()}catch(M){console.log(M),this.checksumStepStack.pop()}}async loadScript(){try{return this.navigationPromise&&await this.navigationPromise,await this.page.addScriptTag({path:sF}),await this.page.evaluate(async({initModules:a,ESRAselectionRules:y})=>{window.checksum.testRunner.init(y,[],a)},{ESRAselectionRules:{testIdSelector:this.testIdSelector},initModules:{assertionGenerator:!0}}),_u(`[init] init script loaded for ${this.page.url()}`),!0}catch{return!1}}pushToLocatorStack(a){this.locatorStack.push(a)}getCurrentLocatorChain(){if(this.locatorStack.length)return this.locatorStack[this.locatorStack.length-1]}getCurrentLocatorInChain(){let a=this.getCurrentLocatorChain();return a==null?void 0:a[a.length-1]}getMessage(a,{initialSelector:y,selector:m,thought:M}={}){switch(a){case"script":return"Firing up checksum";case"initial":return`${y} failed, trying some checksum magic...`;case"force":return"check/uncheck methods failed, falling back to click action";case"esra-search":return"Checksum is looking for potential alternatives to resolve the issue...";case"esra-action":return`AI: use selector ${m}`;case"llm-prompt":return`Checksum is trying to achieve step "${M}" using AI...`;case"llm-action":return`AI: "${M}" using selector "${m}"`;case"fail":return`Checksum couldn't resolve the issue executing ${y}`}}onFallbackSuccess(){let a=this.testInfo._steps[this.testInfo._steps.length-1];a&&!a.endWallTime&&a.complete({error:{message:`Failed to resolve ${this.initialLocatorTitle}`,stack:""}})}setupStepInterceptors(){let a=["checksum-page.ts","checksum-test-extension.ts","checksum-playwright-runtime.js","code-mirror.ts","utils.ts","fallback/esra-fallback.ts","fallback/force-fallback.ts","fallback/llm-fallback.ts","index.js"].map(B=>(0,C6.join)(__dirname,B)),y={},m=n(B=>{var z,p,v,fe;return y[B.stepId]!==void 0?y[B.stepId]:B.location&&!a.includes(B.location.file)?!1:!!(B.stepId.includes(".evaluate@")||B.stepId.includes(".addScriptTag@")||(z=B.title)!=null&&z.includes("evaluate")||(p=B.title)!=null&&p.includes("addScriptTag")||(v=B.title)!=null&&v.includes("waitForLoadState")||B.category==="fixture"||(fe=B.title)!=null&&fe.includes("tracing.stop"))},"shouldFilterStep"),M=this.testInfo._onStepBegin;this.testInfo._onStepBegin=B=>{if(!this.phase&&m(B)){y[B.stepId]=!0;return}return y[B.stepId]=!1,this.phase==="initial"&&(this.initialLocatorTitle=B.title,B.location=this.pageInitialCallInTestFile),B.title.startsWith("proxy.")&&(B.title=B.title.replace("proxy.","page.")),this.phase&&this.phase!=="initial"&&(this.phaseMap[B.stepId]={phase:this.phase,payload:this.phasePayload,initialLocatorTitle:this.initialLocatorTitle},B.location=void 0,B.title=this.getMessage(this.phase,{initialSelector:this.initialLocatorTitle,...this.phasePayload})),this.phase=void 0,this.phasePayload=void 0,M(B)};let h=this.testInfo._onStepEnd;this.testInfo._onStepEnd=B=>{if(!y[B.stepId]){if(this.phaseMap[B.stepId]){let{phase:ne,initialLocatorTitle:z,payload:p}=this.phaseMap[B.stepId];ne==="fail"&&(B.error={message:`Failed to resolve ${z}`,stack:""})}return h(B)}}}getFirstStackTraceFromTestFile(){let a=this.getTestFileStackTrace()[0];if(!a)throw new Error(`Could not find test file location from stack trace ${$p.getStackTrace()}`);let m=[/\((.*):(\d+):(\d+)\)$/,/.*at (.*):(\d+):(\d+)$/].map(ne=>ne.exec(a)).find(ne=>ne!==null);if(!m)throw new Error(`Could not find test file location from stack trace ${a}`);let[,M,h,B]=m;return{file:M,line:parseInt(h),column:parseInt(B)}}getTestFileStackTrace(){return $p.getStackTrace().filter(y=>y.includes(this.testInfo.file))}isCalledDirectlyFromTestFunction(){let a=this.getTestFileStackTrace();if(a.length!==1+this.checksumStepStack.length)return!1;let y=a[0],m=/.*at (.*):(\d+):(\d+)$/;return this.checksumStepStack.length===0&&!m.exec(y)?!1:!this.isCalledThroughMethodInAnotherFile(y)}isCalledThroughMethodInAnotherFile(a){let y=$p.getStackTrace(),m=["node:internal","/node_modules/@playwright"],M=y.indexOf(a)-1;for(;M>=0&&m.some(B=>y[M].includes(B));)M--;let h=y[M];return!h.includes("checksum-page.ts")&&!h.includes(oF)}static getStackTrace(){return new Error().stack.split(`
271
271
  `)}getLocator(a,y){let m=this.getCurrentLocatorInChain();return m.base[m.type](a,y)}executeLocator(a,y){try{_u(`
272
272
  Executing locator ${this.getCurrentLocatorInChain().type} with ${typeof a=="string"?`selector ${a}`:"locator"}`);let m=this.getLocator(a,y);return new Proxy(m,{get:n(function(h,B){return this.getLocatorMethod(m,h,B)},"get").bind(this)})}catch(m){_u("Failed to locate",m)}}getLocatorMethod(a,y,m){return m==="constructor"?n(function(...h){return this.popLocatorChain(),y.constructor(...h)},"Locator"):m in y&&typeof y[m]!="function"||m===Symbol.toPrimitive||m in Object?(this.popLocatorChain(),y[m]):[...Object.values(k1),...Object.values(A1)].includes(m)?m==="or"?(_u("'Or' locator not supported, will execute normally"),this.popLocatorChain(),y[m]):(this.getCurrentLocatorChain().push({type:m,base:a}),n(function(...h){return this.executeLocator(...h)},"Locator").bind(this)):n(async function(...h){let B=await this.executeLocatorAction(a,m,h);return this.popLocatorChain(),B},"Locator").bind(this)}async executeLocatorAction(a,y,m){this.selector=a._selector;let M=this.getChecksumStepId();_u("Executing",y,this.selector);let h=y==="_expect";try{_u("Running initial locator..."),await this.navigationPromise,await this.page.evaluate(()=>!!window.checksum)||_u("[loadScript] checksum libs missing, marking as failed"),await this.stepWillExecute(h),this.phase="initial";let ne=await O1(a,y,m,this.getTimeout(y,m));if(ne!==!1)return await this.onStepSuccess(M,y==="_expect"),ne;await this.onStepFailure()}catch(B){_u("Failed initial execution. Exception:",B.message)}return this.initiateFallbackSequence(M,a,y,m)}getChecksumStepId(){let a=this.checksumStepId;return this.checksumStepId=void 0,a}async stepWillExecute(a){this.selectionData=void 0,this.runMode==="refactor"&&(_u(`stepWillExecute called for line ${this.pageInitialCallInTestFile.line}`),this.isCalledDirectlyFromTestFunction()&&(await this.evaluateWithChecksum(async()=>await window.checksum.testRunner.startMonitoringForAssertions()),this.selectionData=[await w1(this.selector,this.page)].filter(y=>y),Object.values(this.selectionData).length===0?_u(`Failed fetching selection data ${a?"- maybe because it is not visible and running inside expect":""}`):_u("Successfully fetched selection data")))}async onStepSuccess(a,y,m=!1){var z,p,v,fe;let M=(z=this.fallbacks.find(le=>le instanceof hp))==null?void 0:z.getFailedThought();if(this.resetFallbacks(),this.runMode==="normal"||this.runMode==="heal"&&!m||!this.codeMirror||!this.getCurrentLocatorChain())return;if(!this.isCalledDirectlyFromTestFunction()){_u("<!> Step called from helper function, will not refactor step");return}if(this.runMode==="refactor"&&!this.selectionData.length){_u("Failed fetching selection data, will not refactor step");return}_u("Will update in-memory code"+(this.selectionData&&this.selectionData.length>0?`
273
273
  locators:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checksum-ai/runtime",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Checksum.ai test runtime",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+
3
+ file="../../../playwright-core/lib/server/browserContext.js"
4
+ if [ "$2" == "root" ]; then
5
+ file="./backend/$file"
6
+ else
7
+ file="./$file"
8
+ fi
9
+
10
+ line_number=108
11
+ original_line="if ((0, _utils.debugMode)() === 'console') await this.extendInjectedScript(consoleApiSource.source);"
12
+ fixed_line="await this.extendInjectedScript(consoleApiSource.source);"
13
+
14
+
15
+ if [ "$1" == "off" ]; then
16
+ new_line=" $original_line"
17
+ else
18
+ new_line=" $fixed_line"
19
+ fi
20
+
21
+
22
+ # use sed to change the line
23
+ # The exact syntax of the sed command depends on the OS unfortunately - specifically the -i parameter differs on linux v.s. mac
24
+ if [ "$(uname)" == "Darwin" ]; then
25
+ sed -i .bak "${line_number}s/.*/${new_line}/" $file
26
+ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
27
+ sed -i "${line_number}s/.*/${new_line}/" $file
28
+ fi