@checksum-ai/runtime 1.0.45 → 1.0.47
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/checksum-root/example.checksum.spec.ts +1 -1
- package/cli.js +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { init, IChecksumPage } from "@checksum-ai/runtime";
|
|
|
4
4
|
|
|
5
5
|
const { test, defineChecksumTest, login } = init(base);
|
|
6
6
|
|
|
7
|
-
test.describe("
|
|
7
|
+
test.describe("Example test", () => {
|
|
8
8
|
test.beforeEach(async ({ page }: { page: IChecksumPage }) => {
|
|
9
9
|
await login(page);
|
|
10
10
|
});
|
package/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ show-report [options] [report] show HTML report
|
|
|
10
10
|
`);break;case"test":try{let e="npx playwright test --help",s=(await this.getCmdOutput(e)).replace(/npx playwright/g,"yarn checksum").split(`
|
|
11
11
|
`);s.splice(5,0," --checksum-config=<config> Checksum configuration in JSON format").join(`
|
|
12
12
|
`),console.log(s.join(`
|
|
13
|
-
`))}catch(e){console.log("Error",e.message)}break;case"show-report":try{let e="npx playwright show-report --help",s=(await this.getCmdOutput(e)).replace(/npx playwright/g,"yarn checksum");console.log(s)}catch(e){console.log("Error",e.message)}break}}async showReport(t){let e=`npx playwright show-report ${t.join(" ")}`;try{await this.execCmd(e)}catch(s){console.log("Error showing report",s.message)}}async test(t){if(this.processChecksumArguments(t),this.setChecksumConfig(),!await this.getSession())return;let e;try{e=await this.guardReturn(this.startTestRunMonitor(this.testSession),1e4,"test run monitor timeout")}catch{console.log("Error starting test run monitor. Test results will not be available on checksum.")}this.buildVolatileConfig();let s=`${e?`CHECKSUM_UPLOAD_AGENT_PORT=${e} `:""}${this.config.options.hostReports?" PW_TEST_HTML_REPORT_OPEN=never":""} npx playwright test --config ${this.getPlaywrightConfigFile()} ${t.join(" ")}`;await this.patchPlaywright();try{await this.execCmd(s),console.log("Tests execution finished")}catch(o){this.didFail=!0,console.log("Error during test",o.message)}finally{this.sendReportUploadRequest(),await this.patchPlaywright(!0),this.completeIndicators.tests=!0,await this.handleCompleteMessage()}}sendReportUploadRequest(){this.isolationMode||console.log("Waiting for test files to upload to Checksum..");let t=this.getPlaywrightReportPath();if(!(0,i.existsSync)(t)){console.log(`Could not find report file at ${t}`);return}this.testRunMonitorProcess.stdin.write(`cli:report=${t}`)}async patchPlaywright(t=!1){let e=`bash ${(0,r.join)(__dirname,"scripts/patch.sh")}${t?" off":""}`;try{await this.execCmd(e)}catch(s){console.log("Error patching playwright",s.message)}}getPlaywrightReportPath(){var o,a;let t=(0,r.join)(process.cwd(),"playwright-report"),e=require(this.getPlaywrightConfigFile()),{reporter:s}=e;return s instanceof Array&&s.length>1&&((o=s[1])!=null&&o.outputFolder)&&(t=(a=s[1])==null?void 0:a.outputFolder),process.env.PLAYWRIGHT_HTML_REPORT&&(t=process.env.PLAYWRIGHT_HTML_REPORT),(0,r.join)(t,"index.html")}getPlaywrightConfigFile(){return(0,r.join)(this.getRootDirPath(),"playwright.config.ts")}startTestRunMonitor(t){return new Promise(e=>{console.log("Starting test run monitor"),this.testRunMonitorProcess=l.spawn("node",[this.TEST_RUN_MONITOR_PATH,JSON.stringify({sessionId:t,checksumApiURL:this.CHECKSUM_API_URL,apiKey:this.config.apiKey}),...this.isolationMode?["isolated"]:[]]),this.testRunMonitorProcess.stdout.on("data",s=>{var p,m;let o=s.toString().trim();if(!o.startsWith("monitor")){(m=(p=this.config)==null?void 0:p.options)!=null&&m.printLogs&&console.log(`Message from test run monitor: ${o}`);return}let[a,c]=o.substring(o.indexOf(":")+1).split("=");a==="port"?e(c):this.handleTestRunMonitorMessage(a,c)}),this.testRunMonitorProcess.on("exit",(s,o)=>{console.log(`test run monitor process exited with code ${s} and signal ${o}`)}),this.testRunMonitorProcess.on("error",s=>{console.error(`Error starting test run monitor: ${s.message}`)})})}async handleTestRunMonitorMessage(t,e){switch(t){case"complete":this.isolationMode||console.log("Test files uploaded successfully"),this.sendUploadsComplete().then(()=>{this.completeIndicators.upload=!0});break;case"report-uploaded":{if(this.isolationMode){this.completeIndicators.report=!0;break}console.log("Report generated and uploaded to Checksum");let s={};try{s=JSON.parse(e)}catch(o){console.log("Error parsing stats",o.message)}await this.sendTestRunEnd(s),this.completeIndicators.report=!0,console.log(`*******************
|
|
13
|
+
`))}catch(e){console.log("Error",e.message)}break;case"show-report":try{let e="npx playwright show-report --help",s=(await this.getCmdOutput(e)).replace(/npx playwright/g,"yarn checksum");console.log(s)}catch(e){console.log("Error",e.message)}break}}async showReport(t){let e=`npx playwright show-report ${t.join(" ")}`;try{await this.execCmd(e)}catch(s){console.log("Error showing report",s.message)}}async test(t){if(this.processChecksumArguments(t),this.setChecksumConfig(),!await this.getSession())return;let e;try{e=await this.guardReturn(this.startTestRunMonitor(this.testSession),1e4,"test run monitor timeout")}catch{console.log("Error starting test run monitor. Test results will not be available on checksum.")}this.buildVolatileConfig();let s=`${e?`CHECKSUM_UPLOAD_AGENT_PORT=${e} `:""}${this.config.options.hostReports?" PW_TEST_HTML_REPORT_OPEN=never":""} npx playwright test --config ${this.getPlaywrightConfigFile()} ${t.map(o=>`"${o}"`).join(" ")}`;await this.patchPlaywright();try{await this.execCmd(s),console.log("Tests execution finished")}catch(o){this.didFail=!0,console.log("Error during test",o.message)}finally{this.sendReportUploadRequest(),await this.patchPlaywright(!0),this.completeIndicators.tests=!0,await this.handleCompleteMessage()}}sendReportUploadRequest(){this.isolationMode||console.log("Waiting for test files to upload to Checksum..");let t=this.getPlaywrightReportPath();if(!(0,i.existsSync)(t)){console.log(`Could not find report file at ${t}`);return}this.testRunMonitorProcess.stdin.write(`cli:report=${t}`)}async patchPlaywright(t=!1){let e=`bash ${(0,r.join)(__dirname,"scripts/patch.sh")}${t?" off":""}`;try{await this.execCmd(e)}catch(s){console.log("Error patching playwright",s.message)}}getPlaywrightReportPath(){var o,a;let t=(0,r.join)(process.cwd(),"playwright-report"),e=require(this.getPlaywrightConfigFile()),{reporter:s}=e;return s instanceof Array&&s.length>1&&((o=s[1])!=null&&o.outputFolder)&&(t=(a=s[1])==null?void 0:a.outputFolder),process.env.PLAYWRIGHT_HTML_REPORT&&(t=process.env.PLAYWRIGHT_HTML_REPORT),(0,r.join)(t,"index.html")}getPlaywrightConfigFile(){return(0,r.join)(this.getRootDirPath(),"playwright.config.ts")}startTestRunMonitor(t){return new Promise(e=>{console.log("Starting test run monitor"),this.testRunMonitorProcess=l.spawn("node",[this.TEST_RUN_MONITOR_PATH,JSON.stringify({sessionId:t,checksumApiURL:this.CHECKSUM_API_URL,apiKey:this.config.apiKey}),...this.isolationMode?["isolated"]:[]]),this.testRunMonitorProcess.stdout.on("data",s=>{var p,m;let o=s.toString().trim();if(!o.startsWith("monitor")){(m=(p=this.config)==null?void 0:p.options)!=null&&m.printLogs&&console.log(`Message from test run monitor: ${o}`);return}let[a,c]=o.substring(o.indexOf(":")+1).split("=");a==="port"?e(c):this.handleTestRunMonitorMessage(a,c)}),this.testRunMonitorProcess.on("exit",(s,o)=>{console.log(`test run monitor process exited with code ${s} and signal ${o}`)}),this.testRunMonitorProcess.on("error",s=>{console.error(`Error starting test run monitor: ${s.message}`)})})}async handleTestRunMonitorMessage(t,e){switch(t){case"complete":this.isolationMode||console.log("Test files uploaded successfully"),this.sendUploadsComplete().then(()=>{this.completeIndicators.upload=!0});break;case"report-uploaded":{if(this.isolationMode){this.completeIndicators.report=!0;break}console.log("Report generated and uploaded to Checksum");let s={};try{s=JSON.parse(e)}catch(o){console.log("Error parsing stats",o.message)}await this.sendTestRunEnd(s),this.completeIndicators.report=!0,console.log(`*******************
|
|
14
14
|
* Checksum report URL: ${this.CHECKSUM_APP_URL}/#/test-runs/${this.testSession}
|
|
15
15
|
*******************`);break}default:console.warn(`Unhandled test run monitor message: ${t}=${e}`)}}async handleCompleteMessage(){for(;;)Object.keys(this.completeIndicators).find(t=>!this.completeIndicators[t])?await this.awaitSleep(1e3):(console.log("Checksum test run complete"),this.shutdown(this.didFail?1:0))}shutdown(t=0){this.cleanup(),process.exit(t)}buildVolatileConfig(){if(!this.volatileChecksumConfig)return;let t=this.getVolatileConfigPath(),e=`
|
|
16
16
|
import { RunMode, getChecksumConfig } from "@checksum-ai/runtime";
|
package/index.js
CHANGED
|
@@ -268,8 +268,8 @@ m2: `).concat(this.mapper2.__debugToString().split(`
|
|
|
268
268
|
`,P+=De.classification+`
|
|
269
269
|
`}return P+=k.finalLexState,P},R}(B),te=function(w){Sh(R,w);function R(m,S,C){var k=w.call(this,m)||this;return k.logger=S,k.host=C,k.logPerformance=!1,k}return r(R,"CoreServicesShimObject"),R.prototype.forwardJSONCall=function(m,S){return b(this.logger,m,S,this.logPerformance)},R.prototype.resolveModuleName=function(m,S,C){var k=this;return this.forwardJSONCall("resolveModuleName('".concat(m,"')"),function(){var P=JSON.parse(C),N=e.resolveModuleName(S,e.normalizeSlashes(m),P,k.host),ge=N.resolvedModule?N.resolvedModule.resolvedFileName:void 0;return N.resolvedModule&&N.resolvedModule.extension!==".ts"&&N.resolvedModule.extension!==".tsx"&&N.resolvedModule.extension!==".d.ts"&&(ge=void 0),{resolvedFileName:ge,failedLookupLocations:N.failedLookupLocations,affectingLocations:N.affectingLocations}})},R.prototype.resolveTypeReferenceDirective=function(m,S,C){var k=this;return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(m,")"),function(){var P=JSON.parse(C),N=e.resolveTypeReferenceDirective(S,e.normalizeSlashes(m),P,k.host);return{resolvedFileName:N.resolvedTypeReferenceDirective?N.resolvedTypeReferenceDirective.resolvedFileName:void 0,primary:N.resolvedTypeReferenceDirective?N.resolvedTypeReferenceDirective.primary:!0,failedLookupLocations:N.failedLookupLocations}})},R.prototype.getPreProcessedFileInfo=function(m,S){var C=this;return this.forwardJSONCall("getPreProcessedFileInfo('".concat(m,"')"),function(){var k=e.preProcessFile(e.getSnapshotText(S),!0,!0);return{referencedFiles:C.convertFileReferences(k.referencedFiles),importedFiles:C.convertFileReferences(k.importedFiles),ambientExternalModules:k.ambientExternalModules,isLibFile:k.isLibFile,typeReferenceDirectives:C.convertFileReferences(k.typeReferenceDirectives),libReferenceDirectives:C.convertFileReferences(k.libReferenceDirectives)}})},R.prototype.getAutomaticTypeDirectiveNames=function(m){var S=this;return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(m,"')"),function(){var C=JSON.parse(m);return e.getAutomaticTypeDirectiveNames(C,S.host)})},R.prototype.convertFileReferences=function(m){if(m){for(var S=[],C=0,k=m;C<k.length;C++){var P=k[C];S.push({path:e.normalizeSlashes(P.fileName),position:P.pos,length:P.end-P.pos})}return S}},R.prototype.getTSConfigFileInfo=function(m,S){var C=this;return this.forwardJSONCall("getTSConfigFileInfo('".concat(m,"')"),function(){var k=e.parseJsonText(m,e.getSnapshotText(S)),P=e.normalizeSlashes(m),N=e.parseJsonSourceFileConfigFileContent(k,C.host,e.getDirectoryPath(P),{},P);return{options:N.options,typeAcquisition:N.typeAcquisition,files:N.fileNames,raw:N.raw,errors:g(Hn(Hn([],k.parseDiagnostics,!0),N.errors,!0),`\r
|
|
270
270
|
`)}})},R.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},R.prototype.discoverTypings=function(m){var S=this,C=e.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var k=JSON.parse(m);return S.safeList===void 0&&(S.safeList=e.JsTyping.loadSafeList(S.host,e.toPath(k.safeListPath,k.safeListPath,C))),e.JsTyping.discoverTypings(S.host,function(P){return S.logger.log(P)},k.fileNames,e.toPath(k.projectRootPath,k.projectRootPath,C),S.safeList,k.packageNameToTypingLocation,k.typeAcquisition,k.unresolvedImports,k.typesRegistry,e.emptyOptions)})},R}(B),le=function(){function w(){this._shims=[]}return r(w,"TypeScriptServicesFactory"),w.prototype.getServicesVersion=function(){return e.servicesVersion},w.prototype.createLanguageServiceShim=function(R){try{this.documentRegistry===void 0&&(this.documentRegistry=e.createDocumentRegistry(R.useCaseSensitiveFileNames&&R.useCaseSensitiveFileNames(),R.getCurrentDirectory()));var m=new l(R),S=e.createLanguageService(m,this.documentRegistry,!1);return new fe(this,R,S)}catch(C){throw t(R,C),C}},w.prototype.createClassifierShim=function(R){try{return new Z(this,R)}catch(m){throw t(R,m),m}},w.prototype.createCoreServicesShim=function(R){try{var m=new v(R);return new te(this,R,m)}catch(S){throw t(R,S),S}},w.prototype.close=function(){e.clear(this._shims),this.documentRegistry=void 0},w.prototype.registerShim=function(R){this._shims.push(R)},w.prototype.unregisterShim=function(R){for(var m=0;m<this._shims.length;m++)if(this._shims[m]===R){delete this._shims[m];return}throw new Error("Invalid operation")},w}();e.TypeScriptServicesFactory=le})(_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 s2<"u"&&s2.exports&&(s2.exports=_r);var _r;(function(e){function t(v,p,b,J){if(Object.defineProperty(Z,"name",Ri(Ri({},Object.getOwnPropertyDescriptor(Z,"name")),{value:v})),J)for(var B=0,g=Object.keys(J);B<g.length;B++){var h=g[B],fe=+h;!isNaN(fe)&&e.hasProperty(p,"".concat(fe))&&(p[fe]=e.Debug.deprecate(p[fe],Ri(Ri({},J[fe]),{name:v})))}var ce=c(p,b);return Z;function Z(){for(var te=[],le=0;le<arguments.length;le++)te[le]=arguments[le];var w=ce(te),R=w!==void 0?p[w]:void 0;if(typeof R=="function")return R.apply(void 0,te);throw new TypeError("Invalid arguments")}}r(t,"createOverload"),e.createOverload=t;function c(v,p){return function(b){for(var J=0;e.hasProperty(v,"".concat(J))&&e.hasProperty(p,"".concat(J));J++){var B=p[J];if(B(b))return J}}}r(c,"createBinder");function l(v){return{overload:function(p){return{bind:function(b){return{finish:function(){return t(v,p,b)},deprecate:function(J){return{finish:function(){return t(v,p,b,J)}}}}}}}}}r(l,"buildOverload"),e.buildOverload=l})(_r||(_r={}));var _r;(function(e){var t={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,t),e.createNumericLiteral=e.Debug.deprecate(e.factory.createNumericLiteral,t),e.createBigIntLiteral=e.Debug.deprecate(e.factory.createBigIntLiteral,t),e.createStringLiteral=e.Debug.deprecate(e.factory.createStringLiteral,t),e.createStringLiteralFromNode=e.Debug.deprecate(e.factory.createStringLiteralFromNode,t),e.createRegularExpressionLiteral=e.Debug.deprecate(e.factory.createRegularExpressionLiteral,t),e.createLoopVariable=e.Debug.deprecate(e.factory.createLoopVariable,t),e.createUniqueName=e.Debug.deprecate(e.factory.createUniqueName,t),e.createPrivateIdentifier=e.Debug.deprecate(e.factory.createPrivateIdentifier,t),e.createSuper=e.Debug.deprecate(e.factory.createSuper,t),e.createThis=e.Debug.deprecate(e.factory.createThis,t),e.createNull=e.Debug.deprecate(e.factory.createNull,t),e.createTrue=e.Debug.deprecate(e.factory.createTrue,t),e.createFalse=e.Debug.deprecate(e.factory.createFalse,t),e.createModifier=e.Debug.deprecate(e.factory.createModifier,t),e.createModifiersFromModifierFlags=e.Debug.deprecate(e.factory.createModifiersFromModifierFlags,t),e.createQualifiedName=e.Debug.deprecate(e.factory.createQualifiedName,t),e.updateQualifiedName=e.Debug.deprecate(e.factory.updateQualifiedName,t),e.createComputedPropertyName=e.Debug.deprecate(e.factory.createComputedPropertyName,t),e.updateComputedPropertyName=e.Debug.deprecate(e.factory.updateComputedPropertyName,t),e.createTypeParameterDeclaration=e.Debug.deprecate(e.factory.createTypeParameterDeclaration,t),e.updateTypeParameterDeclaration=e.Debug.deprecate(e.factory.updateTypeParameterDeclaration,t),e.createParameter=e.Debug.deprecate(e.factory.createParameterDeclaration,t),e.updateParameter=e.Debug.deprecate(e.factory.updateParameterDeclaration,t),e.createDecorator=e.Debug.deprecate(e.factory.createDecorator,t),e.updateDecorator=e.Debug.deprecate(e.factory.updateDecorator,t),e.createProperty=e.Debug.deprecate(e.factory.createPropertyDeclaration,t),e.updateProperty=e.Debug.deprecate(e.factory.updatePropertyDeclaration,t),e.createMethod=e.Debug.deprecate(e.factory.createMethodDeclaration,t),e.updateMethod=e.Debug.deprecate(e.factory.updateMethodDeclaration,t),e.createConstructor=e.Debug.deprecate(e.factory.createConstructorDeclaration,t),e.updateConstructor=e.Debug.deprecate(e.factory.updateConstructorDeclaration,t),e.createGetAccessor=e.Debug.deprecate(e.factory.createGetAccessorDeclaration,t),e.updateGetAccessor=e.Debug.deprecate(e.factory.updateGetAccessorDeclaration,t),e.createSetAccessor=e.Debug.deprecate(e.factory.createSetAccessorDeclaration,t),e.updateSetAccessor=e.Debug.deprecate(e.factory.updateSetAccessorDeclaration,t),e.createCallSignature=e.Debug.deprecate(e.factory.createCallSignature,t),e.updateCallSignature=e.Debug.deprecate(e.factory.updateCallSignature,t),e.createConstructSignature=e.Debug.deprecate(e.factory.createConstructSignature,t),e.updateConstructSignature=e.Debug.deprecate(e.factory.updateConstructSignature,t),e.updateIndexSignature=e.Debug.deprecate(e.factory.updateIndexSignature,t),e.createKeywordTypeNode=e.Debug.deprecate(e.factory.createKeywordTypeNode,t),e.createTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.createTypePredicateNode,t),e.updateTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.updateTypePredicateNode,t),e.createTypeReferenceNode=e.Debug.deprecate(e.factory.createTypeReferenceNode,t),e.updateTypeReferenceNode=e.Debug.deprecate(e.factory.updateTypeReferenceNode,t),e.createFunctionTypeNode=e.Debug.deprecate(e.factory.createFunctionTypeNode,t),e.updateFunctionTypeNode=e.Debug.deprecate(e.factory.updateFunctionTypeNode,t),e.createConstructorTypeNode=e.Debug.deprecate(function(c,l,v){return e.factory.createConstructorTypeNode(void 0,c,l,v)},t),e.updateConstructorTypeNode=e.Debug.deprecate(function(c,l,v,p){return e.factory.updateConstructorTypeNode(c,c.modifiers,l,v,p)},t),e.createTypeQueryNode=e.Debug.deprecate(e.factory.createTypeQueryNode,t),e.updateTypeQueryNode=e.Debug.deprecate(e.factory.updateTypeQueryNode,t),e.createTypeLiteralNode=e.Debug.deprecate(e.factory.createTypeLiteralNode,t),e.updateTypeLiteralNode=e.Debug.deprecate(e.factory.updateTypeLiteralNode,t),e.createArrayTypeNode=e.Debug.deprecate(e.factory.createArrayTypeNode,t),e.updateArrayTypeNode=e.Debug.deprecate(e.factory.updateArrayTypeNode,t),e.createTupleTypeNode=e.Debug.deprecate(e.factory.createTupleTypeNode,t),e.updateTupleTypeNode=e.Debug.deprecate(e.factory.updateTupleTypeNode,t),e.createOptionalTypeNode=e.Debug.deprecate(e.factory.createOptionalTypeNode,t),e.updateOptionalTypeNode=e.Debug.deprecate(e.factory.updateOptionalTypeNode,t),e.createRestTypeNode=e.Debug.deprecate(e.factory.createRestTypeNode,t),e.updateRestTypeNode=e.Debug.deprecate(e.factory.updateRestTypeNode,t),e.createUnionTypeNode=e.Debug.deprecate(e.factory.createUnionTypeNode,t),e.updateUnionTypeNode=e.Debug.deprecate(e.factory.updateUnionTypeNode,t),e.createIntersectionTypeNode=e.Debug.deprecate(e.factory.createIntersectionTypeNode,t),e.updateIntersectionTypeNode=e.Debug.deprecate(e.factory.updateIntersectionTypeNode,t),e.createConditionalTypeNode=e.Debug.deprecate(e.factory.createConditionalTypeNode,t),e.updateConditionalTypeNode=e.Debug.deprecate(e.factory.updateConditionalTypeNode,t),e.createInferTypeNode=e.Debug.deprecate(e.factory.createInferTypeNode,t),e.updateInferTypeNode=e.Debug.deprecate(e.factory.updateInferTypeNode,t),e.createImportTypeNode=e.Debug.deprecate(e.factory.createImportTypeNode,t),e.updateImportTypeNode=e.Debug.deprecate(e.factory.updateImportTypeNode,t),e.createParenthesizedType=e.Debug.deprecate(e.factory.createParenthesizedType,t),e.updateParenthesizedType=e.Debug.deprecate(e.factory.updateParenthesizedType,t),e.createThisTypeNode=e.Debug.deprecate(e.factory.createThisTypeNode,t),e.updateTypeOperatorNode=e.Debug.deprecate(e.factory.updateTypeOperatorNode,t),e.createIndexedAccessTypeNode=e.Debug.deprecate(e.factory.createIndexedAccessTypeNode,t),e.updateIndexedAccessTypeNode=e.Debug.deprecate(e.factory.updateIndexedAccessTypeNode,t),e.createMappedTypeNode=e.Debug.deprecate(e.factory.createMappedTypeNode,t),e.updateMappedTypeNode=e.Debug.deprecate(e.factory.updateMappedTypeNode,t),e.createLiteralTypeNode=e.Debug.deprecate(e.factory.createLiteralTypeNode,t),e.updateLiteralTypeNode=e.Debug.deprecate(e.factory.updateLiteralTypeNode,t),e.createObjectBindingPattern=e.Debug.deprecate(e.factory.createObjectBindingPattern,t),e.updateObjectBindingPattern=e.Debug.deprecate(e.factory.updateObjectBindingPattern,t),e.createArrayBindingPattern=e.Debug.deprecate(e.factory.createArrayBindingPattern,t),e.updateArrayBindingPattern=e.Debug.deprecate(e.factory.updateArrayBindingPattern,t),e.createBindingElement=e.Debug.deprecate(e.factory.createBindingElement,t),e.updateBindingElement=e.Debug.deprecate(e.factory.updateBindingElement,t),e.createArrayLiteral=e.Debug.deprecate(e.factory.createArrayLiteralExpression,t),e.updateArrayLiteral=e.Debug.deprecate(e.factory.updateArrayLiteralExpression,t),e.createObjectLiteral=e.Debug.deprecate(e.factory.createObjectLiteralExpression,t),e.updateObjectLiteral=e.Debug.deprecate(e.factory.updateObjectLiteralExpression,t),e.createPropertyAccess=e.Debug.deprecate(e.factory.createPropertyAccessExpression,t),e.updatePropertyAccess=e.Debug.deprecate(e.factory.updatePropertyAccessExpression,t),e.createPropertyAccessChain=e.Debug.deprecate(e.factory.createPropertyAccessChain,t),e.updatePropertyAccessChain=e.Debug.deprecate(e.factory.updatePropertyAccessChain,t),e.createElementAccess=e.Debug.deprecate(e.factory.createElementAccessExpression,t),e.updateElementAccess=e.Debug.deprecate(e.factory.updateElementAccessExpression,t),e.createElementAccessChain=e.Debug.deprecate(e.factory.createElementAccessChain,t),e.updateElementAccessChain=e.Debug.deprecate(e.factory.updateElementAccessChain,t),e.createCall=e.Debug.deprecate(e.factory.createCallExpression,t),e.updateCall=e.Debug.deprecate(e.factory.updateCallExpression,t),e.createCallChain=e.Debug.deprecate(e.factory.createCallChain,t),e.updateCallChain=e.Debug.deprecate(e.factory.updateCallChain,t),e.createNew=e.Debug.deprecate(e.factory.createNewExpression,t),e.updateNew=e.Debug.deprecate(e.factory.updateNewExpression,t),e.createTypeAssertion=e.Debug.deprecate(e.factory.createTypeAssertion,t),e.updateTypeAssertion=e.Debug.deprecate(e.factory.updateTypeAssertion,t),e.createParen=e.Debug.deprecate(e.factory.createParenthesizedExpression,t),e.updateParen=e.Debug.deprecate(e.factory.updateParenthesizedExpression,t),e.createFunctionExpression=e.Debug.deprecate(e.factory.createFunctionExpression,t),e.updateFunctionExpression=e.Debug.deprecate(e.factory.updateFunctionExpression,t),e.createDelete=e.Debug.deprecate(e.factory.createDeleteExpression,t),e.updateDelete=e.Debug.deprecate(e.factory.updateDeleteExpression,t),e.createTypeOf=e.Debug.deprecate(e.factory.createTypeOfExpression,t),e.updateTypeOf=e.Debug.deprecate(e.factory.updateTypeOfExpression,t),e.createVoid=e.Debug.deprecate(e.factory.createVoidExpression,t),e.updateVoid=e.Debug.deprecate(e.factory.updateVoidExpression,t),e.createAwait=e.Debug.deprecate(e.factory.createAwaitExpression,t),e.updateAwait=e.Debug.deprecate(e.factory.updateAwaitExpression,t),e.createPrefix=e.Debug.deprecate(e.factory.createPrefixUnaryExpression,t),e.updatePrefix=e.Debug.deprecate(e.factory.updatePrefixUnaryExpression,t),e.createPostfix=e.Debug.deprecate(e.factory.createPostfixUnaryExpression,t),e.updatePostfix=e.Debug.deprecate(e.factory.updatePostfixUnaryExpression,t),e.createBinary=e.Debug.deprecate(e.factory.createBinaryExpression,t),e.updateConditional=e.Debug.deprecate(e.factory.updateConditionalExpression,t),e.createTemplateExpression=e.Debug.deprecate(e.factory.createTemplateExpression,t),e.updateTemplateExpression=e.Debug.deprecate(e.factory.updateTemplateExpression,t),e.createTemplateHead=e.Debug.deprecate(e.factory.createTemplateHead,t),e.createTemplateMiddle=e.Debug.deprecate(e.factory.createTemplateMiddle,t),e.createTemplateTail=e.Debug.deprecate(e.factory.createTemplateTail,t),e.createNoSubstitutionTemplateLiteral=e.Debug.deprecate(e.factory.createNoSubstitutionTemplateLiteral,t),e.updateYield=e.Debug.deprecate(e.factory.updateYieldExpression,t),e.createSpread=e.Debug.deprecate(e.factory.createSpreadElement,t),e.updateSpread=e.Debug.deprecate(e.factory.updateSpreadElement,t),e.createOmittedExpression=e.Debug.deprecate(e.factory.createOmittedExpression,t),e.createAsExpression=e.Debug.deprecate(e.factory.createAsExpression,t),e.updateAsExpression=e.Debug.deprecate(e.factory.updateAsExpression,t),e.createNonNullExpression=e.Debug.deprecate(e.factory.createNonNullExpression,t),e.updateNonNullExpression=e.Debug.deprecate(e.factory.updateNonNullExpression,t),e.createNonNullChain=e.Debug.deprecate(e.factory.createNonNullChain,t),e.updateNonNullChain=e.Debug.deprecate(e.factory.updateNonNullChain,t),e.createMetaProperty=e.Debug.deprecate(e.factory.createMetaProperty,t),e.updateMetaProperty=e.Debug.deprecate(e.factory.updateMetaProperty,t),e.createTemplateSpan=e.Debug.deprecate(e.factory.createTemplateSpan,t),e.updateTemplateSpan=e.Debug.deprecate(e.factory.updateTemplateSpan,t),e.createSemicolonClassElement=e.Debug.deprecate(e.factory.createSemicolonClassElement,t),e.createBlock=e.Debug.deprecate(e.factory.createBlock,t),e.updateBlock=e.Debug.deprecate(e.factory.updateBlock,t),e.createVariableStatement=e.Debug.deprecate(e.factory.createVariableStatement,t),e.updateVariableStatement=e.Debug.deprecate(e.factory.updateVariableStatement,t),e.createEmptyStatement=e.Debug.deprecate(e.factory.createEmptyStatement,t),e.createExpressionStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateExpressionStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createIf=e.Debug.deprecate(e.factory.createIfStatement,t),e.updateIf=e.Debug.deprecate(e.factory.updateIfStatement,t),e.createDo=e.Debug.deprecate(e.factory.createDoStatement,t),e.updateDo=e.Debug.deprecate(e.factory.updateDoStatement,t),e.createWhile=e.Debug.deprecate(e.factory.createWhileStatement,t),e.updateWhile=e.Debug.deprecate(e.factory.updateWhileStatement,t),e.createFor=e.Debug.deprecate(e.factory.createForStatement,t),e.updateFor=e.Debug.deprecate(e.factory.updateForStatement,t),e.createForIn=e.Debug.deprecate(e.factory.createForInStatement,t),e.updateForIn=e.Debug.deprecate(e.factory.updateForInStatement,t),e.createForOf=e.Debug.deprecate(e.factory.createForOfStatement,t),e.updateForOf=e.Debug.deprecate(e.factory.updateForOfStatement,t),e.createContinue=e.Debug.deprecate(e.factory.createContinueStatement,t),e.updateContinue=e.Debug.deprecate(e.factory.updateContinueStatement,t),e.createBreak=e.Debug.deprecate(e.factory.createBreakStatement,t),e.updateBreak=e.Debug.deprecate(e.factory.updateBreakStatement,t),e.createReturn=e.Debug.deprecate(e.factory.createReturnStatement,t),e.updateReturn=e.Debug.deprecate(e.factory.updateReturnStatement,t),e.createWith=e.Debug.deprecate(e.factory.createWithStatement,t),e.updateWith=e.Debug.deprecate(e.factory.updateWithStatement,t),e.createSwitch=e.Debug.deprecate(e.factory.createSwitchStatement,t),e.updateSwitch=e.Debug.deprecate(e.factory.updateSwitchStatement,t),e.createLabel=e.Debug.deprecate(e.factory.createLabeledStatement,t),e.updateLabel=e.Debug.deprecate(e.factory.updateLabeledStatement,t),e.createThrow=e.Debug.deprecate(e.factory.createThrowStatement,t),e.updateThrow=e.Debug.deprecate(e.factory.updateThrowStatement,t),e.createTry=e.Debug.deprecate(e.factory.createTryStatement,t),e.updateTry=e.Debug.deprecate(e.factory.updateTryStatement,t),e.createDebuggerStatement=e.Debug.deprecate(e.factory.createDebuggerStatement,t),e.createVariableDeclarationList=e.Debug.deprecate(e.factory.createVariableDeclarationList,t),e.updateVariableDeclarationList=e.Debug.deprecate(e.factory.updateVariableDeclarationList,t),e.createFunctionDeclaration=e.Debug.deprecate(e.factory.createFunctionDeclaration,t),e.updateFunctionDeclaration=e.Debug.deprecate(e.factory.updateFunctionDeclaration,t),e.createClassDeclaration=e.Debug.deprecate(e.factory.createClassDeclaration,t),e.updateClassDeclaration=e.Debug.deprecate(e.factory.updateClassDeclaration,t),e.createInterfaceDeclaration=e.Debug.deprecate(e.factory.createInterfaceDeclaration,t),e.updateInterfaceDeclaration=e.Debug.deprecate(e.factory.updateInterfaceDeclaration,t),e.createTypeAliasDeclaration=e.Debug.deprecate(e.factory.createTypeAliasDeclaration,t),e.updateTypeAliasDeclaration=e.Debug.deprecate(e.factory.updateTypeAliasDeclaration,t),e.createEnumDeclaration=e.Debug.deprecate(e.factory.createEnumDeclaration,t),e.updateEnumDeclaration=e.Debug.deprecate(e.factory.updateEnumDeclaration,t),e.createModuleDeclaration=e.Debug.deprecate(e.factory.createModuleDeclaration,t),e.updateModuleDeclaration=e.Debug.deprecate(e.factory.updateModuleDeclaration,t),e.createModuleBlock=e.Debug.deprecate(e.factory.createModuleBlock,t),e.updateModuleBlock=e.Debug.deprecate(e.factory.updateModuleBlock,t),e.createCaseBlock=e.Debug.deprecate(e.factory.createCaseBlock,t),e.updateCaseBlock=e.Debug.deprecate(e.factory.updateCaseBlock,t),e.createNamespaceExportDeclaration=e.Debug.deprecate(e.factory.createNamespaceExportDeclaration,t),e.updateNamespaceExportDeclaration=e.Debug.deprecate(e.factory.updateNamespaceExportDeclaration,t),e.createImportEqualsDeclaration=e.Debug.deprecate(e.factory.createImportEqualsDeclaration,t),e.updateImportEqualsDeclaration=e.Debug.deprecate(e.factory.updateImportEqualsDeclaration,t),e.createImportDeclaration=e.Debug.deprecate(e.factory.createImportDeclaration,t),e.updateImportDeclaration=e.Debug.deprecate(e.factory.updateImportDeclaration,t),e.createNamespaceImport=e.Debug.deprecate(e.factory.createNamespaceImport,t),e.updateNamespaceImport=e.Debug.deprecate(e.factory.updateNamespaceImport,t),e.createNamedImports=e.Debug.deprecate(e.factory.createNamedImports,t),e.updateNamedImports=e.Debug.deprecate(e.factory.updateNamedImports,t),e.createImportSpecifier=e.Debug.deprecate(e.factory.createImportSpecifier,t),e.updateImportSpecifier=e.Debug.deprecate(e.factory.updateImportSpecifier,t),e.createExportAssignment=e.Debug.deprecate(e.factory.createExportAssignment,t),e.updateExportAssignment=e.Debug.deprecate(e.factory.updateExportAssignment,t),e.createNamedExports=e.Debug.deprecate(e.factory.createNamedExports,t),e.updateNamedExports=e.Debug.deprecate(e.factory.updateNamedExports,t),e.createExportSpecifier=e.Debug.deprecate(e.factory.createExportSpecifier,t),e.updateExportSpecifier=e.Debug.deprecate(e.factory.updateExportSpecifier,t),e.createExternalModuleReference=e.Debug.deprecate(e.factory.createExternalModuleReference,t),e.updateExternalModuleReference=e.Debug.deprecate(e.factory.updateExternalModuleReference,t),e.createJSDocTypeExpression=e.Debug.deprecate(e.factory.createJSDocTypeExpression,t),e.createJSDocTypeTag=e.Debug.deprecate(e.factory.createJSDocTypeTag,t),e.createJSDocReturnTag=e.Debug.deprecate(e.factory.createJSDocReturnTag,t),e.createJSDocThisTag=e.Debug.deprecate(e.factory.createJSDocThisTag,t),e.createJSDocComment=e.Debug.deprecate(e.factory.createJSDocComment,t),e.createJSDocParameterTag=e.Debug.deprecate(e.factory.createJSDocParameterTag,t),e.createJSDocClassTag=e.Debug.deprecate(e.factory.createJSDocClassTag,t),e.createJSDocAugmentsTag=e.Debug.deprecate(e.factory.createJSDocAugmentsTag,t),e.createJSDocEnumTag=e.Debug.deprecate(e.factory.createJSDocEnumTag,t),e.createJSDocTemplateTag=e.Debug.deprecate(e.factory.createJSDocTemplateTag,t),e.createJSDocTypedefTag=e.Debug.deprecate(e.factory.createJSDocTypedefTag,t),e.createJSDocCallbackTag=e.Debug.deprecate(e.factory.createJSDocCallbackTag,t),e.createJSDocSignature=e.Debug.deprecate(e.factory.createJSDocSignature,t),e.createJSDocPropertyTag=e.Debug.deprecate(e.factory.createJSDocPropertyTag,t),e.createJSDocTypeLiteral=e.Debug.deprecate(e.factory.createJSDocTypeLiteral,t),e.createJSDocImplementsTag=e.Debug.deprecate(e.factory.createJSDocImplementsTag,t),e.createJSDocAuthorTag=e.Debug.deprecate(e.factory.createJSDocAuthorTag,t),e.createJSDocPublicTag=e.Debug.deprecate(e.factory.createJSDocPublicTag,t),e.createJSDocPrivateTag=e.Debug.deprecate(e.factory.createJSDocPrivateTag,t),e.createJSDocProtectedTag=e.Debug.deprecate(e.factory.createJSDocProtectedTag,t),e.createJSDocReadonlyTag=e.Debug.deprecate(e.factory.createJSDocReadonlyTag,t),e.createJSDocTag=e.Debug.deprecate(e.factory.createJSDocUnknownTag,t),e.createJsxElement=e.Debug.deprecate(e.factory.createJsxElement,t),e.updateJsxElement=e.Debug.deprecate(e.factory.updateJsxElement,t),e.createJsxSelfClosingElement=e.Debug.deprecate(e.factory.createJsxSelfClosingElement,t),e.updateJsxSelfClosingElement=e.Debug.deprecate(e.factory.updateJsxSelfClosingElement,t),e.createJsxOpeningElement=e.Debug.deprecate(e.factory.createJsxOpeningElement,t),e.updateJsxOpeningElement=e.Debug.deprecate(e.factory.updateJsxOpeningElement,t),e.createJsxClosingElement=e.Debug.deprecate(e.factory.createJsxClosingElement,t),e.updateJsxClosingElement=e.Debug.deprecate(e.factory.updateJsxClosingElement,t),e.createJsxFragment=e.Debug.deprecate(e.factory.createJsxFragment,t),e.createJsxText=e.Debug.deprecate(e.factory.createJsxText,t),e.updateJsxText=e.Debug.deprecate(e.factory.updateJsxText,t),e.createJsxOpeningFragment=e.Debug.deprecate(e.factory.createJsxOpeningFragment,t),e.createJsxJsxClosingFragment=e.Debug.deprecate(e.factory.createJsxJsxClosingFragment,t),e.updateJsxFragment=e.Debug.deprecate(e.factory.updateJsxFragment,t),e.createJsxAttribute=e.Debug.deprecate(e.factory.createJsxAttribute,t),e.updateJsxAttribute=e.Debug.deprecate(e.factory.updateJsxAttribute,t),e.createJsxAttributes=e.Debug.deprecate(e.factory.createJsxAttributes,t),e.updateJsxAttributes=e.Debug.deprecate(e.factory.updateJsxAttributes,t),e.createJsxSpreadAttribute=e.Debug.deprecate(e.factory.createJsxSpreadAttribute,t),e.updateJsxSpreadAttribute=e.Debug.deprecate(e.factory.updateJsxSpreadAttribute,t),e.createJsxExpression=e.Debug.deprecate(e.factory.createJsxExpression,t),e.updateJsxExpression=e.Debug.deprecate(e.factory.updateJsxExpression,t),e.createCaseClause=e.Debug.deprecate(e.factory.createCaseClause,t),e.updateCaseClause=e.Debug.deprecate(e.factory.updateCaseClause,t),e.createDefaultClause=e.Debug.deprecate(e.factory.createDefaultClause,t),e.updateDefaultClause=e.Debug.deprecate(e.factory.updateDefaultClause,t),e.createHeritageClause=e.Debug.deprecate(e.factory.createHeritageClause,t),e.updateHeritageClause=e.Debug.deprecate(e.factory.updateHeritageClause,t),e.createCatchClause=e.Debug.deprecate(e.factory.createCatchClause,t),e.updateCatchClause=e.Debug.deprecate(e.factory.updateCatchClause,t),e.createPropertyAssignment=e.Debug.deprecate(e.factory.createPropertyAssignment,t),e.updatePropertyAssignment=e.Debug.deprecate(e.factory.updatePropertyAssignment,t),e.createShorthandPropertyAssignment=e.Debug.deprecate(e.factory.createShorthandPropertyAssignment,t),e.updateShorthandPropertyAssignment=e.Debug.deprecate(e.factory.updateShorthandPropertyAssignment,t),e.createSpreadAssignment=e.Debug.deprecate(e.factory.createSpreadAssignment,t),e.updateSpreadAssignment=e.Debug.deprecate(e.factory.updateSpreadAssignment,t),e.createEnumMember=e.Debug.deprecate(e.factory.createEnumMember,t),e.updateEnumMember=e.Debug.deprecate(e.factory.updateEnumMember,t),e.updateSourceFileNode=e.Debug.deprecate(e.factory.updateSourceFile,t),e.createNotEmittedStatement=e.Debug.deprecate(e.factory.createNotEmittedStatement,t),e.createPartiallyEmittedExpression=e.Debug.deprecate(e.factory.createPartiallyEmittedExpression,t),e.updatePartiallyEmittedExpression=e.Debug.deprecate(e.factory.updatePartiallyEmittedExpression,t),e.createCommaList=e.Debug.deprecate(e.factory.createCommaListExpression,t),e.updateCommaList=e.Debug.deprecate(e.factory.updateCommaListExpression,t),e.createBundle=e.Debug.deprecate(e.factory.createBundle,t),e.updateBundle=e.Debug.deprecate(e.factory.updateBundle,t),e.createImmediatelyInvokedFunctionExpression=e.Debug.deprecate(e.factory.createImmediatelyInvokedFunctionExpression,t),e.createImmediatelyInvokedArrowFunction=e.Debug.deprecate(e.factory.createImmediatelyInvokedArrowFunction,t),e.createVoidZero=e.Debug.deprecate(e.factory.createVoidZero,t),e.createExportDefault=e.Debug.deprecate(e.factory.createExportDefault,t),e.createExternalModuleExport=e.Debug.deprecate(e.factory.createExternalModuleExport,t),e.createNamespaceExport=e.Debug.deprecate(e.factory.createNamespaceExport,t),e.updateNamespaceExport=e.Debug.deprecate(e.factory.updateNamespaceExport,t),e.createToken=e.Debug.deprecate(r(function(l){return e.factory.createToken(l)},"createToken"),t),e.createIdentifier=e.Debug.deprecate(r(function(l){return e.factory.createIdentifier(l,void 0,void 0)},"createIdentifier"),t),e.createTempVariable=e.Debug.deprecate(r(function(l){return e.factory.createTempVariable(l,void 0)},"createTempVariable"),t),e.getGeneratedNameForNode=e.Debug.deprecate(r(function(l){return e.factory.getGeneratedNameForNode(l,void 0)},"getGeneratedNameForNode"),t),e.createOptimisticUniqueName=e.Debug.deprecate(r(function(l){return e.factory.createUniqueName(l,16)},"createOptimisticUniqueName"),t),e.createFileLevelUniqueName=e.Debug.deprecate(r(function(l){return e.factory.createUniqueName(l,48)},"createFileLevelUniqueName"),t),e.createIndexSignature=e.Debug.deprecate(r(function(l,v,p,b){return e.factory.createIndexSignature(l,v,p,b)},"createIndexSignature"),t),e.createTypePredicateNode=e.Debug.deprecate(r(function(l,v){return e.factory.createTypePredicateNode(void 0,l,v)},"createTypePredicateNode"),t),e.updateTypePredicateNode=e.Debug.deprecate(r(function(l,v,p){return e.factory.updateTypePredicateNode(l,void 0,v,p)},"updateTypePredicateNode"),t),e.createLiteral=e.Debug.deprecate(r(function(l){return typeof l=="number"?e.factory.createNumericLiteral(l):typeof l=="object"&&"base10Value"in l?e.factory.createBigIntLiteral(l):typeof l=="boolean"?l?e.factory.createTrue():e.factory.createFalse():typeof l=="string"?e.factory.createStringLiteral(l,void 0):e.factory.createStringLiteralFromNode(l)},"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(r(function(l,v,p,b,J){return e.factory.createMethodSignature(void 0,b,J,l,v,p)},"createMethodSignature"),t),e.updateMethodSignature=e.Debug.deprecate(r(function(l,v,p,b,J,B){return e.factory.updateMethodSignature(l,l.modifiers,J,B,v,p,b)},"updateMethodSignature"),t),e.createTypeOperatorNode=e.Debug.deprecate(r(function(l,v){var p;return v?p=l:(v=l,p=141),e.factory.createTypeOperatorNode(p,v)},"createTypeOperatorNode"),t),e.createTaggedTemplate=e.Debug.deprecate(r(function(l,v,p){var b;return p?b=v:p=v,e.factory.createTaggedTemplateExpression(l,b,p)},"createTaggedTemplate"),t),e.updateTaggedTemplate=e.Debug.deprecate(r(function(l,v,p,b){var J;return b?J=p:b=p,e.factory.updateTaggedTemplateExpression(l,v,J,b)},"updateTaggedTemplate"),t),e.updateBinary=e.Debug.deprecate(r(function(l,v,p,b){return b===void 0&&(b=l.operatorToken),typeof b=="number"&&(b=b===l.operatorToken.kind?l.operatorToken:e.factory.createToken(b)),e.factory.updateBinaryExpression(l,v,b,p)},"updateBinary"),t),e.createConditional=e.Debug.deprecate(r(function(l,v,p,b,J){return arguments.length===5?e.factory.createConditionalExpression(l,v,p,b,J):arguments.length===3?e.factory.createConditionalExpression(l,e.factory.createToken(57),v,e.factory.createToken(58),p):e.Debug.fail("Argument count mismatch")},"createConditional"),t),e.createYield=e.Debug.deprecate(r(function(l,v){var p;return v?p=l:v=l,e.factory.createYieldExpression(p,v)},"createYield"),t),e.createClassExpression=e.Debug.deprecate(r(function(l,v,p,b,J){return e.factory.createClassExpression(void 0,l,v,p,b,J)},"createClassExpression"),t),e.updateClassExpression=e.Debug.deprecate(r(function(l,v,p,b,J,B){return e.factory.updateClassExpression(l,void 0,v,p,b,J,B)},"updateClassExpression"),t),e.createPropertySignature=e.Debug.deprecate(r(function(l,v,p,b,J){var B=e.factory.createPropertySignature(l,v,p,b);return B.initializer=J,B},"createPropertySignature"),t),e.updatePropertySignature=e.Debug.deprecate(r(function(l,v,p,b,J,B){var g=e.factory.updatePropertySignature(l,v,p,b,J);return l.initializer!==B&&(g===l&&(g=e.factory.cloneNode(l)),g.initializer=B),g},"updatePropertySignature"),t),e.createExpressionWithTypeArguments=e.Debug.deprecate(r(function(l,v){return e.factory.createExpressionWithTypeArguments(v,l)},"createExpressionWithTypeArguments"),t),e.updateExpressionWithTypeArguments=e.Debug.deprecate(r(function(l,v,p){return e.factory.updateExpressionWithTypeArguments(l,p,v)},"updateExpressionWithTypeArguments"),t),e.createArrowFunction=e.Debug.deprecate(r(function(l,v,p,b,J,B){return arguments.length===6?e.factory.createArrowFunction(l,v,p,b,J,B):arguments.length===5?e.factory.createArrowFunction(l,v,p,b,void 0,J):e.Debug.fail("Argument count mismatch")},"createArrowFunction"),t),e.updateArrowFunction=e.Debug.deprecate(r(function(l,v,p,b,J,B,g){return arguments.length===7?e.factory.updateArrowFunction(l,v,p,b,J,B,g):arguments.length===6?e.factory.updateArrowFunction(l,v,p,b,J,l.equalsGreaterThanToken,B):e.Debug.fail("Argument count mismatch")},"updateArrowFunction"),t),e.createVariableDeclaration=e.Debug.deprecate(r(function(l,v,p,b){return arguments.length===4?e.factory.createVariableDeclaration(l,v,p,b):arguments.length>=1&&arguments.length<=3?e.factory.createVariableDeclaration(l,void 0,v,p):e.Debug.fail("Argument count mismatch")},"createVariableDeclaration"),t),e.updateVariableDeclaration=e.Debug.deprecate(r(function(l,v,p,b,J){return arguments.length===5?e.factory.updateVariableDeclaration(l,v,p,b,J):arguments.length===4?e.factory.updateVariableDeclaration(l,v,l.exclamationToken,p,b):e.Debug.fail("Argument count mismatch")},"updateVariableDeclaration"),t),e.createImportClause=e.Debug.deprecate(r(function(l,v,p){return p===void 0&&(p=!1),e.factory.createImportClause(p,l,v)},"createImportClause"),t),e.updateImportClause=e.Debug.deprecate(r(function(l,v,p,b){return e.factory.updateImportClause(l,b,v,p)},"updateImportClause"),t),e.createExportDeclaration=e.Debug.deprecate(r(function(l,v,p,b,J){return J===void 0&&(J=!1),e.factory.createExportDeclaration(l,v,J,p,b)},"createExportDeclaration"),t),e.updateExportDeclaration=e.Debug.deprecate(r(function(l,v,p,b,J,B){return e.factory.updateExportDeclaration(l,v,p,B,b,J,l.assertClause)},"updateExportDeclaration"),t),e.createJSDocParamTag=e.Debug.deprecate(r(function(l,v,p,b){return e.factory.createJSDocParameterTag(void 0,l,v,p,!1,b?e.factory.createNodeArray([e.factory.createJSDocText(b)]):void 0)},"createJSDocParamTag"),t),e.createComma=e.Debug.deprecate(r(function(l,v){return e.factory.createComma(l,v)},"createComma"),t),e.createLessThan=e.Debug.deprecate(r(function(l,v){return e.factory.createLessThan(l,v)},"createLessThan"),t),e.createAssignment=e.Debug.deprecate(r(function(l,v){return e.factory.createAssignment(l,v)},"createAssignment"),t),e.createStrictEquality=e.Debug.deprecate(r(function(l,v){return e.factory.createStrictEquality(l,v)},"createStrictEquality"),t),e.createStrictInequality=e.Debug.deprecate(r(function(l,v){return e.factory.createStrictInequality(l,v)},"createStrictInequality"),t),e.createAdd=e.Debug.deprecate(r(function(l,v){return e.factory.createAdd(l,v)},"createAdd"),t),e.createSubtract=e.Debug.deprecate(r(function(l,v){return e.factory.createSubtract(l,v)},"createSubtract"),t),e.createLogicalAnd=e.Debug.deprecate(r(function(l,v){return e.factory.createLogicalAnd(l,v)},"createLogicalAnd"),t),e.createLogicalOr=e.Debug.deprecate(r(function(l,v){return e.factory.createLogicalOr(l,v)},"createLogicalOr"),t),e.createPostfixIncrement=e.Debug.deprecate(r(function(l){return e.factory.createPostfixIncrement(l)},"createPostfixIncrement"),t),e.createLogicalNot=e.Debug.deprecate(r(function(l){return e.factory.createLogicalNot(l)},"createLogicalNot"),t),e.createNode=e.Debug.deprecate(r(function(l,v,p){return v===void 0&&(v=0),p===void 0&&(p=0),e.setTextRangePosEnd(l===308?e.parseBaseNodeFactory.createBaseSourceFileNode(l):l===79?e.parseBaseNodeFactory.createBaseIdentifierNode(l):l===80?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(l):e.isNodeKind(l)?e.parseBaseNodeFactory.createBaseNode(l):e.parseBaseNodeFactory.createBaseTokenNode(l),v,p)},"createNode"),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate(r(function(l){var v=e.factory.cloneNode(l);return e.setTextRange(v,l),e.setParent(v,l.parent),v},"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(r(function(c){return c.kind===213},"isTypeAssertion"),{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})})(_r||(_r={}));var _r;(function(e){e.isIdentifierOrPrivateIdentifier=e.Debug.deprecate(r(function(c){return e.isMemberName(c)},"isIdentifierOrPrivateIdentifier"),{since:"4.2",warnAfter:"4.3",message:"Use `isMemberName` instead."})})(_r||(_r={}));var _r;(function(e){function t(l){var v=l.createConstructorTypeNode,p=l.updateConstructorTypeNode;l.createConstructorTypeNode=e.buildOverload("createConstructorTypeNode").overload({0:function(b,J,B,g){return v(b,J,B,g)},1:function(b,J,B){return v(void 0,b,J,B)}}).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(),l.updateConstructorTypeNode=e.buildOverload("updateConstructorTypeNode").overload({0:function(b,J,B,g,h){return p(b,J,B,g,h)},1:function(b,J,B,g){return p(b,b.modifiers,J,B,g)}}).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()}r(t,"patchNodeFactory");var c=e.createNodeFactory;e.createNodeFactory=function(l,v){var p=c(l,v);return t(p),p},t(e.factory)})(_r||(_r={}));var _r;(function(e){function t(l){var v=l.createImportTypeNode,p=l.updateImportTypeNode;l.createImportTypeNode=e.buildOverload("createImportTypeNode").overload({0:function(b,J,B,g,h){return v(b,J,B,g,h)},1:function(b,J,B,g){return v(b,void 0,J,B,g)}}).bind({0:function(b){var J=b[1],B=b[2],g=b[3],h=b[4];return(J===void 0||e.isImportTypeAssertionContainer(J))&&(B===void 0||!e.isArray(B))&&(g===void 0||e.isArray(g))&&(h===void 0||typeof h=="boolean")},1:function(b){var J=b[1],B=b[2],g=b[3],h=b[4];return h===void 0&&(J===void 0||e.isEntityName(J))&&(B===void 0||e.isArray(B))&&(g===void 0||typeof g=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish(),l.updateImportTypeNode=e.buildOverload("updateImportTypeNode").overload({0:function(b,J,B,g,h,fe){return p(b,J,B,g,h,fe)},1:function(b,J,B,g,h){return p(b,J,b.assertions,B,g,h)}}).bind({0:function(b){var J=b[2],B=b[3],g=b[4],h=b[5];return(J===void 0||e.isImportTypeAssertionContainer(J))&&(B===void 0||!e.isArray(B))&&(g===void 0||e.isArray(g))&&(h===void 0||typeof h=="boolean")},1:function(b){var J=b[2],B=b[3],g=b[4],h=b[5];return h===void 0&&(J===void 0||e.isEntityName(J))&&(B===void 0||e.isArray(B))&&(g===void 0||typeof g=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish()}r(t,"patchNodeFactory");var c=e.createNodeFactory;e.createNodeFactory=function(l,v){var p=c(l,v);return t(p),p},t(e.factory)})(_r||(_r={}));var _r;(function(e){function t(l){var v=l.createTypeParameterDeclaration,p=l.updateTypeParameterDeclaration;l.createTypeParameterDeclaration=e.buildOverload("createTypeParameterDeclaration").overload({0:function(b,J,B,g){return v(b,J,B,g)},1:function(b,J,B){return v(void 0,b,J,B)}}).bind({0:function(b){var J=b[0];return J===void 0||e.isArray(J)},1:function(b){var J=b[0];return J!==void 0&&!e.isArray(J)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish(),l.updateTypeParameterDeclaration=e.buildOverload("updateTypeParameterDeclaration").overload({0:function(b,J,B,g,h){return p(b,J,B,g,h)},1:function(b,J,B,g){return p(b,b.modifiers,J,B,g)}}).bind({0:function(b){var J=b[1];return J===void 0||e.isArray(J)},1:function(b){var J=b[1];return J!==void 0&&!e.isArray(J)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish()}r(t,"patchNodeFactory");var c=e.createNodeFactory;e.createNodeFactory=function(l,v){var p=c(l,v);return t(p),p},t(e.factory)})(_r||(_r={}));var _r;(function(e){var t={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."},c={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."},l={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 v(b){var J=b.createParameterDeclaration,B=b.updateParameterDeclaration,g=b.createPropertyDeclaration,h=b.updatePropertyDeclaration,fe=b.createMethodDeclaration,ce=b.updateMethodDeclaration,Z=b.createConstructorDeclaration,te=b.updateConstructorDeclaration,le=b.createGetAccessorDeclaration,w=b.updateGetAccessorDeclaration,R=b.createSetAccessorDeclaration,m=b.updateSetAccessorDeclaration,S=b.createIndexSignature,C=b.updateIndexSignature,k=b.createClassStaticBlockDeclaration,P=b.updateClassStaticBlockDeclaration,N=b.createClassExpression,ge=b.updateClassExpression,De=b.createFunctionDeclaration,re=b.updateFunctionDeclaration,j=b.createClassDeclaration,$=b.updateClassDeclaration,Y=b.createInterfaceDeclaration,E=b.updateInterfaceDeclaration,z=b.createTypeAliasDeclaration,se=b.updateTypeAliasDeclaration,W=b.createEnumDeclaration,L=b.updateEnumDeclaration,M=b.createModuleDeclaration,G=b.updateModuleDeclaration,ee=b.createImportEqualsDeclaration,ne=b.updateImportEqualsDeclaration,be=b.createImportDeclaration,A=b.updateImportDeclaration,I=b.createExportAssignment,O=b.updateExportAssignment,ae=b.createExportDeclaration,q=b.updateExportDeclaration;b.createParameterDeclaration=e.buildOverload("createParameterDeclaration").overload({0:function(_,F,U,Q,K,ve){return J(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return J(e.concatenate(_,F),U,Q,K,ve,me)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return me===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="string"||e.isBindingName(U))&&(Q===void 0||typeof Q=="object"&&e.isQuestionToken(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isExpression(ve))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isDotDotDotToken(U))&&(Q===void 0||typeof Q=="string"||e.isBindingName(Q))&&(K===void 0||e.isQuestionToken(K))&&(ve===void 0||e.isTypeNode(ve))&&(me===void 0||e.isExpression(me))}}).deprecate({1:t}).finish(),b.updateParameterDeclaration=e.buildOverload("updateParameterDeclaration").overload({0:function(_,F,U,Q,K,ve,me){return B(_,F,U,Q,K,ve,me)},1:function(_,F,U,Q,K,ve,me,Ke){return B(_,e.concatenate(F,U),Q,K,ve,me,Ke)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7];return me===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="string"||e.isBindingName(U))&&(Q===void 0||typeof Q=="object"&&e.isQuestionToken(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isExpression(ve))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isDotDotDotToken(U))&&(Q===void 0||typeof Q=="string"||e.isBindingName(Q))&&(K===void 0||e.isQuestionToken(K))&&(ve===void 0||e.isTypeNode(ve))&&(me===void 0||e.isExpression(me))}}).deprecate({1:t}).finish(),b.createPropertyDeclaration=e.buildOverload("createPropertyDeclaration").overload({0:function(_,F,U,Q,K){return g(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return g(e.concatenate(_,F),U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isQuestionOrExclamationToken(U))&&(Q===void 0||e.isTypeNode(Q))&&(K===void 0||e.isExpression(K))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="string"||e.isPropertyName(U))&&(Q===void 0||e.isQuestionOrExclamationToken(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isExpression(ve))}}).deprecate({1:t}).finish(),b.updatePropertyDeclaration=e.buildOverload("updatePropertyDeclaration").overload({0:function(_,F,U,Q,K,ve){return h(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return h(_,e.concatenate(F,U),Q,K,ve,me)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isQuestionOrExclamationToken(U))&&(Q===void 0||e.isTypeNode(Q))&&(K===void 0||e.isExpression(K))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="string"||e.isPropertyName(U))&&(Q===void 0||e.isQuestionOrExclamationToken(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isExpression(ve))}}).deprecate({1:t}).finish(),b.createMethodDeclaration=e.buildOverload("createMethodDeclaration").overload({0:function(_,F,U,Q,K,ve,me,Ke){return fe(_,F,U,Q,K,ve,me,Ke)},1:function(_,F,U,Q,K,ve,me,Ke,je){return fe(e.concatenate(_,F),U,Q,K,ve,me,Ke,je)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6],Ke=_[7],je=_[8];return je===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="string"||e.isPropertyName(U))&&(Q===void 0||typeof Q=="object"&&e.isQuestionToken(Q))&&(K===void 0||e.isArray(K))&&(ve===void 0||!e.some(ve,e.isTypeParameterDeclaration))&&(me===void 0||!e.isArray(me))&&(Ke===void 0||e.isBlock(Ke))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6],Ke=_[7],je=_[8];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isAsteriskToken(U))&&(Q===void 0||typeof Q=="string"||e.isPropertyName(Q))&&(K===void 0||!e.isArray(K))&&(ve===void 0||!e.some(ve,e.isParameter))&&(me===void 0||e.isArray(me))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:t}).finish(),b.updateMethodDeclaration=e.buildOverload("updateMethodDeclaration").overload({0:function(_,F,U,Q,K,ve,me,Ke,je){return ce(_,F,U,Q,K,ve,me,Ke,je)},1:function(_,F,U,Q,K,ve,me,Ke,je,Le){return ce(_,e.concatenate(F,U),Q,K,ve,me,Ke,je,Le)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7],Ke=_[8],je=_[9];return je===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="string"||e.isPropertyName(U))&&(Q===void 0||typeof Q=="object"&&e.isQuestionToken(Q))&&(K===void 0||e.isArray(K))&&(ve===void 0||!e.some(ve,e.isTypeParameterDeclaration))&&(me===void 0||!e.isArray(me))&&(Ke===void 0||e.isBlock(Ke))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7],Ke=_[8],je=_[9];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U=="object"&&e.isAsteriskToken(U))&&(Q===void 0||typeof Q=="string"||e.isPropertyName(Q))&&(K===void 0||!e.isArray(K))&&(ve===void 0||!e.some(ve,e.isParameter))&&(me===void 0||e.isArray(me))&&(Ke===void 0||e.isTypeNode(Ke))&&(je===void 0||e.isBlock(je))}}).deprecate({1:t}).finish(),b.createConstructorDeclaration=e.buildOverload("createConstructorDeclaration").overload({0:function(_,F,U){return Z(_,F,U)},1:function(_,F,U,Q){return Z(F,U,Q)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return K===void 0&&(F===void 0||!e.some(F,e.isDecorator))&&(U===void 0||!e.some(U,e.isModifier))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return(F===void 0||!e.some(F,e.isModifier))&&(U===void 0||!e.some(U,e.isParameter))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isBlock(K))}}).deprecate({1:c}).finish(),b.updateConstructorDeclaration=e.buildOverload("updateConstructorDeclaration").overload({0:function(_,F,U,Q){return te(_,F,U,Q)},1:function(_,F,U,Q,K){return te(_,U,Q,K)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return K===void 0&&(F===void 0||!e.some(F,e.isDecorator))&&(U===void 0||!e.some(U,e.isModifier))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return(F===void 0||!e.some(F,e.isModifier))&&(U===void 0||!e.some(U,e.isParameter))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isBlock(K))}}).deprecate({1:c}).finish(),b.createGetAccessorDeclaration=e.buildOverload("createGetAccessorDeclaration").overload({0:function(_,F,U,Q,K){return le(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return le(e.concatenate(_,F),U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isBlock(K))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isBlock(ve))}}).deprecate({1:t}).finish(),b.updateGetAccessorDeclaration=e.buildOverload("updateGetAccessorDeclaration").overload({0:function(_,F,U,Q,K,ve){return w(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return w(_,e.concatenate(F,U),Q,K,ve,me)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isBlock(K))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isTypeNode(K))&&(ve===void 0||e.isBlock(ve))}}).deprecate({1:t}).finish(),b.createSetAccessorDeclaration=e.buildOverload("createSetAccessorDeclaration").overload({0:function(_,F,U,Q){return R(_,F,U,Q)},1:function(_,F,U,Q,K){return R(e.concatenate(_,F),U,Q,K)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return K===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isBlock(K))}}).deprecate({1:t}).finish(),b.updateSetAccessorDeclaration=e.buildOverload("updateSetAccessorDeclaration").overload({0:function(_,F,U,Q,K){return m(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return m(_,e.concatenate(F,U),Q,K,ve)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5];return K===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isBlock(K))}}).deprecate({1:t}).finish(),b.createIndexSignature=e.buildOverload("createIndexSignature").overload({0:function(_,F,U){return S(_,F,U)},1:function(_,F,U,Q){return S(F,U,Q)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||e.every(U,e.isParameter))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.every(U,e.isModifier))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isTypeNode(K))}}).deprecate({1:c}).finish(),b.updateIndexSignature=e.buildOverload("updateIndexSignature").overload({0:function(_,F,U,Q){return C(_,F,U,Q)},1:function(_,F,U,Q,K){return C(_,U,Q,K)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||e.every(U,e.isParameter))&&(Q===void 0||!e.isArray(Q))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.every(U,e.isModifier))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.isTypeNode(K))}}).deprecate({1:c}).finish(),b.createClassStaticBlockDeclaration=e.buildOverload("createClassStaticBlockDeclaration").overload({0:function(_){return k(_)},1:function(_,F,U){return k(U)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2];return U===void 0&&Q===void 0&&(F===void 0||!e.isArray(F))},1:function(_){var F=_[0],U=_[1],Q=_[2];return(F===void 0||e.isArray(F))&&(U===void 0||e.isArray(F))&&(Q===void 0||e.isBlock(Q))}}).deprecate({1:l}).finish(),b.updateClassStaticBlockDeclaration=e.buildOverload("updateClassStaticBlockDeclaration").overload({0:function(_,F){return P(_,F)},1:function(_,F,U,Q){return P(_,Q)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3];return U===void 0&&Q===void 0&&(F===void 0||!e.isArray(F))},1:function(_){var F=_[1],U=_[2],Q=_[3];return(F===void 0||e.isArray(F))&&(U===void 0||e.isArray(F))&&(Q===void 0||e.isBlock(Q))}}).deprecate({1:l}).finish(),b.createClassExpression=e.buildOverload("createClassExpression").overload({0:function(_,F,U,Q,K){return N(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return N(e.concatenate(_,F),U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.every(Q,e.isHeritageClause))&&(K===void 0||e.every(K,e.isClassElement))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.every(Q,e.isTypeParameterDeclaration))&&(K===void 0||e.every(K,e.isHeritageClause))&&(ve===void 0||e.isArray(ve))}}).deprecate({1:c}).finish(),b.updateClassExpression=e.buildOverload("updateClassExpression").overload({0:function(_,F,U,Q,K,ve){return ge(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return ge(_,e.concatenate(F,U),Q,K,ve,me)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.every(Q,e.isHeritageClause))&&(K===void 0||e.every(K,e.isClassElement))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.every(Q,e.isTypeParameterDeclaration))&&(K===void 0||e.every(K,e.isHeritageClause))&&(ve===void 0||e.isArray(ve))}}).deprecate({1:c}).finish(),b.createFunctionDeclaration=e.buildOverload("createFunctionDeclaration").overload({0:function(_,F,U,Q,K,ve,me){return De(_,F,U,Q,K,ve,me)},1:function(_,F,U,Q,K,ve,me,Ke){return De(F,U,Q,K,ve,me,Ke)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6],Ke=_[7];return Ke===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||typeof U=="string"||e.isIdentifier(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.every(K,e.isParameter))&&(ve===void 0||!e.isArray(ve))&&(me===void 0||e.isBlock(me))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6],Ke=_[7];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U!="string"&&e.isAsteriskToken(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(ve===void 0||e.isArray(ve))&&(me===void 0||e.isTypeNode(me))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:c}).finish(),b.updateFunctionDeclaration=e.buildOverload("updateFunctionDeclaration").overload({0:function(_,F,U,Q,K,ve,me,Ke){return re(_,F,U,Q,K,ve,me,Ke)},1:function(_,F,U,Q,K,ve,me,Ke,je){return re(_,U,Q,K,ve,me,Ke,je)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7],Ke=_[8];return Ke===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isIdentifier(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.every(K,e.isParameter))&&(ve===void 0||!e.isArray(ve))&&(me===void 0||e.isBlock(me))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6],me=_[7],Ke=_[8];return(F===void 0||e.isArray(F))&&(U===void 0||typeof U!="string"&&e.isAsteriskToken(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(ve===void 0||e.isArray(ve))&&(me===void 0||e.isTypeNode(me))&&(Ke===void 0||e.isBlock(Ke))}}).deprecate({1:c}).finish(),b.createClassDeclaration=e.buildOverload("createClassDeclaration").overload({0:function(_,F,U,Q,K){return j(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return j(e.concatenate(_,F),U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.every(Q,e.isHeritageClause))&&(K===void 0||e.every(K,e.isClassElement))},1:function(){return!0}}).deprecate({1:t}).finish(),b.updateClassDeclaration=e.buildOverload("updateClassDeclaration").overload({0:function(_,F,U,Q,K,ve){return $(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return $(_,e.concatenate(F,U),Q,K,ve,me)}}).bind({0:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return ve===void 0&&(F===void 0||!e.isArray(F))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.every(Q,e.isHeritageClause))&&(K===void 0||e.every(K,e.isClassElement))},1:function(_){var F=_[2],U=_[3],Q=_[4],K=_[5],ve=_[6];return(F===void 0||e.isArray(F))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.every(Q,e.isTypeParameterDeclaration))&&(K===void 0||e.every(K,e.isHeritageClause))&&(ve===void 0||e.isArray(ve))}}).deprecate({1:t}).finish(),b.createInterfaceDeclaration=e.buildOverload("createInterfaceDeclaration").overload({0:function(_,F,U,Q,K){return Y(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return Y(F,U,Q,K,ve)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4],me=_[5];return me===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.every(K,e.isHeritageClause))&&(ve===void 0||e.every(ve,e.isTypeElement))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4],me=_[5];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(ve===void 0||e.every(ve,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))}}).deprecate({1:c}).finish(),b.updateInterfaceDeclaration=e.buildOverload("updateInterfaceDeclaration").overload({0:function(_,F,U,Q,K,ve){return E(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return E(_,U,Q,K,ve,me)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return me===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||e.every(K,e.isHeritageClause))&&(ve===void 0||e.every(ve,e.isTypeElement))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.every(K,e.isTypeParameterDeclaration))&&(ve===void 0||e.every(ve,e.isHeritageClause))&&(me===void 0||e.every(me,e.isTypeElement))}}).deprecate({1:c}).finish(),b.createTypeAliasDeclaration=e.buildOverload("createTypeAliasDeclaration").overload({0:function(_,F,U,Q){return z(_,F,U,Q)},1:function(_,F,U,Q,K){return z(F,U,Q,K)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||!e.isArray(K))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isArray(K))&&(ve===void 0||e.isTypeNode(ve))}}).deprecate({1:c}).finish(),b.updateTypeAliasDeclaration=e.buildOverload("updateTypeAliasDeclaration").overload({0:function(_,F,U,Q,K){return se(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return se(_,U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))&&(K===void 0||!e.isArray(K))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isArray(K))&&(ve===void 0||e.isTypeNode(ve))}}).deprecate({1:c}).finish(),b.createEnumDeclaration=e.buildOverload("createEnumDeclaration").overload({0:function(_,F,U){return W(_,F,U)},1:function(_,F,U,Q){return W(F,U,Q)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isArray(K))}}).deprecate({1:c}).finish(),b.updateEnumDeclaration=e.buildOverload("updateEnumDeclaration").overload({0:function(_,F,U,Q){return L(_,F,U,Q)},1:function(_,F,U,Q,K){return L(_,U,Q,K)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isArray(Q))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||!e.isArray(Q))&&(K===void 0||e.isArray(K))}}).deprecate({1:c}).finish(),b.createModuleDeclaration=e.buildOverload("createModuleDeclaration").overload({0:function(_,F,U,Q){return M(_,F,U,Q)},1:function(_,F,U,Q,K){return M(F,U,Q,K)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&U!==void 0&&!e.isArray(U)&&(Q===void 0||e.isModuleBody(Q))&&(K===void 0||typeof K=="number")},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&Q!==void 0&&e.isModuleName(Q)&&(K===void 0||typeof K=="object")&&(ve===void 0||typeof ve=="number")}}).deprecate({1:c}).finish(),b.updateModuleDeclaration=e.buildOverload("updateModuleDeclaration").overload({0:function(_,F,U,Q){return G(_,F,U,Q)},1:function(_,F,U,Q,K){return G(_,U,Q,K)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isModuleBody(Q))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&Q!==void 0&&e.isModuleName(Q)&&(K===void 0||e.isModuleBody(K))}}).deprecate({1:c}).finish(),b.createImportEqualsDeclaration=e.buildOverload("createImportEqualsDeclaration").overload({0:function(_,F,U,Q){return ee(_,F,U,Q)},1:function(_,F,U,Q,K){return ee(F,U,Q,K)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||typeof U=="boolean")&&typeof Q!="boolean"&&typeof K!="string"},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||typeof Q=="boolean")&&(typeof K=="string"||e.isIdentifier(K))&&ve!==void 0&&e.isModuleReference(ve)}}).deprecate({1:c}).finish(),b.updateImportEqualsDeclaration=e.buildOverload("updateImportEqualsDeclaration").overload({0:function(_,F,U,Q,K){return ne(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return ne(_,U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||typeof U=="boolean")&&typeof Q!="boolean"&&typeof K!="string"},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||typeof Q=="boolean")&&(typeof K=="string"||e.isIdentifier(K))&&ve!==void 0&&e.isModuleReference(ve)}}).deprecate({1:c}).finish(),b.createImportDeclaration=e.buildOverload("createImportDeclaration").overload({0:function(_,F,U,Q){return be(_,F,U,Q)},1:function(_,F,U,Q,K){return be(F,U,Q,K)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&Q!==void 0&&e.isExpression(Q)&&(K===void 0||e.isAssertClause(K))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.isImportClause(Q))&&K!==void 0&&e.isExpression(K)&&(ve===void 0||e.isAssertClause(ve))}}).deprecate({1:c}).finish(),b.updateImportDeclaration=e.buildOverload("updateImportDeclaration").overload({0:function(_,F,U,Q,K){return A(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return A(_,U,Q,K,ve)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return ve===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||!e.isArray(U))&&(Q===void 0||e.isExpression(Q))&&(K===void 0||e.isAssertClause(K))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||e.isImportClause(Q))&&K!==void 0&&e.isExpression(K)&&(ve===void 0||e.isAssertClause(ve))}}).deprecate({1:c}).finish(),b.createExportAssignment=e.buildOverload("createExportAssignment").overload({0:function(_,F,U){return I(_,F,U)},1:function(_,F,U,Q){return I(F,U,Q)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return K===void 0&&(F===void 0||e.every(F,e.isModifier))&&(U===void 0||typeof U=="boolean")&&typeof Q=="object"},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&(Q===void 0||typeof Q=="boolean")&&K!==void 0&&e.isExpression(K)}}).deprecate({1:c}).finish(),b.updateExportAssignment=e.buildOverload("updateExportAssignment").overload({0:function(_,F,U){return O(_,F,U)},1:function(_,F,U,Q){return O(_,U,Q)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3];return Q===void 0&&(F===void 0||e.every(F,e.isModifier))&&U!==void 0&&!e.isArray(U)},1:function(_){var F=_[1],U=_[2],Q=_[3];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&Q!==void 0&&e.isExpression(Q)}}).deprecate({1:c}).finish(),b.createExportDeclaration=e.buildOverload("createExportDeclaration").overload({0:function(_,F,U,Q,K){return ae(_,F,U,Q,K)},1:function(_,F,U,Q,K,ve){return ae(F,U,Q,K,ve)}}).bind({0:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4],me=_[5];return me===void 0&&(F===void 0||e.every(F,e.isModifier))&&typeof U=="boolean"&&typeof Q!="boolean"&&(K===void 0||e.isExpression(K))&&(ve===void 0||e.isAssertClause(ve))},1:function(_){var F=_[0],U=_[1],Q=_[2],K=_[3],ve=_[4],me=_[5];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&typeof Q=="boolean"&&(K===void 0||e.isNamedExportBindings(K))&&(ve===void 0||e.isExpression(ve))&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:c}).finish(),b.updateExportDeclaration=e.buildOverload("updateExportDeclaration").overload({0:function(_,F,U,Q,K,ve){return q(_,F,U,Q,K,ve)},1:function(_,F,U,Q,K,ve,me){return q(_,U,Q,K,ve,me)}}).bind({0:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return me===void 0&&(F===void 0||e.every(F,e.isModifier))&&typeof U=="boolean"&&typeof Q!="boolean"&&(K===void 0||e.isExpression(K))&&(ve===void 0||e.isAssertClause(ve))},1:function(_){var F=_[1],U=_[2],Q=_[3],K=_[4],ve=_[5],me=_[6];return(F===void 0||e.every(F,e.isDecorator))&&(U===void 0||e.isArray(U))&&typeof Q=="boolean"&&(K===void 0||e.isNamedExportBindings(K))&&(ve===void 0||e.isExpression(ve))&&(me===void 0||e.isAssertClause(me))}}).deprecate({1:c}).finish()}r(v,"patchNodeFactory");var p=e.createNodeFactory;e.createNodeFactory=function(b,J){var B=p(b,J);return v(B),B},v(e.factory)})(_r||(_r={}));var _r;(function(e){typeof console<"u"&&(e.Debug.loggingHost={log:function(t,c){switch(t){case e.LogLevel.Error:return console.error(c);case e.LogLevel.Warning:return console.warn(c);case e.LogLevel.Info:return console.log(c);case e.LogLevel.Verbose:return console.log(c)}}})})(_r||(_r={}))});var iK={};wz(iK,{RunMode:()=>_y,getChecksumConfig:()=>UT,getLogin:()=>_b,init:()=>nK});module.exports=Iz(iK);var m1=(l=>(l[l.Element=0]="Element",l[l.VisibleElement=1]="VisibleElement",l[l.AtPointElement=2]="AtPointElement",l))(m1||{});var e7=require("path");var _y=(l=>(l.Normal="normal",l.Heal="heal",l.Refactor="refactor",l))(_y||{});var ob=(B=>(B.Locator="locator",B.GetByRole="getByRole",B.GetByText="getByText",B.GetByLabel="getByLabel",B.GetByPlaceholder="getByPlaceholder",B.GetByAltText="getByAltText",B.GetByTitle="getByTitle",B.GetByTestId="getByTestId",B))(ob||{}),sb=(p=>(p.First="first",p.Last="last",p.Nth="nth",p.Filter="filter",p.Or="or",p))(sb||{});var Ag=g1(require("path")),D1=require("fs");var v1=r(e=>new Promise(t=>setTimeout(t,e)),"awaitSleep"),FT=r(async(e,t=1e3,c="guardReturnTimedOut")=>{let l="guard-timed-out",v=r(async()=>(await v1(t+1e3),l),"guard"),p=await Promise.race([e,v()]);if(typeof p=="string"&&p===l)throw new Error(c);return p},"guardReturn");function h1(e=5,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let c="";for(let l=e;l>0;--l)c+=t[Math.floor(Math.random()*t.length)];return c}r(h1,"randomString");async function ub(e,t){let c=LT(e,t),{ungzip:l}=MT();if(!(0,D1.existsSync)(c))throw new Error(`Could not find ESRA file for test ${t}`);let v=await l((0,D1.readFileSync)(c));return JSON.parse(v)}r(ub,"getESRAMapForTestId");function ih(e){return Ag.join(Ag.dirname(e),"..")}r(ih,"getTestBaseDir");function LT(e,t){return Ag.join(Oz(e),`${t}.checksum.esra`)}r(LT,"getESRAFilePath");function Oz(e){return Ag.join(BT(e),"esra")}r(Oz,"getESRAFolderPath");function RT(e,t){return Ag.join(BT(e),"har",t)}r(RT,"getHARFolderPath");function FP(e,t){return Ag.join(BT(e),"trace",`${t}.playwright-trace.zip`)}r(FP,"getTraceFilePath");function BT(e){return Ag.join(e,"test-data")}r(BT,"getTestDataPath");function Fz(){return{uploadAgentHOST:"localhost",uploadAgentPort:3e3}}r(Fz,"getUploadAgentDefaultConfig");var cb=r(async e=>{try{await FT(e,5e3)}catch{}},"guardAwait"),JT=r(e=>{let t=/\/\/.*/,c=/\/\*[\s\S]*?\*\//g;return e.replace(t,"").replace(c,"")},"stripJavascriptComments"),jT=r(e=>{console.log("\x1B[31m%s\x1B[0m",e)},"printError");async function lb(e,t){Lc("Fetching selection data..");let l=r(async p=>t.evaluate(async b=>await window.checksum.testRunner.getSelectionDataForSelector(b),p),"getSelectionDataForSelector"),v=await l(e);if(v||(Lc("Failed, waiting for network idle..."),await cb(t.waitForLoadState("networkidle")),v=await l(e),v)||(Lc("Failed, waiting for element to be visible..."),await cb(t.locator(e).waitFor({state:"visible"})),v=await l(e),v)||(Lc("Failed, will wait 5000ms..."),await v1(5e3),v=await l(e),v))return v}r(lb,"selectionDataForSelector");async function fb(e,t,c,l=6e4){return t in e?FT(e[t](...c),l,"Execution timeout"):e}r(fb,"executePlaywrightMethodWithTimeout");var MP=!1;function LP(e){MP=e}r(LP,"setLogToConsole");function Lc(...e){MP&&console.log(...e)}r(Lc,"log");function y1(){return Ag.join(__dirname,"..","..","..","checksum")}r(y1,"checksumFolder");function _b(e){try{let t=require(`${y1()}/login.ts`).default;return async c=>{await t(c,e)}}catch(t){throw console.warn("Could not find checksum login file. Please set login.ts file in your checksum folder"),t}}r(_b,"getLogin");var dy;function RP(){if(dy)return dy;let e;try{let t=(0,D1.existsSync)(`${y1()}/checksum.config.tmp.ts`)?"checksum.config.tmp.ts":"checksum.config.ts";e=require(`${y1()}/${t}`).default}catch{console.warn("Could not find checksum config file, will run with defaults"),e=UT()}return e}r(RP,"loadChecksumConfig");function UT(e={}){return dy={...{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},...Fz()},...e},(!dy.username||!dy.password)&&console.warn("Username and/or password missing in config file"),dy}r(UT,"getChecksumConfig");var um=class{constructor(t,c,l={generateSelectionData:!1}){this.page=t;this.phaseSetter=c;this.options=l;this.page=t,this.phaseSetter=c}addMetadata(t){}async execute(t,c,l){return fb(t,c,l)}async executeWithSelectors(t,c,l,v=void 0,p={}){for(let{selector:b,tag:J}of t){this.phaseSetter({phase:v,payload:{selector:b,...p}});let B=this.page.locator(b);this.log(`Running with selector=${b})`);let g=!1;["check","uncheck"].includes(c)&&J!=="input"&&(g=!0);let h=this.generateSelectionDataForSelector(b);if(await this.execute(B,g?"click":c,l)===!1){this.log("Fallback selector timeout");continue}return h}}async generateSelectionDataForSelector(t){let{generateSelectionData:c}=this.options;if(!c)return{selector:t,generatedLocator:void 0,esraMetadata:void 0};try{let l=await lb(t,this.page);if(!l)throw new Error(`[generateSelectionDataForSelector] Failed to generate selection data for selector ${t}`);return l}catch(l){throw this.log(l.message),l}}log(...t){Lc(...t)}};r(um,"AbstractFallback");var db=require("path");var py=class extends um{constructor(){super(...arguments);this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"}}init(c){return this.esraData={...this.esraData,minSelectionScore:.5,...c},this}async resolve(c){try{let{method:l,args:v}=c,{checksumId:p}=this.esraData,b=await this.getActionIdToESRAMap();if(!(p in b)){let h=`No ESRA metadata found for id ${p}`;throw new Error(h)}let J=await this.getTestIdsForLocator(b[p]),{elementDataMap:B}=await this.getSelectors(J),g=await this.executeWithSelectors(Object.values(B),l,v,"esra-action");if(g)return[g];throw new Error("Exhausted ESRA selectors")}catch(l){this.log(l.message);return}}async getActionIdToESRAMap(){try{this.actionIdToESRAMap||(this.actionIdToESRAMap=await ub((0,db.join)((0,db.dirname)(this.esraData.fileName),".."),this.esraData.testId))}catch(c){return super.log("Could not read ESRA metadata file, ",c),{}}return this.actionIdToESRAMap}async getSelectors(c){let l=[],v={};if(!c)return{selectors:l,elementDataMap:v};for(let p in Object.keys(m1)){let b=c.testIds[this.locatorTypeEnumToFieldMap[p]];if(!b)continue;let J=`[data-checksum-testid="${b}"]`;l.push(J),v[J]={...c.elementData[this.locatorTypeEnumToFieldMap[p]],selector:c.selectors[this.locatorTypeEnumToFieldMap[p]]}}for(let p in Object.keys(m1)){let b=c.selectors[this.locatorTypeEnumToFieldMap[p]];b&&(l.push(b),v[b]={...c.elementData[this.locatorTypeEnumToFieldMap[p]],selector:b})}return this.log("Selectors for ESRA metadata:",l),{selectors:l,elementDataMap:v}}async getTestIdsForLocator(c,l={}){let{cachedSelector:v=void 0,retriesLeft:p=3,retryMaxTimeout:b=3e3,staticMetadata:J}=l;this.phaseSetter({phase:"esra-search"});let B=await this.page.evaluate(async({esraMetadata:g,cachedSelector:h,staticMetadata:fe,minSelectionScore:ce})=>await window.checksum.testRunner.getMatchingElementSelectionData(g,{minSelectionScore:ce,cachedSelector:h,staticMetadata:fe}),{esraMetadata:c,cachedSelector:v,staticMetadata:J,minSelectionScore:this.esraData.minSelectionScore});if(!B){if(p>0)return this.log("[getTestIdsForLocator] no match found, waiting and retrying..."),await v1(b/p),this.getTestIdsForLocator(c,{...l,retriesLeft:p-1});this.log("[getTestIdsForLocator] failed to locate")}return B}toString(){return`Checksum Selector (${this.esraData.checksumId})`}};r(py,"ESRAfallback");var gy=class extends um{init(){return this}async resolve(t){try{let{locator:c,method:l,args:v}=t;if(!["check","uncheck"].includes(l))return;this.phaseSetter({phase:"force"});let p=!1;for(let J of Array.from(v))if(typeof J=="object"){J.force=!0,p=!0;break}if(p||(v=Array.from(v),v.push({force:!0})),await this.execute(c,l,v)!==!1)return[{selector:c._selector,generatedLocator:void 0,esraMetadata:void 0}];this.log("Locator timed out, ")}catch(c){this.log("initiateFallbackSequence exception, ",c);return}}toString(){return null}};r(gy,"ForceFallback");var s_=class extends um{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(c){let{goal:l,apiKey:v,apiURL:p}=c;return s_.goal=l,s_.apiKey=v,p&&(s_.API_BASE_URL=`${p.replace(/\/$/,"")}/client-api/runtime/ai-fallback`),this}async resolve(){try{if(await this.initSession(),!await this.iterate()){this.log("[AIFallback] AIFallback failed");return}return this.selectionData}catch(c){this.log("[AIFallback] Error",c);return}}async iterate(){let c=!1,l=s_.CLIENT_MAX_ITERATIONS;do{let{reducedHTML:v,flashingHTML:p,elementsForNodeInterpretation:b}=await this.page.evaluate(async([B])=>window.checksum.testGenerator.reduceHTML({overrideInteractableElementsSelectors:B}),[[void 0]]),J=await this.getNextAction({reducedHTML:v,flashingHTML:p,elementsForNodeInterpretation:b,hasPreviousActionFailed:c});if(J.thought==="finish")return this.log("[AIFallback] Received finish step"),this.steps.length>0;if(["failed","fail"].includes(J.thought))return this.log("[AIFallback] Received failed signal, will quit"),!1;J={...J,...await this.getPlaywrightLocatorForChecksumId(J.action.checksumid)};try{let B=await this.executeWithSelectors([{...J,tag:null}],J.action.type,["fill","navigate"].includes(J.action.type)?[J.action.value]:[],"llm-action",{thought:J.thought});if(B)c=!1,this.selectionData.push({...B,method:{name:J.action.type,args:["fill","navigate"].includes(J.action.type)?[J.action.value]:[]},comment:J.thought});else throw new Error("Action failed")}catch(B){this.log("[AIFallback] Error while executing selector",B.message),c=!0;continue}if(this.steps.push(J),--l<=0){this.log("[AIFallback] Maximum repeatition reached");break}}while(!0);return!1}async getNextAction({reducedHTML:c,flashingHTML:l,hasPreviousActionFailed:v,elementsForNodeInterpretation:p}){let{apiKey:b}=s_;if(this.mockServer)return this.finish?{thought:"finish"}:(--this.actionsCounter===0&&(this.finish=!0),{thought:"mock-thought",action:{type:"click",checksumid:"10"}});let J={reduction:{reducedHTML:c,flashingHTML:l,elementsForNodeInterpretation:p},currentURL:this.page.url()};try{let g=await(await fetch(`${s_.API_BASE_URL}/iterate`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:s_.apiKey},body:JSON.stringify({appName:b,sessionId:this.sessionId,iterationData:J,hasPreviousActionFailed:v})})).json();return this.log("[AIFallback] Received next action",g),g}catch(B){throw this.log("[AIFallback] Error calling iterate",B),B}}async initSession(){let{apiKey:c,goal:l,thoughts:v}=s_;if(this.log("[AIFallback] Calling init session...",{appName:c,goal:l,thoughts:v}),!c){let b="Missing Checksum API key, will not run AI fallback";throw jT(b),new Error(b)}if(this.mockServer){this.sessionId="mock-session-id";return}let p={storyTitle:l,thoughtsAndActions:{previous:v.slice(0,Math.max(v.length-1,0)).map(b=>({thought:b})),failing:{thought:v[v.length-1]},next:[]}};this.phaseSetter({phase:"llm-prompt",payload:{thought:p.thoughtsAndActions.failing.thought}});try{let b=await fetch(`${s_.API_BASE_URL}/init`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:s_.apiKey},body:JSON.stringify({appName:c,data:p})});this.sessionId=await b.text(),this.log("[AIFallback] Session ID",this.sessionId)}catch(b){throw jT("Checksum failed connecteing to the server, will not run AI fallback"),this.log("[AIFallback] Error calling init session",b),b}}addMetadata(c){s_.thoughts.push(c.thought)}async getPlaywrightLocatorForChecksumId(c){return!c||isNaN(Number(c))?(this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id : ${c},,,`),{selector:c}):(!this.config.llm.persistChecksumIds&&this.runningChecksumIdIndex.length>1&&Number(c)<this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-2]&&this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id, possibly from previous prompt: ${c},
|
|
271
|
-
current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async v=>window.checksum.testGenerator.getSelectorForChecksumId(v),c))}getFailedThought(){return s_.thoughts[s_.thoughts.length-1]}toString(){return`Checksum AI Selector: ${this.getFailedThought()}`}},Vp=s_;r(Vp,"AIFallback"),Vp.API_BASE_URL="https://api.checksum.ai/client-api/runtime/ai-fallback",Vp.CLIENT_MAX_ITERATIONS=10,Vp.thoughts=[];var r2=g1(require("path")),Xp=require("fs");var r7=g1(Y5());var pG="index.js",gG=__dirname+"/checksumlib.js";var Lg=class{constructor(t,c="normal",l,v,p,b,J,B,g){this.page=t;this.runMode=c;this.testIdSelector=l;this.codeMirror=v;this.monitorBridge=p;this.testInfo=b;this.
|
|
272
|
-
test(defineChecksumTest("${
|
|
271
|
+
current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async v=>window.checksum.testGenerator.getSelectorForChecksumId(v),c))}getFailedThought(){return s_.thoughts[s_.thoughts.length-1]}toString(){return`Checksum AI Selector: ${this.getFailedThought()}`}},Vp=s_;r(Vp,"AIFallback"),Vp.API_BASE_URL="https://api.checksum.ai/client-api/runtime/ai-fallback",Vp.CLIENT_MAX_ITERATIONS=10,Vp.thoughts=[];var r2=g1(require("path")),Xp=require("fs");var r7=g1(Y5());var pG="index.js",gG=__dirname+"/checksumlib.js";var Lg=class{constructor(t,c="normal",l,v,p,b,J,B,g,h){this.page=t;this.runMode=c;this.testIdSelector=l;this.codeMirror=v;this.monitorBridge=p;this.testInfo=b;this.checksumTestId=J;this.options=B;this.apiKey=g;this.apiURL=h;this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"};this.minSelectionScore=.5;this.phasePayload=void 0;this.locatorStack=[];this.fallbacks=[];this.checksumStepStack=[];this.isTracingActive=!1;this.hasRuntimeStartedTrace=!1;this.unzippedHarData=[];this.didFail=!1;this.didHeal=!1;this.phaseMap={};this.setPhase=t=>{let{phase:c,payload:l,clear:v}=t;v&&(this.phase=void 0,this.phasePayload=void 0),c&&(this.phase=c),l&&(this.phasePayload=l)};LP(B.printLogs),this.proxy=new Proxy(this,{get:r(function(ce,Z){return ce.getPageMethod(Z)},"get")}),this.registerPageEvents(),this.resetFallbacks(),this.setupStepInterceptors(),this.phase="script"}async prepareMockData(){let t=RT(ih(this.testInfo.file),this.checksumTestId),c=r2.join(t,"test.har");if((0,Xp.existsSync)(c))return c;let l=r2.join(t,`${this.checksumTestId}.har.zip`);if(!(0,Xp.existsSync)(l))throw new Error("Could not find har file or zip file");let v=(0,Xp.readFileSync)(l),p=await(0,r7.loadAsync)(v);for(let b of Object.keys(p.files)){let J=await p.file(b).async("string"),B=r2.join(t,b);(0,Xp.writeFileSync)(B,J),this.unzippedHarData.push(B)}if(!(0,Xp.existsSync)(c))throw this.cleanupMockData(),new Error(`Could not find har file ${c} after unzipping ${l}`);return c}cleanupMockData(){this.unzippedHarData.forEach(t=>{(0,Xp.rmSync)(t)})}async prepareAPIMock(){let t={GET:0,POST:0,PUT:0,DELETE:0};try{let c=await this.prepareMockData();await this.page.routeFromHAR(c,{url:"*/**",notFound:"fallback",update:!1});let l=this.page._routes[0].handler;await this.page.route("**/*",v=>{let p=v.request().headers(),b=v.request().method();p["Checksum-Id"]=(++t[b]).toString(),v.request()._applyFallbackOverrides({headers:p}),l(v)})}catch(c){Lc("Error setting up mock data",c.message)}}getPlaywrightConfig(){let t=r2.join(y1(),"playwright.config.ts");if((0,Xp.existsSync)(t))return require(t).default}registerPageEvents(){var v;this.page.on("framenavigated",async p=>{p===this.page.mainFrame()&&(this.navigationPromise=new Promise((b,J)=>this.loadScript().then(b).catch(J)))});let c=(v=this.getPlaywrightConfig().use)==null?void 0:v.trace;!c||c==="off"||(this.isTracingActive=!0)}getPageMethod(t){return this.phase=void 0,typeof this[t]=="function"?this[t].bind(this):!Object.values(ob).includes(t)||!this.testInfo?this.page[t]:(this.locatorStack.length===0&&(this.pageInitialCallInTestFile=this.getFirstStackTraceFromTestFile()),this.pushToLocatorStack([{type:t,base:this.page,line:this.pageInitialCallInTestFile.line}]),r(function(l,v){try{return this.executeLocator(l,v)}catch(p){throw this.popLocatorChain(),p}},"Page").bind(this))}static async init(t,c,l,v,p,{runMode:b="normal",testIdSelector:J=void 0,apiKey:B,apiURL:g,options:h={}}){p||(p=h1(5),console.warn(`Checksum test id was not defined for test "${v.title}" and was auto-generated. Please replace - "${v.title}" with -
|
|
272
|
+
test(defineChecksumTest("${v.title}", "${p}"), async ({ page }) => {...`)),l.addTestInfo(p,v.testId);let fe=new Lg(t,b,J,c,l,v,p,{useChecksumSelectors:!0,useChecksumAI:!0,newAssertionsEnabled:!0,useMockData:!1,printLogs:!1,...h},B,g);return await fe.asyncInit(),fe.proxy}popLocatorChain(){return this.locatorStack.pop()}async asyncInit(){await this.page.addInitScript(()=>{window.sessionStorage.setItem("checksumai:disable","true")}),await this.prepareForTestArtifacts()}async onTestComplete(){await this.sendTestArtifacts(),this.monitorBridge.addSingleTestStats(!this.didFail,this.didHeal&&!this.didFail),this.cleanupMockData()}async sendTestArtifacts(){this.runMode!=="normal"&&(await this.codeMirror.write()).forEach(t=>this.monitorBridge.addAsset(t))}async getTraceFilePath(){if(this.isTracingActive)return this.hasRuntimeStartedTrace?FP(ih(this.testInfo.file),this.checksumTestId).replace(".zip",".original.zip"):this.testInfo.outputPath("trace.zip")}didTestFail(){return this.didFail}async prepareForTestArtifacts(){(this.options.useMockData||this.runMode==="refactor")&&await this.prepareAPIMock();let t=await this.getTraceFilePath();if(t&&this.monitorBridge.addAsset({type:"trace",path:t,testId:this.checksumTestId}),!1){let l=RT(ih(this.testInfo.file),this.checksumTestId);this.monitorBridge.addAsset({type:"har",path:l,testId:this.checksumTestId})}}checksumSelector(t){return this.options.useChecksumSelectors&&(this.fallbacks.push(this.constructFallback(py).init({checksumId:t,fileName:this.testInfo.file,testId:this.checksumTestId})),this.sortFallbacks()),this.checksumStepId=t,this.proxy}checksumAI(...t){if(t.length===0)throw new Error("checksumAI missing arguments");if(!this.options.useChecksumAI)return this.proxy;let{apiKey:c,apiURL:l}=this;if(this.fallbacks.push(this.constructFallback(Vp).init({goal:this.testInfo.title,apiKey:c,apiURL:l})),this.sortFallbacks(),this.fallbacks.filter(v=>v instanceof Vp).forEach(v=>v.addMetadata({thought:t[0]})),this.checksumStepInitialCallInTestFile=this.getFirstStackTraceFromTestFile(),t.length===1)return this.proxy;if(typeof t[1]!="function")throw new Error("Second argument for withChecksumStep must be a function");this.checksumStepStack.push(t[0]);try{console.log("=== running test function");let v=this;return r(async function(){await t[1](),console.log("==== done running test function"),v.checksumStepStack.pop()},"Page")()}catch(v){console.log(v),this.checksumStepStack.pop()}}async loadScript(){try{return this.navigationPromise&&await this.navigationPromise,await this.page.addScriptTag({path:gG}),await this.page.evaluate(async({initModules:t,ESRAselectionRules:c})=>{window.checksum.testRunner.init(c,[],t)},{ESRAselectionRules:{testIdSelector:this.testIdSelector},initModules:{assertionGenerator:!0}}),Lc(`[init] init script loaded for ${this.page.url()}`),!0}catch{return!1}}pushToLocatorStack(t){this.locatorStack.push(t)}getCurrentLocatorChain(){if(this.locatorStack.length)return this.locatorStack[this.locatorStack.length-1]}getCurrentLocatorInChain(){let t=this.getCurrentLocatorChain();return t==null?void 0:t[t.length-1]}getMessage(t,{initialSelector:c,selector:l,thought:v}={}){switch(t){case"script":return"Firing up checksum";case"initial":return`${c} 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 ${l}`;case"llm-prompt":return`Checksum is trying to achieve step "${v}" using AI...`;case"llm-action":return`AI: "${v}" using selector "${l}"`;case"fail":return`Checksum couldn't resolve the issue executing ${c}`}}onFallbackSuccess(){let t=this.testInfo._steps[this.testInfo._steps.length-1];t&&!t.endWallTime&&t.complete({error:{message:`Failed to resolve ${this.initialLocatorTitle}`,stack:""}})}setupStepInterceptors(){let t=["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,e7.join)(__dirname,b)),c={},l=r(b=>{var B,g,h,fe;return c[b.stepId]!==void 0?c[b.stepId]:b.location&&!t.includes(b.location.file)?!1:!!(b.stepId.includes(".evaluate@")||b.stepId.includes(".addScriptTag@")||(B=b.title)!=null&&B.includes("evaluate")||(g=b.title)!=null&&g.includes("addScriptTag")||(h=b.title)!=null&&h.includes("waitForLoadState")||b.category==="fixture"||(fe=b.title)!=null&&fe.includes("tracing.stop"))},"shouldFilterStep"),v=this.testInfo._onStepBegin;this.testInfo._onStepBegin=b=>{if(!this.phase&&l(b)){c[b.stepId]=!0;return}return c[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,v(b)};let p=this.testInfo._onStepEnd;this.testInfo._onStepEnd=b=>{if(!c[b.stepId]){if(this.phaseMap[b.stepId]){let{phase:J,initialLocatorTitle:B,payload:g}=this.phaseMap[b.stepId];J==="fail"&&(b.error={message:`Failed to resolve ${B}`,stack:""})}return p(b)}}}getFirstStackTraceFromTestFile(){let t=this.getTestFileStackTrace()[0];if(!t)throw new Error(`Could not find test file location from stack trace ${Lg.getStackTrace()}`);let l=[/\((.*):(\d+):(\d+)\)$/,/.*at (.*):(\d+):(\d+)$/].map(J=>J.exec(t)).find(J=>J!==null);if(!l)throw new Error(`Could not find test file location from stack trace ${t}`);let[,v,p,b]=l;return{file:v,line:parseInt(p),column:parseInt(b)}}getTestFileStackTrace(){return Lg.getStackTrace().filter(c=>c.includes(this.testInfo.file))}isCalledDirectlyFromTestFunction(){let t=this.getTestFileStackTrace();if(t.length!==1+this.checksumStepStack.length)return!1;let c=t[0],l=/.*at (.*):(\d+):(\d+)$/;return this.checksumStepStack.length===0&&!l.exec(c)?!1:!this.isCalledThroughMethodInAnotherFile(c)}isCalledThroughMethodInAnotherFile(t){let c=Lg.getStackTrace(),l=["node:internal","/node_modules/@playwright"],v=c.indexOf(t)-1;for(;v>=0&&l.some(b=>c[v].includes(b));)v--;let p=c[v];return!p.includes("checksum-page.ts")&&!p.includes(pG)}static getStackTrace(){return new Error().stack.split(`
|
|
273
273
|
`)}getLocator(t,c){let l=this.getCurrentLocatorInChain();return l.base[l.type](t,c)}executeLocator(t,c){try{Lc(`
|
|
274
274
|
Executing locator ${this.getCurrentLocatorInChain().type} with ${typeof t=="string"?`selector ${t}`:"locator"}`);let l=this.getLocator(t,c);return new Proxy(l,{get:r(function(p,b){return this.getLocatorMethod(l,p,b)},"get").bind(this)})}catch(l){Lc("Failed to locate",l)}}getLocatorMethod(t,c,l){return l==="constructor"?r(function(...p){return this.popLocatorChain(),c.constructor(...p)},"Locator"):l in c&&typeof c[l]!="function"||l===Symbol.toPrimitive||l in Object?(this.popLocatorChain(),c[l]):[...Object.values(ob),...Object.values(sb)].includes(l)?l==="or"?(Lc("'Or' locator not supported, will execute normally"),this.popLocatorChain(),c[l]):(this.getCurrentLocatorChain().push({type:l,base:t}),r(function(...p){return this.executeLocator(...p)},"Locator").bind(this)):r(async function(...p){let b=await this.executeLocatorAction(t,l,p);return this.popLocatorChain(),b},"Locator").bind(this)}async executeLocatorAction(t,c,l){this.originalActionError=void 0,this.selector=t._selector;let v=this.getChecksumStepId();Lc("Executing",c,this.selector);let p=c==="_expect";try{Lc("Running initial locator..."),await this.navigationPromise,await this.page.evaluate(()=>!!window.checksum)||Lc("[loadScript] checksum libs missing, marking as failed"),await this.stepWillExecute(p),this.phase="initial";let J=await fb(t,c,l,this.getTimeout(c,l));if(p&&(J==null?void 0:J.timedOut)===!0)return Lc("Expect timeout"),this.didFail=!0,J;if(J!==!1)return await this.onStepSuccess(v,c==="_expect"),J;await this.onStepFailure()}catch(b){this.originalActionError=b,Lc("Failed initial execution. Exception:",b.message)}return this.initiateFallbackSequence(v,t,c,l)}getChecksumStepId(){let t=this.checksumStepId;return this.checksumStepId=void 0,t}async stepWillExecute(t){this.selectionData=void 0,this.runMode==="refactor"&&(Lc(`stepWillExecute called for line ${this.pageInitialCallInTestFile.line}`),this.isCalledDirectlyFromTestFunction()&&(await this.evaluateWithChecksum(async()=>await window.checksum.testRunner.startMonitoringForAssertions()),this.selectionData=[await lb(this.selector,this.page)].filter(c=>c),Object.values(this.selectionData).length===0?Lc(`Failed fetching selection data ${t?"- maybe because it is not visible and running inside expect":""}`):Lc("Successfully fetched selection data")))}async onStepSuccess(t,c,l=!1){var b,J,B,g;let v=(b=this.fallbacks.find(h=>h instanceof Vp))==null?void 0:b.getFailedThought();if(this.resetFallbacks(),this.runMode==="normal"||this.runMode==="heal"&&!l||!this.codeMirror||!this.getCurrentLocatorChain())return;if(!this.isCalledDirectlyFromTestFunction()){Lc("<!> Step called from helper function, will not refactor step");return}if(this.runMode==="refactor"&&!this.selectionData.length){Lc("Failed fetching selection data, will not refactor step");return}Lc("Will update in-memory code"+(this.selectionData&&this.selectionData.length>0?`
|
|
275
275
|
locators:
|
|
@@ -303,7 +303,7 @@ ${v}`,c(p,v))return l}return l}addESRA(t,c){if(!this.esraMetadataMap)return"";if
|
|
|
303
303
|
\\s]*(['"\`])(?:[\r
|
|
304
304
|
\\s]*(?:(?!\\1)[\\s\\S]))*\\1(?:[\r
|
|
305
305
|
\\s]*,\\s*({[\\s\\S]*?}))?[\r
|
|
306
|
-
\\s]*\\)`)}}};r(Dv,"CodeMirror");var c2=class{constructor(t){this.hasMonitor=!1;t.options.hostReports&&(this.monitorAgentHost="http://localhost",this.monitorAgentPort=process.env.CHECKSUM_UPLOAD_AGENT_PORT,this.monitorAgentPort?this.hasMonitor=!0:Lc("CHECKSUM_UPLOAD_AGENT_PORT is not defined"))}addAsset(t){this.signalUpload(t,["trace","har"].includes(t.type))}addTestInfo(t,c){this.sendMessage({type:"testInfo",payload:{checksumTestId:t,pwTestId:c}})}addSingleTestStats(t,c){this.sendMessage({type:"testStats",payload:{passed:t,healed:c}})}sendMessage(t){if(this.hasMonitor)return fetch(`${this.monitorAgentHost}:${this.monitorAgentPort}`,{method:"POST",body:JSON.stringify(t)}).catch(c=>{Lc("Failed to send message to test run monitor",t,c)})}signalUpload(t,c=!1){return this.sendMessage({type:"asset",payload:t,watch:c})}};r(c2,"TestRunMonitorBridge");var i6={},J7=r((e,t,c={})=>{let{baseURL:l,runMode:v,apiKey:p,apiURL:b}=t,J=e.extend({codeMirror:[async({},B)=>{let g=await Dv.init(v);await B(g)},{scope:"worker"}],monitorBridge:[async({},B)=>{let g=new c2(t);await B(g)},{scope:"worker"}],page:async({page:B,codeMirror:g,monitorBridge:h},fe,ce)=>{let Z=await Lg.init(B,g,h,ce,{runMode:v,apiKey:p,apiURL:b,options:c})
|
|
306
|
+
\\s]*\\)`)}}};r(Dv,"CodeMirror");var c2=class{constructor(t){this.hasMonitor=!1;t.options.hostReports&&(this.monitorAgentHost="http://localhost",this.monitorAgentPort=process.env.CHECKSUM_UPLOAD_AGENT_PORT,this.monitorAgentPort?this.hasMonitor=!0:Lc("CHECKSUM_UPLOAD_AGENT_PORT is not defined"))}addAsset(t){this.signalUpload(t,["trace","har"].includes(t.type))}addTestInfo(t,c){this.sendMessage({type:"testInfo",payload:{checksumTestId:t,pwTestId:c}})}addSingleTestStats(t,c){this.sendMessage({type:"testStats",payload:{passed:t,healed:c}})}sendMessage(t){if(this.hasMonitor)return fetch(`${this.monitorAgentHost}:${this.monitorAgentPort}`,{method:"POST",body:JSON.stringify(t)}).catch(c=>{Lc("Failed to send message to test run monitor",t,c)})}signalUpload(t,c=!1){return this.sendMessage({type:"asset",payload:t,watch:c})}};r(c2,"TestRunMonitorBridge");var i6={},J7=r((e,t,c={})=>{let{baseURL:l,runMode:v,apiKey:p,apiURL:b}=t,J=e.extend({codeMirror:[async({},B)=>{let g=await Dv.init(v);await B(g)},{scope:"worker"}],monitorBridge:[async({},B)=>{let g=new c2(t);await B(g)},{scope:"worker"}],page:async({page:B,codeMirror:g,monitorBridge:h},fe,ce)=>{let Z=await Lg.init(B,g,h,ce,rK(ce),{runMode:v,apiKey:p,apiURL:b,options:c});await fe(Z),await Z.onTestComplete()}});return J.use({launchOptions:{args:["--remote-debugging-port=9222",...c!=null&&c.useMockData?["--disable-web-security"]:[]]},baseURL:l,bypassCSP:!0}),{test:J,defineChecksumTest:eK}},"createChecksumTestExtension"),eK=r((e,t)=>{let l=new Error().stack.split(`
|
|
307
307
|
`).filter(v=>v.includes(".checksum.spec.ts"))[0];if(!l)throw new Error("Could not locate test location. Make sure test is run from valid checksum test file");return i6[l]=t,e},"defineChecksumTest");function rK(e){var v;let{file:t,line:c}=e,l=Object.keys(i6).filter(p=>p.trim().includes(t.trim()));if(l.length){for(let p=0;p<4;p++)for(let b of l)if(parseInt((v=b.split(":"))==null?void 0:v[1])-p===parseInt(c))return i6[b]}}r(rK,"getCurrentTestIdFromMapping");function nK(e){let t=RP(),{baseURL:c,runMode:l,options:v,apiKey:p,apiURL:b}=t;if(!c)throw new Error("baseURL is required - please set it in the config file");if(!p)throw new Error("apiKey is required - please set it in the config file - checksum.config.ts");return{...J7(e,t,v),login:_b(t)}}r(nK,"init");0&&(module.exports={RunMode,getChecksumConfig,getLogin,init});
|
|
308
308
|
/*! Bundled license information:
|
|
309
309
|
|